/* ==========================================================================
   Instituto Ecuatoriano de Energía — style.css
   Author: IEE Front-End
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties
   -------------------------------------------------------------------------- */
:root {
  --brand:        #0071b8;
  --brand-dark:   #005a93;
  --brand-light:  #1a8fd1;
  --brand-xlight: #e8f4fc;

  --neutral-900: #0d1117;
  --neutral-800: #1a2230;
  --neutral-700: #2d3748;
  --neutral-600: #4a5568;
  --neutral-400: #a0aec0;
  --neutral-200: #edf2f7;
  --neutral-100: #f7fafc;

  --white: #ffffff;

  --font-base: 'Inter', system-ui, -apple-system, sans-serif;

  --navbar-height:     80px;
  --navbar-height-sm:  64px;
  --transition-base:   0.3s ease;
  --transition-slow:   0.55s cubic-bezier(0.65, 0, 0.35, 1);
  --shadow-sm:   0 2px 8px rgba(0, 113, 184, 0.12);
  --shadow-md:   0 8px 32px rgba(0, 113, 184, 0.18);
  --shadow-lg:   0 20px 60px rgba(0, 0, 0, 0.25);
  --color-light: #f5f5f5;
}

/* --------------------------------------------------------------------------
   Reset / Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-base);
  color: var(--neutral-800);
  background-color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   Reusable: Brand Buttons
   -------------------------------------------------------------------------- */
.btn-primary-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--brand);
  color: var(--white);
  border: 2px solid var(--brand);
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color var(--transition-base), border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
}

.btn-primary-brand:hover,
.btn-primary-brand:focus-visible {
  background-color: var(--brand-dark);
  border-color: var(--brand-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary-brand.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: 8px;
}

.btn-outline-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 6px;
  padding: 10px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background-color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus-visible {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: var(--white);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-brand.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: 8px;
}

/* --------------------------------------------------------------------------
   NAVBAR
   -------------------------------------------------------------------------- */
#main-navbar {
  height: var(--navbar-height);
  padding: 0;
  background-color: transparent;
  transition: background-color 0.4s ease, height 0.4s ease, box-shadow 0.4s ease;
  z-index: 1040;
}

#main-navbar.navbar-scrolled {
  height: var(--navbar-height-sm);
  background-color: var(--white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.10);
}

/* Logo */
.navbar-logo {
  height: 72px;
  width: auto;
  transition: height var(--transition-base);
}

#main-navbar.navbar-scrolled .navbar-logo {
  height: 38px;
}

/* Nav links */
.navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px !important;
  border-radius: 6px;
  position: relative;
  transition: color var(--transition-base), background-color var(--transition-base);
  letter-spacing: 0.01em;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 14px;
  right: 14px;
  height: 2px;
  background-color: var(--brand-light);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  transform: scaleX(1);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.10);
}

/* Navbar scrolled: dark links */
#main-navbar.navbar-scrolled .navbar-nav .nav-link {
  color: var(--neutral-700);
}

#main-navbar.navbar-scrolled .navbar-nav .nav-link:hover,
#main-navbar.navbar-scrolled .navbar-nav .nav-link.active {
  color: var(--brand);
  background-color: var(--brand-xlight);
}

#main-navbar.navbar-scrolled .navbar-nav .nav-link::after {
  background-color: var(--brand);
}

/* Dropdown */
.dropdown-menu {
  border: none;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  padding: 8px;
  min-width: 230px;
  margin-top: 8px;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--neutral-700);
  padding: 9px 14px;
  border-radius: 7px;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--brand-xlight);
  color: var(--brand);
}

.dropdown-divider {
  border-color: var(--neutral-200);
  margin: 6px 0;
}

/* Toggler (hamburger) */
.navbar-toggler {
  border: none;
  padding: 8px;
  background: none;
  box-shadow: none !important;
  outline: none !important;
}

.toggler-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 26px;
}

.toggler-icon span {
  display: block;
  height: 2px;
  background-color: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

.toggler-icon span:nth-child(2) {
  width: 70%;
}

#main-navbar.navbar-scrolled .toggler-icon span {
  background-color: var(--neutral-800);
}

