@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* { box-sizing: border-box; }

:root {
  --navbar-height: 140px; /* valor usado para offset de anclas */
  --section-vertical: 7rem; /* espacio vertical estándar para secciones (aumentado) */
  /* Valores fijos por sección — edítalos directamente para cambiar dónde paran los anclajes.
     Formato: --section-scroll-top: 48px; (valor fijo en px o rem). */
  --section-scroll-top-default: 48px;
  --section-scroll-top-que-es: 48px;
  --section-scroll-top-equipo: 43px;
  --section-scroll-top-profesores: 38px;
  --section-scroll-top-campus: 100px;
  --section-scroll-top-contacto: 36px;
}

  /* Map each main section to its fixed scroll-top variable (editable in :root or per-section) */
  #que-es { --section-scroll-top: var(--section-scroll-top-que-es); }
  #profesores { --section-scroll-top: var(--section-scroll-top-profesores); }
  #contacto { --section-scroll-top: var(--section-scroll-top-contacto); }

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #fafafa;
  color: #2c3e50;
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 15px; /* ligeramente más pequeño */
}

/* LOGO Y HERO */
.hero {
  min-height: 100vh; /* asegurar que ocupe pantalla completa */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* FOTO DE FONDO + OVERLAY OSCURO */
  background-color: #111; /* fallback mientras carga la imagen */
  background: 
    linear-gradient(135deg, rgba(0, 0, 0, 0.80), rgba(230, 126, 34, 0.2)),
    url('hero-bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: scroll; /* evitar problemas en móviles/navegadores */
  position: relative;
  text-align: center;
  padding: 1.2rem 1rem;
}

.logo-hero {
  width: clamp(110px, 20vw, 160px);
  height: clamp(110px, 20vw, 160px);
  object-fit: contain;
  margin-bottom: 1.2rem;
  opacity: 0;
  animation: fadeIn 1.2s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}


.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin: 0 0 1rem;
  text-shadow: 
  0 0 15px rgba(0, 0, 0, 0.15),
  0 0 30px rgba(243, 156, 18, 0.4);  /* Glow naranja sutil */
  background: linear-gradient(135deg, #ff8c00);  /* ← Naranja MÁS BRILLANTE */
  
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s 0.5s forwards;
}

.hero-subtitle {
  font-size: clamp(0.98rem, 2.5vw, 1.2rem);
  max-width: 640px;
  margin: 0 auto 1.8rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s 0.8s forwards;
  color: white;  /* ← ESTA LÍNEA */
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);  /* Sombra para legibilidad */
}

@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}

/* BOTONES */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  margin: 0.4rem;
  border-radius: 40px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform: translateY(0);
  font-size: 0.98rem;
}

.btn-large { padding: 0.8rem 2rem; font-size: 1.05rem; }

.btn-primary {
  background: linear-gradient(135deg, #e67e22, #d35400);
  color: white;
  box-shadow: 0 6px 20px rgba(230, 126, 34, 0.3);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(230, 126, 34, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.95);  /* Blanco semitransparente */
  color: #2c3e50;                         /* Texto oscuro */
  border: 2px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);            /* Vidrio esmerilado */
}

.btn-secondary:hover {
  background: white;
  color: #2c3e50;
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(255, 255, 255, 0.4);
}

/* NAVEGACIÓN */
.top-nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 0.6rem 1rem;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.top-nav a {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s;
  position: relative;
}

/* Hotbar link sizing and spacing */
.nav-links a {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  margin: 0 0.25rem;
  border-radius: 8px;
}

.nav-links a:hover {
  background: rgba(230,126,34,0.06);
}

/* Make nav items more compact on small screens */
@media (max-width: 768px) {
  .nav-links a { padding: 0.45rem 0.6rem; margin: 0 0.15rem; }
}

.top-nav a:hover {
  color: #e67e22;
  transform: translateY(-2px);
}

/* SECCIONES */
.section {
  padding: var(--section-vertical) 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section h2 {
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  text-align: center;
  margin-bottom: 1rem;
  font-weight: 600;
  color: #2c3e50;
}

/* Layout for 'Qué es' section: image at left, text at right */
.que-es-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10rem;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.section#que-es { /* usar mismo espaciado estándar para separar claramente del hero */
  padding-top: var(--section-vertical);
}
.que-es-grid .que-es-image {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 520px; /* limita el ancho de la columna de imagen */
}
.que-es-grid .que-es-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4; /* reserva la proporción y evita cambios de layout al cargar */
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0,0,0,0.08);
  display: block;
  min-height: 280px; /* reserva espacio para pantallas pequeñas */
}
.que-es-grid .que-es-text { text-align: left; }

