/* =====================================================
   HEUMA — Design System & Theme
   WordPress-Compatible Theme Structure
   ===================================================== */

/* ── CSS Custom Properties ────────────────────────── */
:root {
    /* Logo-derived palette */
    --gold: #D4A843;
    --gold-light: #E8C972;
    --gold-dark: #B88E2F;
    --teal: #008073;
    --teal-light: #00A393;
    --teal-dark: #006259;
    --brown: #8B3A1A;
    --brown-light: #A84E2A;
    --brown-dark: #6D2D14;

    /* Backgrounds */
    --bg-ivory: #FFFFF0;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F8F7F2;
    --bg-muted: #F0EDE4;
    --bg-dark: #1E2328;
    --bg-dark-lighter: #2A3038;

    /* Text */
    --text-primary: #1E2328;
    --text-secondary: #4A5568;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --text-on-dark: #F0EDE4;
    --text-on-dark-muted: #9CA3AF;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Sizes */
    --container-max: 1200px;
    --container-wide: 1400px;
    --header-height: 80px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(30, 35, 40, 0.06);
    --shadow-md: 0 4px 12px rgba(30, 35, 40, 0.08);
    --shadow-lg: 0 12px 32px rgba(30, 35, 40, 0.12);
    --shadow-xl: 0 20px 48px rgba(30, 35, 40, 0.16);
    --shadow-gold: 0 8px 24px rgba(212, 168, 67, 0.2);
    --shadow-teal: 0 8px 24px rgba(0, 128, 115, 0.2);

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ── Reset & Base ─────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-ivory);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--gold);
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

/* ── Utility ──────────────────────────────────────── */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ── Reveal Animation ─────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   HEADER
   ===================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all var(--transition-base);
    background: var(--teal-dark);
    border-bottom: 1px solid rgba(0, 128, 115, 0.3);
}

.header.scrolled {
    background: #004D44;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border-bottom-color: rgba(0, 128, 115, 0.5);
}

.header__container {
    max-width: var(--container-wide);
    margin: 0 auto;
    padding: 0 var(--space-xl);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    text-decoration: none;
    flex-shrink: 0;
}

.header__logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.header__logo-icon {
    position: relative;
    width: 44px;
    height: 36px;
}

.logo-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
}

.logo-dot--1 {
    top: 0;
    left: 8px;
}

.logo-dot--2 {
    top: 0;
    left: 20px;
}

.logo-dot--3 {
    top: 0;
    left: 32px;
}

.logo-line {
    position: absolute;
    height: 3px;
    left: 0;
    width: 100%;
    border-radius: 2px;
}

.logo-line--teal {
    top: 16px;
    background: var(--teal);
}

.logo-line--brown {
    top: 24px;
    background: var(--brown);
}

.logo-line--light {
    top: 24px;
    background: rgba(255, 255, 255, 0.5);
}

.header__logo-text {
    display: flex;
    flex-direction: column;
}

.header__logo-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff;
    letter-spacing: 2px;
    line-height: 1;
}

.header__logo-title--light {
    color: #fff;
}

.header__logo-subtitle {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
}

.header__logo-subtitle--light {
    color: var(--text-on-dark-muted);
}

/* Nav Toggle (Mobile) */
.header__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    z-index: 1001;
}

.header__toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all var(--transition-base);
}

.header__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__toggle.active span:nth-child(2) {
    opacity: 0;
}

.header__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Navigation */
.nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.nav__item {
    position: relative;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav__link:hover,
.nav__link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

.nav__link .fa-chevron-down {
    font-size: 0.6rem;
    transition: transform var(--transition-fast);
}

.nav__item:hover .nav__link .fa-chevron-down {
    transform: rotate(180deg);
}

/* Submenu */
.nav__submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: var(--space-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-base);
    z-index: 100;
}

.nav__item:hover .nav__submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__submenu-link {
    display: block;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.nav__submenu-link:hover {
    background: rgba(0, 128, 115, 0.06);
    color: var(--teal);
    padding-left: calc(var(--space-md) + 4px);
}

/* =====================================================
   HERO CAROUSEL
   ===================================================== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--bg-dark);
}

.hero__slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__slide.active {
    opacity: 1;
}

.hero__slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transform: scale(1.05);
    transition: transform 8s ease;
}

.hero__slide.active .hero__slide-bg {
    transform: scale(1);
}

.hero__slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(30, 35, 40, 0.75) 0%,
            rgba(30, 35, 40, 0.4) 50%,
            rgba(0, 128, 115, 0.3) 100%);
    z-index: 1;
}

.hero__content {
    position: absolute;
    z-index: 2;
    text-align: right;
    max-width: 700px;
    width: 100%;
    padding: var(--space-xl);
    animation: heroContentIn 1s ease 0.3s both;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    bottom: 80px;
    right: 60px;
    left: auto;
    top: auto;
}

@keyframes heroContentIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    line-height: 1.1;
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--space-2xl);
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-2xl);
    background: var(--gold);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-gold);
}

.hero__cta:hover {
    background: var(--gold-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(212, 168, 67, 0.35);
}

/* Hero Controls */
.hero__controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    z-index: 10;
    pointer-events: none;
}