/* Toggler open state */
.navbar-toggler[aria-expanded="true"] .toggler-icon span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-toggler[aria-expanded="true"] .toggler-icon span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.navbar-toggler[aria-expanded="true"] .toggler-icon span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile collapsed nav */
@media (max-width: 991.98px) {
  #main-navbar {
    background-color: var(--neutral-900) !important;
    height: auto;
    padding: 12px 0;
  }

  #navbarMenu {
    background-color: var(--neutral-800);
    border-radius: 12px;
    margin-top: 10px;
    padding: 12px;
  }

  .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    padding: 10px 14px !important;
  }

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
  }

  .navbar-nav .nav-link::after {
    display: none;
  }

  .btn-primary-brand {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
  }

  .dropdown-menu {
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: none;
    border-radius: 8px;
  }

  .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
  }

  .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.10);
    color: var(--white);
  }

  .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.12);
  }
}

/* --------------------------------------------------------------------------
   HERO SLIDER
   -------------------------------------------------------------------------- */
.hero-slider {
  position: relative;
  width: 100%;
  overflow: hidden;
  background-color: var(--neutral-900);
}

/* Slides wrapper — altura fija para que las slides absolute no colapsen el layout */
.hero-slides-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 560px;
}

/* Individual slide — siempre absolute, nunca cambia a relative */
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  pointer-events: none;
  will-change: opacity;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
  pointer-events: auto;
}

/* Slide backgrounds */
.slide-1 {

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide-2 {

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide-3 {

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide-4 {

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Overlay — más oscuro para mejorar legibilidad sobre imágenes */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1;
}

/* Subtle dot pattern */
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: 1;
}

/* Hero content layer */
.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-top: calc(var(--navbar-height) + 20px);
  padding-bottom: 120px;
}

.hero-content .row {
  min-height: calc(100vh - var(--navbar-height) - 140px);
}

/* Badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(0, 113, 184, 0.35);
  border: 1px solid rgba(0, 113, 184, 0.6);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  margin-inline: auto;
}

.hero-badge i {
  font-size: 0.95rem;
  color: var(--brand-light);
}

/* Title */
.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.hero-title-highlight {
  color: var(--brand-light);
}

/* Description */
.hero-description {
  font-size: clamp(0.95rem, 1.5vw, 1.1rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 36px;
  max-width: 540px;
  margin-inline: auto;
}

/* CTA buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 52px;
}

/* Stats row */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background-color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

/* Decorative SVG right side */
.hero-deco {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.hero-deco--right {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(300px, 40vw, 520px);
  opacity: 0.6;
}

/* --------------------------------------------------------------------------
   Slider Controls
   -------------------------------------------------------------------------- */
.hero-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px 28px;
  gap: 16px;
}

/* Prev / Next buttons */
.hero-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--white);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-base), border-color var(--transition-base), transform 0.2s ease;
  z-index: 10;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.hero-btn:hover {
  background-color: var(--brand);
  border-color: var(--brand);
  transform: translateY(-50%) scale(1.08);
}

.hero-btn--prev { left: 24px; }
.hero-btn--next { right: 24px; }

/* Dots */
.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-base), transform var(--transition-base), width 0.3s ease;
  padding: 0;
}

.hero-dot.active {
  background-color: var(--white);
  width: 28px;
  border-radius: 100px;
  transform: none;
}

/* Progress bar */
.hero-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.15);
}

.hero-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--brand-light), var(--white));
  transition: width 0.1s linear;
  border-radius: 0 3px 3px 0;
}

/* --------------------------------------------------------------------------
   Scroll hint
   -------------------------------------------------------------------------- */
.hero-scroll-hint {
  position: absolute;
  bottom: 40px;
  right: 48px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-mouse {
  width: 22px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.scroll-wheel {
  width: 3px;
  height: 7px;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
  animation: scrollWheel 1.8s ease infinite;
}

@keyframes scrollWheel {
  0%   { transform: translateY(0);   opacity: 1; }
  70%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0);   opacity: 0; }
}

/* --------------------------------------------------------------------------
   Responsive adjustments
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .hero-content {
    padding-top: calc(var(--navbar-height) + 40px);
    padding-bottom: 100px;
  }

  .hero-deco--right {
    opacity: 0.15;
    width: 80vw;
    right: -15%;
  }

  .hero-scroll-hint {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .hero-btn {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }

  .hero-btn--prev { left: 12px; }
  .hero-btn--next { right: 12px; }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-outline-brand.btn-lg,
  .btn-primary-brand.btn-lg {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    gap: 16px;
  }

  .stat-number {
    font-size: 1.4rem;
  }
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */

/* Section wrapper */
.about-section {
  padding: 100px 0 80px;
  background-color: var(--white);
}

/* ── Top row spacing ── */
.about-top-row {
  margin-bottom: 72px;
}