@media (max-width: 880px) {
  .que-es-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .que-es-grid .que-es-text { text-align: center; }
  .que-es-grid .que-es-image img { height: 260px; }
}

/* anchor target spacing for que-es so buttons stop slightly lower */
#que-es {
  scroll-margin-top: calc(var(--navbar-height) + 18px);
}

/* Specific heading inside 'qué es' column: left on desktop, centered on small screens */
.qe-title {
  text-align: left;
  margin: 0 0 1rem;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
}
@media (max-width: 880px) {
  .qe-title { text-align: center; }
}

/* ANIMACIÓN SCROLL */
.fade-in {
  opacity: 0;
  transform: translateY(60px);
  transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* TARJETAS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.6rem;
  margin-top: 2rem;
}

.card {
  background: white;
  padding: 1.6rem 1.2rem;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.6);
}

.card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 18px 40px rgba(230, 126, 34, 0.12);
  border-color: rgba(230, 126, 34, 0.12);
}

.card h3 {
  font-size: 1.25rem;
  margin: 0 0 0.6rem;
  color: #e67e22;
  font-weight: 600;
}

.card .cargo {
  color: #7f8c8d;
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  letter-spacing: 0.5px;
}

/* FOOTER */
.footer {
  text-align: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: white;
  margin-top: 4rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .top-nav { gap: 1.5rem; flex-wrap: wrap; padding: 1rem; }
  .hero { padding: 2.2rem 1.5rem; min-height: 75vh; }
  .cards { grid-template-columns: 1fr; gap: 2rem; }
}
/* use uniform spacing; remove ad-hoc adjustments */
#que-es { padding-bottom: 5rem; }
/* NAVBAR CON LOGO */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 2rem;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateY(-100%);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#navbar.scrolled {
  opacity: 1;
  transform: translateY(0);
}

.hero {
  padding-top: 0 !important;  /* Sin espacio extra arriba */
  /* resto de hero igual */
}



.nav-logo-container {
  flex-shrink: 0;
}

.nav-logo {
  width: 45px;
  height: 45px;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.8) translateY(-10px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.scrolled .nav-logo {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  #navbar { padding: 0 1rem; }
  .n  av-links { gap: 1.5rem; }
  .nav-logo { width: 40px; height: 40px; }
}
#que-es::before,
/* NOTE: removed #equipo::before and #campus::before to avoid double-offsets */
#profesores::before,
#contacto::before {
  content: '';
  display: block;
  height: var(--navbar-height);      /* Espacio invisible para navbar + logo */
  margin-top: calc(var(--navbar-height) * -1); /* Lo "empuja" arriba */
  visibility: hidden;
}

/* Asegurar que el hero respete el offset cuando sea objetivo de un ancla */
#hero {
  scroll-margin-top: var(--navbar-height);
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height); /* evita que los anclajes queden detrás del navbar */
}

/* Ensure all main sections stop below navbar when targeted */
.section {
  /* Ahora usamos un valor fijo por sección: --section-scroll-top.
     Puedes cambiar el valor por defecto en :root o definir uno por sección.
     Ejemplo CSS: #que-es { --section-scroll-top: 60px; }
     O bien en HTML: <section id="que-es" data-scroll-offset="60px"> */
  scroll-margin-top: var(--section-scroll-top, var(--section-scroll-top-default));
}

/* use standard section spacing instead of large ad-hoc offsets */

#profesores {
  padding-top: var(--section-vertical);
}

/* Valores por sección para ajustar dónde paran los anclajes.
   Puedes sobrescribir estos valores por sección con CSS o usando
   el atributo HTML `data-scroll-offset` (ej: <section id="equipo" data-scroll-offset="28px">).
*/
#equipo { --section-scroll-top: var(--section-scroll-top-equipo); }
#campus { --section-scroll-top: var(--section-scroll-top-campus); }
.logo-link {
  display: block;
  line-height: 0;
  transition: transform 0.3s;
}

.logo-link:hover {
  transform: scale(1.1);
}

.team-carousel-container {
  position: relative;
  max-width: 1200px;
  margin: 4rem auto;
  /* padding lateral para que las cards no queden pegadas al borde */
  padding: 0 2rem;
  overflow: visible; /* permitir que las fotos redondas sobresalgan */
}

/* debug panel removed */

