html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow-x: hidden; /* evita scroll horizontal */
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh; /* altura mínima igual al viewport */
}

/* =========================
   HEADER
========================= */
header {
  width: 100%;
  background-color: #222; /* ejemplo */
  position: fixed;        /* fijar al top */
  top: 0;
  left: 0;
  z-index: 1000;
}

.main-links a {
  color: #f8f9fa;
  font-weight: 400;
  transition: color 0.3s ease, font-weight 0.3s ease;
}

.main-links a:hover,
.main-links a.active {
  color: #ff5c5c;
  font-weight: 700;
}

/* =========================
   REDES SOCIALES
========================= */
.social-links a {
  color: #f8f9fa;
  transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
  color: #ff5c5c;
  transform: scale(1.2);
}

.social-links a i {
  font-size: 1.5rem;
}

/* =========================
   FOOTER
========================= */
.footer-links a {
  color: #f8f9fa;
  text-decoration: none;
  display: inline-block;
  transition: color 0.22s ease, padding-left 0.22s ease;
}

.footer-links a:hover,
.footer-links a:focus {
  color: #ff5c5c;
  padding-left: 3px;
}

/* =========================
   DIRECTORIO - CARDS
========================= */
.directorio .img-wrap {
  position: relative;
  overflow: hidden;
}

.directorio .img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* asegura proporción uniforme */
}

.directorio .overlay-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 1) 0%,      /* negro sólido abajo */
    rgba(0, 0, 0, 0.7) 40%,   /* degradado intermedio */
    rgba(0, 0, 0, 0) 100%     /* transparente arriba */
  );
  z-index: 1;
  pointer-events: none;
}

.directorio .card-body {
  background: #000;   /* negro sólido */
  color: #fff;
  padding: 1.5rem 1rem;
}

.directorio .black-zone h5,
.directorio .black-zone p.small {
  text-align: center !important;
}

.directorio .black-zone p {
  text-align: left !important;
}

.directorio .card-body h5,
.directorio .card-body p {
  margin: 0.4rem 0;
}

.directorio .card-body a {
  color: #f8f9fa;
  text-decoration: none;
}

.directorio .card-body a:hover {
  text-decoration: underline;
  color: #ff5c5c;
}

.directorio .card-body i {
  margin-right: 6px;
}

.directorio .linkedin-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 3;
}

.directorio .linkedin-icon a {
  color: #f8f9fa;
  font-size: 1.4rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.directorio .linkedin-icon a:hover {
  color: #ff5c5c;
  transform: scale(1.2);
}

/* =========================
   MODALES
========================= */
.modal-content {
  border-radius: 15px;
  border: none;
  overflow: hidden;
  box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.modal-body h4 {
  color: #222;
  font-weight: 600;
}

/* Contacto dentro del modal */
.contact-info span {
  color: #333;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.contact-info i {
  margin-right: 8px;
  font-size: 1.2rem;
  color: #000;
}

/* Imagen con overlay inferior (LinkedIn + CV) */
.modal .img-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

.modal .img-wrap img {
  border-radius: 10px;
}

.modal .img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 8px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0));
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* LinkedIn dentro del modal */
.modal .linkedin-icon {
  font-size: 1.4rem;
  color: #fff;
  transition: transform 0.3s ease, color 0.3s ease;
}

.modal .linkedin-icon:hover {
  color: #ff5c5c;
  transform: scale(1.2);
  text-decoration: none;
}

/* Botón CV dentro del modal */
.modal .img-overlay .btn-light {
  font-size: 0.8rem;
  padding: 3px 8px;
  border-radius: 20px;
  transition: background 0.3s;
}

.modal .img-overlay .btn-light:hover {
  background: #ff5c5c;
  color: #fff;
}

/* =========================
   BANNER NOSOTROS
========================= */
.banner-nosotros {
  position: relative;
  width: 100vw;              /* ancho completo de la ventana */
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-left: calc(-50vw + 50%);  /* expandir ancho completo */
  margin-right: calc(-50vw + 50%);
  padding: 0;
  z-index: 0;
}

.banner-nosotros .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(34,34,34,0.8), rgba(34,34,34,0.4));
  z-index: 1;
}