/* ── Foto institucional ── */
.about-img-wrap {
  position: relative;
}

.about-img-placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 2px dashed var(--neutral-200);
  border-radius: 16px;
  background-color: var(--neutral-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--neutral-400);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  padding: 24px;
  transition: border-color var(--transition-base);
}

.about-img-placeholder i {
  font-size: 2.4rem;
  color: var(--neutral-200);
}

/* ── Título canónico de sección ── */
.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--neutral-900);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.section-title-highlight {
  color: var(--brand);
}

/* ── Párrafo canónico de sección ── */
.section-lead {
  font-size: 0.975rem;
  line-height: 1.85;
  color: var(--neutral-600);
  margin-bottom: 0;
}

/* ── Gráfica placeholder ── */
.about-chart-placeholder {
  width: 100%;
  min-height: 110px;
  border: 2px dashed var(--neutral-200);
  border-radius: 12px;
  background-color: var(--neutral-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--neutral-400);
  font-size: 0.8rem;
  font-weight: 500;
}

.about-chart-placeholder i {
  font-size: 1.8rem;
  color: var(--neutral-200);
}

/* ── Cards row ── */
.about-cards-row {
  /* natural flow */
}

.about-card {
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 16px;
  padding: 32px 28px;
  height: 100%;
  transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.about-card:hover {
  box-shadow: var(--shadow-md);
  border-color: transparent;
  transform: translateY(-4px);
}

.about-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background-color: var(--brand-xlight);
  display: flex;
  align-items: center;
  justify-content: center;

}

.about-card-icon i {
  font-size: 1.2rem;
  color: var(--brand);
}

.about-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 12px;
}

.about-card-text {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--neutral-600);
  margin-bottom: 0;
}

/* ── Tags / Líneas de Acción ── */
.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.about-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--brand);
  background-color: var(--brand-xlight);
  border: 1px solid rgba(0, 113, 184, 0.18);
  border-radius: 6px;
  padding: 5px 10px;
  line-height: 1.4;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.about-tag:hover {
  background-color: var(--brand);
  color: var(--white);
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .about-section {
    padding: 72px 0 60px;
  }

  .about-top-row {
    margin-bottom: 48px;
  }

  .about-img-placeholder {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 575.98px) {
  .about-section {
    padding: 56px 0 48px;
  }

  .about-card {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   PARTNERSHIPS SECTION
   ========================================================================== */

.partnerships-section {
  padding: 100px 0 80px;
  background-color: var(--neutral-100);
}

/* ── Main row ── */
.partnerships-main-row {
  align-items: stretch;
}

/* ── Columna izquierda (imagen) ── */
.partnerships-left {
  display: flex;
  align-items: stretch;
}

.partnerships-img-wrap {
  width: 100%;
  position: relative;
  height: 100%;
  min-height: 700px;
}

.partnerships-img {
  width: 100%;
  height: 100%;
  min-height: 700px;
  object-fit: cover;
  object-position: center;
  border-radius: 16px;
  display: block;
}

/* ── Animación de turbina eólica ── */
.partnerships-animation {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.windmill-animation {
  position: relative;
  width: 500px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  box-shadow: 0 8px 32px rgba(0, 113, 184, 0.2);
}

.windmill-base,
.windmill-blades {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.windmill-base {
  z-index: 1;
}

.windmill-blades {
  z-index: 2;
  animation: windmillRotate 2s linear infinite;
  transform-origin: center center;
}

@keyframes windmillRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* ── Columna derecha (contenido) ── */
.partnerships-right {
  display: flex;
  flex-direction: column;
}

/* Contenido hero en la parte superior de la columna derecha */
.partnerships-hero-content {
  margin-bottom: 5px;
}

/* Título hero estilo grande */
.partnerships-hero-title {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--neutral-900);
  margin-bottom: 24px;
  letter-spacing: -0.03em;
}

/* Texto hero */
.partnerships-hero-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--neutral-600);
  margin-bottom: 0;
}

.partnerships-hero-text strong {
  color: var(--brand);
  font-weight: 700;
}

/* ── Grupo (Internacional / Nacional) ── */
.partners-group {
  margin-top: 32px;
}

.partners-group:first-of-type {
  margin-top: 0;
}

.partners-group-label {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--neutral-400);
  margin-bottom: 0;
  padding-left: 2px;
}

/* ── Grid de logos ── */
.partners-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: center;
}

.partner-logo-card img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 80px; /* ajusta según el tamaño que necesites */
}