.hero__btn {
    pointer-events: auto;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__btn:hover {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.1);
}

/* Hero Dots */
.hero__dots {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-sm);
    z-index: 10;
}

.hero__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: all var(--transition-base);
}

.hero__dot.active {
    background: var(--gold);
    border-color: var(--gold);
    transform: scale(1.2);
}

/* Scroll Indicator */
.hero__scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(10px);
    }
}

/* =====================================================
   SECTIONS — Common
   ===================================================== */
.section {
    padding: var(--space-5xl) 0;
    background: var(--bg-ivory);
}

.section--ejes,
.section--programs {
    background: var(--bg-subtle);
}

.section__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section__badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-lg);
    background: var(--teal);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: var(--space-lg);
}

.section__title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
    position: relative;
    display: inline-block;
}

.section__title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--gold));
    border-radius: 2px;
}

.section__subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: var(--space-lg) auto 0;
    line-height: 1.6;
}

/* =====================================================
   ABOUT Section
   ===================================================== */
.about__content {
    max-width: 800px;
    margin: 0 auto var(--space-3xl);
}

.about__text {
    font-size: 1.08rem;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: center;
}

.about__highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.highlight-card {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid rgba(212, 168, 67, 0.1);
}

.highlight-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

.highlight-card__icon {
    font-size: 2rem;
    color: var(--teal);
    margin-bottom: var(--space-md);
}

.highlight-card__value {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold-dark);
    margin-bottom: var(--space-xs);
}

.highlight-card__label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* =====================================================
   EJES ESTRATÉGICOS
   ===================================================== */
.ejes__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.eje-card {
    position: relative;
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.eje-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(0, 128, 115, 0.2);
}

.eje-card__header-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
}

.eje-card__header-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.05));
}

.eje-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.eje-card:hover .eje-card__img {
    transform: scale(1.1);
}

.eje-card__content {
    padding: var(--space-xl);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.eje-card__title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.eje-card__subtitle {
    font-size: 0.85rem;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.eje-card__description {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* =====================================================
   INICIATIVAS
   ===================================================== */
.iniciativas__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.iniciativa-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    text-decoration: none;
    border: 1px solid transparent;
    align-items: center;
    text-align: center;
}

.iniciativa-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(212, 168, 67, 0.2);
}

.iniciativa-card__image {
    width: 100%;
    max-width: 200px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto;
}

.iniciativa-card__logo-wrap {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: var(--bg-subtle);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.iniciativa-card__logo {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform var(--transition-base);
}

.iniciativa-card:hover .iniciativa-card__logo {
    transform: scale(1.05);
}

.iniciativa-card__icon-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    transition: all var(--transition-base);
}

.iniciativa-card:hover .iniciativa-card__icon-wrap {
    transform: rotate(-5deg) scale(1.05);
}

.iniciativa-card__content {
    flex: 1;
}

.iniciativa-card__tag {
    display: inline-block;
    padding: 2px var(--space-sm);
    background: rgba(0, 128, 115, 0.08);
    color: var(--teal);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    margin-bottom: var(--space-sm);
}

.iniciativa-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.iniciativa-card__desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* =====================================================
   PROGRAMS (Educación Continua)
   ===================================================== */
.programs__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.program-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-base);
    border-top: 5px solid var(--teal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.program-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.program-card__header {
    padding: var(--space-xl);
    text-align: center;
    background: var(--bg-subtle);
}

.program-card__icon {
    font-size: 2.2rem;
    color: var(--teal);
    margin-bottom: var(--space-sm);
}

.program-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--teal);
}

.program-card__desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: var(--space-xs);
}

.program-card__body {
    padding: var(--space-xl);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.program-card__institution {
    margin-bottom: var(--space-lg);
}

.program-card__institution:last-child {
    margin-bottom: 0;
}

.program-card__inst-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.program-card__inst-name i {
    color: var(--teal);
}

.program-card__list {
    padding-left: var(--space-lg);
}

.program-card__list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.8;
    position: relative;
    list-style: none;
}

.program-card__list li::before {
    content: '▸';
    position: absolute;
    left: -1rem;
    color: var(--teal);
    font-weight: bold;
}

/* =====================================================
   NEWS
   ===================================================== */
.news__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.news-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    text-decoration: none;
    display: block;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.news-card__image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.news-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(30, 35, 40, 0.6));
}


.news-card__category {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: 4px var(--space-md);
    background: var(--gold);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    z-index: 1;
}

.news-card__body {
    padding: var(--space-xl);
}

.news-card__date {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: var(--space-sm);
}