.banner-nosotros .banner-text {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.banner-nosotros h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.banner-nosotros p {
  font-size: 1.2rem;
}

/* =========================
   SECCIÓN NOSOTROS
========================= */

section.nosotros {
  flex-grow: 1; /* ocupa espacio restante */
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  background-image: url('<?= BASE_URL ?>assets/img/bg-nosotros.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 80px 20px;
  color: #fff;

  display: flex;
  flex-direction: column;
  justify-content: center; /* centra verticalmente el contenido */
}

.nosotros .container {
  z-index: 2;
  position: relative;
}

.nosotros {
  background-color: #f9f9f9;
  padding: 80px 20px;
}

.nosotros .section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  color: #222;
  text-align: center;
}

/* Cards grid */
.nosotros .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-items: center;
}

/* Card individual */
.nosotros .card-nosotros {
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  text-align: center;
  cursor: default;
  transition: transform 0.3s, box-shadow 0.3s;
}

.nosotros .card-nosotros:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}

/* Iconos planos Bootstrap */
.nosotros .card-nosotros .icon i {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #555;
  transition: transform 0.3s, color 0.3s;
}

.nosotros .card-nosotros:hover .icon i {
  transform: scale(1.3);
  color: #ff5c5c;
}

/* Título y descripción */
.nosotros .card-nosotros h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #222;
}

.nosotros .card-nosotros p {
  font-size: 1rem;
  color: #555;
}

/* =========================
   BANNER DE SERVICIOS
========================= */
.banner-servicios {
  position: relative;
  width: 100vw;              /* ancho completo de la ventana */
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-left: calc(-50vw + 50%);  /* fuerza expandir incluso dentro de container */
  margin-right: calc(-50vw + 50%);
  padding: 0;
  z-index: 0;
}

/* Overlay para resaltar texto */
.banner-servicios .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Degradado más suave desde el header hasta semi-transparente */
  background: linear-gradient(
    to bottom,
    rgba(34, 34, 34, 0.8) 20%,    /* inicio sólido */
    rgba(34, 34, 34, 0.6) 40%, /* transición suave */
    rgba(34, 34, 34, 0.4) 60%, 
    rgba(34, 34, 34, 0.2) 80%, /* casi transparente */
    rgba(34, 34, 34, 0) 100%   /* completamente transparente */
  );
  z-index: 1;
}


/* Texto del banner */
.banner-servicios .banner-text {
  position: relative;
  z-index: 2;
  padding: 0 20px;
}

.banner-servicios h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
}

.banner-servicios p {
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.banner-servicios .btn {
  padding: 12px 25px;
  font-size: 1rem;
  border-radius: 6px;
}

/* Panel de servicios */
.panel-servicios {
  padding: 80px 20px;
  background-color: #f9f9f9;
}

.panel-servicios .section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 50px;
  color: #222;
  text-align: center;
}

/* Grid de cards */
.panel-servicios .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-items: center;
  align-items: stretch;
}

/* Card individual */
.panel-servicios .card-servicio {
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

/* Iconos de Bootstrap */
.panel-servicios .card-servicio .icon {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #555;
  transition: transform 0.3s, color 0.3s;
}

/* Hover card */
.panel-servicios .card-servicio:hover {
  transform: translateY(-7px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
  background-color: #fff0f5;
}

.panel-servicios .card-servicio:hover .icon {
  transform: scale(1.3);
  color: #ff5c5c;
}

/* Título y descripción */
.panel-servicios .card-servicio h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #222;
}

.panel-servicios .card-servicio p {
  font-size: 1rem;
  color: #555;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
  .banner-servicios h1 { 
    font-size: 2.4rem; 
  }
  .banner-servicios p { 
    font-size: 1.1rem; 
  }
}

@media (max-width: 768px) {
  .banner-servicios { 
    height: 300px; 
  }
  .banner-servicios h1 { 
    font-size: 2rem; 
  }
  .banner-servicios p { 
    font-size: 1rem; 
  }
  .panel-servicios .cards-grid { 
    gap: 20px; 
  }
}

@media (max-width: 480px) {
  .banner-servicios h1 { 
    font-size: 1.6rem; 
  }
  .banner-servicios p { 
    font-size: 0.95rem; 
  }
  .banner-servicios .btn { 
    padding: 10px 20px; 
    font-size: 0.9rem; 
  }
  .panel-servicios .card-servicio { 
    max-width: 100%; 
  }
}