.partners-grid {
  overflow: hidden; /* evita que el translate genere scroll/espacio extra */
}

/* ── Cada tarjeta de logo ── */
.partner-logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 calc(33.333% - 10px);
  min-width: 148px;
  padding: 16px 20px;
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  text-align: center;
  cursor: default;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.partner-logo-card:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 18px rgba(0, 113, 184, 0.12);
  transform: translateY(-3px);
}

.partner-logo-card span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--neutral-700);
  line-height: 1.45;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .partnerships-section {
    padding: 72px 0 60px;
  }

  .partnerships-main-row {
    flex-direction: column;
  }

  .partnerships-left {
    margin-bottom: 48px;
  }

  .partnerships-img-wrap {
    min-height: 400px;
    height: auto;
  }

  .partnerships-img {
    min-height: 400px;
    aspect-ratio: 16 / 9;
  }

  .partnerships-hero-content {
    margin-bottom: 40px;
  }

  /* Ajustar tamaño de animación en tablets */
  .windmill-animation {
    width: 160px;
    height: 160px;
  }

  .partnerships-animation {
    bottom: 20px;
  }
}

@media (max-width: 767.98px) {
  .partnerships-section {
    padding: 64px 0 56px;
  }

  .partnerships-img-wrap,
  .partnerships-img {
    min-height: 300px;
  }

  .partners-grid {
    gap: 10px;
  }

  .partner-logo-card {
    min-width: calc(50% - 5px);
    flex: 1 1 calc(50% - 5px);
  }

  /* Animación más pequeña en móviles */
  .windmill-animation {
    width: 120px;
    height: 120px;
  }

  .partnerships-animation {
    bottom: 15px;
  }
}

@media (max-width: 400px) {
  .partner-logo-card {
    min-width: 100%;
    flex: 1 1 100%;
  }
}

/* ==========================================================================
   ACADEMIC PROGRAMS SECTION
   ========================================================================== */

.programs-section {
  padding: 100px 0 80px;
  background-color: var(--white);
}

/* Encabezado — usa .section-title y .section-lead */

/* ── Lista de programas ── */
.programs-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 72px;
}

/* ── Tarjeta horizontal ── */
.program-card-h {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  background-color: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 16px;
  padding: 32px 28px;
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
  align-items: center;
}

.program-card-h:hover {
  box-shadow: var(--shadow-md);
  border-color: transparent;
  transform: translateY(-4px);
}

/* ── Imagen / placeholder ── */
.program-card-h-img {
  flex-shrink: 0;
  width: 220px;
}

.program-img-placeholder {
  width: 100%;
  border: 2px dashed var(--neutral-200);
  border-radius: 16px;
  background-color: var(--neutral-100);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--neutral-400);
  font-size: 0.8rem;
  font-weight: 500;
  text-align: center;
  padding: 5px;
  transition: border-color var(--transition-base);
}

.program-img-placeholder i {
  font-size: 2.4rem;
  color: var(--neutral-200);
}

/* ── Cuerpo de texto ── */
.program-card-h-body {
  flex: 1;
  min-width: 0;
}

.program-card-h-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--neutral-900);
  margin-bottom: 12px;
  line-height: 1.35;
}

.program-card-h-text {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--neutral-600);
  margin-bottom: 0;
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
  .programs-section {
    padding: 72px 0 60px;
  }

  .program-card-h {
    flex-direction: column;
    gap: 20px;
  }

  .program-card-h-img {
    width: 100%;
  }

  .program-img-placeholder {
    aspect-ratio: 16 / 7;
  }
}

@media (max-width: 575.98px) {
  .programs-section {
    padding: 56px 0 48px;
  }

  .program-card-h {
    padding: 24px 20px;
  }
}

/* ==========================================================================
   RESEARCH PROJECTS SECTION
   ========================================================================== */

.projects-section {
  padding: 100px 0 80px;
  background-color: var(--neutral-100);
}

/* ── Layout principal ── */
.projects-main-row {
  align-items: flex-start;
}

/* ── Columna izquierda (título y descripción) ── */
.projects-left {
  position: sticky;
  top: calc(var(--navbar-height-sm) + 24px);
}

/* ── Columna derecha (lista de proyectos) ── */
.projects-right {
  /* natural flow */
}

/* ── Timeline de proyectos ── */
.projects-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Item individual de proyecto ── */
.project-item {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--neutral-200);
  transition: background-color var(--transition-base);
}

.project-item:first-child {
  padding-top: 0;
}