.news-card__title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-md);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--teal);
    transition: all var(--transition-fast);
}

.news-card__link:hover {
    gap: var(--space-sm);
    color: var(--gold);
}

/* =====================================================
   CONCURSOS
   ===================================================== */
.concursos__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.concurso-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl);
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    text-decoration: none;
    border-left: 4px solid var(--teal);
}

.concurso-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
    border-left-color: var(--gold);
}

.concurso-card__status {
    flex-shrink: 0;
    padding: 4px var(--space-md);
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.concurso-card__status--abierto {
    background: rgba(0, 128, 115, 0.1);
    color: var(--teal);
}

.concurso-card__status--cerrado {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-light);
}

.concurso-card__content {
    flex: 1;
}

.concurso-card__title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.concurso-card__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.concurso-card__arrow {
    flex-shrink: 0;
    color: var(--text-light);
    transition: all var(--transition-fast);
}

.concurso-card:hover .concurso-card__arrow {
    color: var(--gold);
    transform: translateX(4px);
}

/* =====================================================
   PARTNERS
   ===================================================== */
.section--partners {
    background: var(--bg-subtle);
}

.partners__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    align-items: center;
    justify-items: center;
}

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    width: 100%;
    height: 90px;
    text-decoration: none;
}

.partner-logo:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.partner-logo__img {
    max-width: 140px;
    max-height: 55px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(30%);
    opacity: 0.85;
    transition: all var(--transition-base);
}

.partner-logo:hover .partner-logo__img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Light-background logos (Séché, Arcadis) need white bg */
.partner-logo--white-bg {
    background: #fff;
    padding: var(--space-md);
    height: 110px;
    /* Increased from 90px */
}

.partner-logo--white-bg .partner-logo__img {
    max-width: 180px;
    /* Increased from 160px */
    max-height: 80px;
    /* Increased from 60px */
    filter: none;
    opacity: 1;
}

/* =====================================================
   PAGE HERO (Global for Subpages)
   ===================================================== */
.page-hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    background: var(--teal-dark);
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.page-hero__badge {
    display: inline-block;
    padding: 4px 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.page-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}

.page-hero__subtitle {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto;
}

.footer {
    background: var(--bg-dark);
    border-top: 4px solid var(--teal);
    color: #fff;
    padding: var(--space-4xl) 0 var(--space-xl);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.footer__logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(10);
}

.footer__description {
    font-size: 0.92rem;
    color: var(--text-on-dark-muted);
    line-height: 1.7;
}

.footer__heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer__contact-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-on-dark-muted);
}

.footer__contact-list li i {
    color: var(--gold);
    margin-top: 3px;
    width: 16px;
    flex-shrink: 0;
}

.footer__social-links {
    display: flex;
    gap: var(--space-md);
}

.footer__social-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-dark-muted);
    font-size: 1.1rem;
    transition: all var(--transition-base);
    text-decoration: none;
}

.footer__social-link:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    transform: translateY(-3px);
}

.footer__bottom {
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer__copyright {
    font-size: 0.82rem;
    color: var(--text-on-dark-muted);
}

/* =====================================================
   BACK TO TOP
   ===================================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-teal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--gold);
    box-shadow: var(--shadow-gold);
    transform: translateY(-4px);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1024px) {
    .about__highlights {
        grid-template-columns: repeat(2, 1fr);
    }

    .ejes__grid,
    .programs__grid,
    .news__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .header__toggle {
        display: flex;
    }

    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: var(--bg-surface);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        overflow-y: auto;
        padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-xl);
        z-index: 1000;
    }

    .header__nav.open {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav__link {
        padding: var(--space-md);
        font-size: 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        color: var(--text-primary);
    }

    .nav__link:hover,
    .nav__link.active {
        color: var(--teal);
        background: rgba(0, 128, 115, 0.06);
    }

    .nav__submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: var(--space-lg);
        display: none;
        background: transparent;
    }

    .nav__item.submenu-open .nav__submenu {
        display: block;
    }

    .about__highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .iniciativas__grid {
        grid-template-columns: 1fr;
    }

    .hero__content {
        bottom: 80px;
        right: 20px;
        padding: var(--space-lg);
    }
}

@media (max-width: 640px) {

    .ejes__grid,
    .programs__grid,
    .news__grid {
        grid-template-columns: 1fr;
    }

    .iniciativas__grid {
        grid-template-columns: 1fr;
    }

    .concursos__grid {
        grid-template-columns: 1fr;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .partners__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .partner-logo {
        padding: var(--space-md);
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    .hero__controls {
        padding: 0 var(--space-md);
    }

    .hero__btn {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .about__highlights {
        grid-template-columns: 1fr;
    }

    .iniciativa-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero__dots {
        bottom: 60px;
    }
}

/* ── Mobile nav overlay ─────────────────────────── */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.nav-overlay.visible {
    opacity: 1;
    visibility: visible;
}