/* Gradientes overlay en los bordes: visualmente ocultan elementos parciales sin recortarlos */
.team-carousel-container::before,
.team-carousel-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 3rem;
  pointer-events: none;
  z-index: 20;
}


.team-carousel-track {
  display: flex;
  align-items: flex-start;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  gap: 2.5rem;
  will-change: transform;
}

team-card {
  background: white;
  border-radius: 18px;
  padding: 2.4rem 1.4rem 1.4rem;
  box-shadow: 0 12px 36px rgba(0,0,0,0.08);
  transition: all 0.35s ease;
  text-align: center;
  min-width: 260px;
  border: 1px solid rgba(255,255,255,0.6);
  position: relative;
  display: flex;
  flex-direction: column;
}

.team-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 30px 80px rgba(230,126,34,0.2);
}

team-photo {
  width: 100px;
  height: 100px;
  background-size: cover;
  background-position: center;
  border-radius: 100%;
  border: 3px solid white;
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
  position: relative;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: -55px;
  z-index: 2;
}

team-card h3 {
  font-size: 1.2rem;
  margin: 0.8rem 0 0.4rem;
  color: #2c3e50;
}

.team-card .cargo {
  color: #e67e22;
  font-weight: 500;
  margin-bottom: 1rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(230,126,34,0.9);
  color: white;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 30; /* encima del overlay */
  transition: all 0.25s;
}

.carousel-btn:hover {
  background: #e67e22;
  transform: translateY(-50%) scale(1.1);
}

.prev { left: 15px; }
.next { right: 15px; }

/* Responsive */
@media (max-width: 768px) {
  .team-carousel-track {
    flex-direction: column;
    gap: 1.5rem;
  }
  .team-card {
    min-width: auto;
  }
  .carousel-btn {
    display: none;
  }
  .team-carousel-container {
    padding: 0 1rem;
    /* mobile: ajustar overlay más estrecho */
    -webkit-mask-image: none;
    mask-image: none;
  }
  }

/* === Team slider (prefijado con .team-slider para evitar colisiones) === */
.team-slider .slider-container{
  max-width: 1100px;
  width: 100%;
  padding: 18px 0;
}
.team-slider .slider-content {
  overflow: hidden;
  border-radius: 18px;
  margin: 0 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
}
.team-slider .card {
  border-radius: 14px;
  background-color: rgba(255,255,255,0.98);
  box-shadow: 0 10px 30px rgba(230,126,34,0.08);
  border: 1px solid rgba(0,0,0,0.04);
}
.team-slider .image-content,
.team-slider .card-content {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.team-slider .image-content {
  position: relative;
  row-gap: 6px;
  padding: 22px 0 6px;
}
.team-slider .overlay {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(230,126,34,0.95), rgba(243,156,18,0.85));
  border-radius: 14px 14px 0 14px;
  mix-blend-mode: multiply;
}
.team-slider .card-image {
  position: relative;
  height: 130px;
  width: 130px;
  background-color: #fff;
  border-radius: 50%;
}
.team-slider .card-image .card-img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid rgba(230,126,34,0.95);
}
.team-slider .name {
  font-size: 20px;
  font-weight: 700;
  color: #e67e22;
  margin-top: 6px;
}
.team-slider .description {
  font-size: 14px;
  color: #565656;
  text-align: center;
  margin: 6px 14px 12px;
}
.team-slider .button {
  border: none;
  outline: none;
  font-size: 15px;
  background: linear-gradient(135deg, #e67e22, #d35400);
  color: white;
  margin: 10px 0 16px;
  padding: 8px 14px;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  box-shadow: 0 8px 24px rgba(230,126,34,0.18);
}
.team-slider .button:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(230,126,34,0.22); }
.team-slider .swiper-navBtn{ color: rgba(230,126,34,0.95); transition: color 0.2s ease; }
.team-slider .swiper-navBtn:hover{ color: #e67e22; }
.team-slider .swiper-navBtn::before,
.team-slider .swiper-navBtn::after{ font-size: 36px; }
.team-slider .swiper-button-next{ right: 6px; }
.team-slider .swiper-button-prev{ left: 6px; }
.team-slider .swiper-pagination .swiper-pagination-bullet{ background-color: rgba(0,0,0,0.12); opacity: 1; }
.team-slider .swiper-pagination .swiper-pagination-bullet-active{ background-color: #e67e22; }
@media screen and (max-width:768px) {
  .team-slider .slider-content{ margin: 0 6px; }
  .team-slider .swiper-navBtn{ display: none; }
  .team-slider .card-image { height: 110px; width: 110px; }
}