.project-item:last-child {
  border-bottom: none;
}

.project-item:hover {
  background-color: rgba(0, 113, 184, 0.02);
}

/* Año del proyecto */
.project-year {
  flex-shrink: 0;
  width: 110px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.4;
  padding-top: 2px;
}

/* Contenido del proyecto */
.project-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* Título del proyecto */
.project-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--neutral-900);
  line-height: 1.5;
  margin: 0;
}

/* Tag / etiqueta del proyecto */
.project-tag {
  font-size: 0.8rem;
  color: var(--neutral-600);
  line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .projects-section {
    padding: 72px 0 60px;
  }

  .projects-main-row {
    flex-direction: column;
    gap: 40px;
  }

  .projects-left {
    position: static;
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  .projects-section {
    padding: 64px 0 56px;
  }

  .project-item {
    flex-direction: column;
    gap: 12px;
    padding: 20px 0;
  }

  .project-year {
    width: 100%;
    padding-top: 0;
  }
}

@media (max-width: 575.98px) {
  .projects-section {
    padding: 56px 0 48px;
  }

  .projects-main-row {
    gap: 32px;
  }

  .project-item {
    padding: 16px 0;
  }
}

/* ==========================================================================
   SCIENTIFIC PUBLICATIONS SECTION
   ========================================================================== */

.publications-section {
  padding: 100px 0 80px;
  background-color: var(--white);
}

/* Lista de publicaciones */
.publications-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Tarjeta destacada ── */
.publication-card-featured {
  display: flex;
  align-items: stretch;
  gap: 0;

  background: linear-gradient(135deg, #f7fafc 0%, #f7fafc 50%, #f7fafc 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 113, 184, 0.24);
  transition: transform var(--transition-base), box-shadow var(--transition-slow);
}

.publication-card-featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 113, 184, 0.35);
}

/* ── Imagen ── */
.publication-img {
  flex-shrink: 0;
  width: 280px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.publication-img-placeholder {
  width: 100%;
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background-color: rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}

.publication-img-placeholder i {
  font-size: 2.2rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ── Contenido ── */
.publication-content {
  flex: 1;
  padding: 36px 40px 36px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Categoría */
.publication-category {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--neutral-600);
  margin: 0;
  line-height: 1.3;
}

/* Cita completa */
.publication-citation-full {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--neutral-600);
  margin: 0;
  font-style: italic;
}

/* Cita corta */
.publication-citation-short {
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* DOI row */
.publication-doi {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.doi-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 5px;
  text-transform: uppercase;
}

.doi-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--neutral-600);
  text-decoration: none;
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
  gap: 4px;
}

.doi-link:hover {
  color: var(--neutral-600);
  text-decoration: none;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .publications-section {
    padding: 72px 0 60px;
  }

  .publication-card-featured {
    flex-direction: column;
  }

  .publication-img {
    width: 100%;
    padding: 28px 28px 20px;
  }

  .publication-img-placeholder {
    aspect-ratio: 16 / 7;
  }

  .publication-content {
    padding: 20px 28px 32px;
  }
}

@media (max-width: 575.98px) {
  .publications-section {
    padding: 56px 0 48px;
  }

  .publication-img {
    padding: 24px 24px 16px;
  }

  .publication-content {
    padding: 16px 24px 28px;
  }
}

/* ==========================================================================
   BACK TO TOP BUTTON
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 50px;
  height: 50px;
  background-color: var(--brand);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 113, 184, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity var(--transition-base),
              visibility var(--transition-base),
              transform var(--transition-base),
              background-color var(--transition-base);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--brand-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 28px rgba(0, 113, 184, 0.45);
}

.back-to-top:active {
  transform: translateY(-1px);
}

@media (max-width: 767.98px) {
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 46px;
    height: 46px;
    font-size: 1.1rem;
  }
}


/* Logo primario visible, secundario oculto por defecto */
.navbar-logo.primary-logo {
  opacity: 1;
  transform: scale(1);
  transition: opacity var(--transition-base), transform var(--transition-base);
  position: absolute;
}

.navbar-logo.secondary-logo {
  opacity: 0;
  transform: scale(1.3);
  transition: opacity var(--transition-base), transform var(--transition-base);

  pointer-events: none;
}

/* Cuando la navbar tiene la clase scrolled, invertir */
#main-navbar.navbar-scrolled .navbar-logo.primary-logo {
  opacity: 0;

  pointer-events: none;
}

#main-navbar.navbar-scrolled .navbar-logo.secondary-logo {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
