/* =========================================================
   IFPA 2027 · XII SLIMP
   Global styles — clean homepage foundation
   ========================================================= */

:root {
    --cream: #F7E8D2;
    --cream-light: #FFF9F0;
    --blue: #102653;
    --terracotta: #963F30;
    --gold: #D6B15E;
    --green: #213A2E;
    --green-dark: #213A2E;
    --ink: #28312C;
    --white: #FFFFFF;
    --content-width: 1200px;
    --page-gutter: clamp(1rem, 4vw, 3.5rem);
    --shadow-soft: 0 12px 32px rgba(39, 43, 35, 0.12);
}

/* Reset and document defaults */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream-light);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
}

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

a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.main-portal {
    min-height: 100vh;
    background-color: var(--cream-light);
}

/* The illustration sits behind the complete homepage content area.
   The header and footer keep their own solid colors above it. */
main {
    position: relative;
    isolation: isolate;
    background-color: var(--cream);
    background-image: url("images/fondo.png");
    background-repeat: no-repeat;
    background-position: center top;
    /* Preserve the illustration's proportions; do not stretch it vertically. */
    background-size: 2000px auto;
}

/* HEADER AND NAVIGATION */
.site-header {
    position: relative;
    z-index: 20;
    width: 100%;
    background: var(--green-dark);
    color: var(--white);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.site-header nav {
    width: 100%;
    min-height: 68px;
    margin: 0 auto;
    padding: 0 clamp(0.35rem, 1.2vw, 1.1rem);
    display: flex;
    flex-flow: row nowrap;
    align-items: stretch;
    justify-content: flex-end;
    gap: 0.1rem;
    overflow-x: visible;
    scrollbar-width: thin;
    border-bottom: 4px solid var(--gold);
}

.site-header nav > a,
.site-header .dropdown-trigger,
.site-header .lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    flex: 0 0 auto;
    padding: 0.85rem clamp(0.28rem, 0.55vw, 0.65rem);
    border: 0;
    border-bottom: 3px solid transparent;
    color: var(--white);
    background: transparent;
    text-decoration: none;
    text-align: left;
    justify-content: flex-start;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(0.72rem, 0.78vw, 0.9rem);
    font-weight: 750;
    line-height: 1.25;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.site-header nav > a:hover,
.site-header .dropdown-trigger:hover,
.site-header nav > a:focus-visible,
.site-header .dropdown-trigger:focus-visible {
    background: var(--gold);
    color: var(--green-dark);
    border-bottom-color: var(--cream-light);
}

.site-header nav > a.active,
.site-header .nav-dropdown > .dropdown-trigger[aria-expanded="true"] {
    border-bottom-color: var(--gold);
}

.nav-dropdown {
    position: relative;
    display: flex;
    align-items: stretch;
}

.site-header .dropdown-trigger {
    gap: 0.25rem;
    white-space: nowrap;
}

.dropdown-arrow { flex: 0 0 auto; font-size: 0.75em; }

.dropdown-menu {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 220px;
    padding: 0.45rem 0;
    background: var(--green-dark);
    box-shadow: var(--shadow-soft);
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu,
.nav-dropdown.is-open .dropdown-menu { display: block; }

.dropdown-menu a {
    display: block;
    padding: 0.7rem 1rem;
    color: var(--white);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.35;
}

.dropdown-menu a:hover,
.dropdown-menu a:focus-visible { background: rgba(255, 255, 255, 0.12); }
.menu-toggle { display: none; }

.site-header .lang-btn {
    align-self: center;
    min-height: 36px;
    margin: 0.5rem 0 0.5rem 0.25rem;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 3px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.site-header .lang-btn:hover,
.site-header .lang-btn:focus-visible {
    color: var(--green-dark);
    background: var(--cream);
}

/* HOMEPAGE HERO
   fondo.png is used here once as a CSS background. It is not an HTML image. */
.conference-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: clamp(380px, 37vw, 560px);
    padding: clamp(1.5rem, 3vw, 2.8rem) var(--page-gutter) clamp(0.6rem, 1vw, 1rem);
    background: transparent;
    padding-top: clamp(11.6rem, 14vw, 13rem);
}

.hero-layout {
    position: relative;
    z-index: 1;
    width: min(100%, 1260px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 0.92fr) minmax(0, 1.15fr) minmax(0, 0.95fr);
    align-items: start;
    justify-content: center;
    column-gap: clamp(1rem, 2vw, 1.85rem);
    row-gap: 0.25rem;
}

.hero-brand-copy,
.hero-copy,
.hero-logo-wrap {
    min-width: 0;
    width: 100%;
    margin: 0 auto;
    text-align: center;
    color: var(--green-dark);
    text-shadow: 0 1px 0 rgba(255, 249, 240, 0.3);
}

.hero-brand-copy {
    grid-column: 2 / 4;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 0.8rem;
}

.hero-heading-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    row-gap: 1rem;
    width: 100%;
    max-width: 52rem;
}

.hero-title,
.hero-subtitle {
    margin: 0;
    color: var(--blue);
    font-family: Georgia, "Times New Roman", "Palatino Linotype", serif;
    font-style: italic;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: 0.01em;
    text-wrap: balance;
    text-align: left;
}

.hero-title {
    font-size: clamp(2rem, 3.2vw, 3.2rem);
}

.hero-subtitle {
    color: #183A70;
    font-family: Aptos, Arial, Helvetica, sans-serif;
    font-style: normal;
    font-size: clamp(1.55rem, 2.15vw, 2.15rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
}

.hero-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    padding: 0.9rem clamp(0.75rem, 1.5vw, 1.5rem) 0 0;
    border-right: 0;
    grid-column: 1;
    grid-row: 1 / span 2;
}

.hero-logo {
    display: block;
    width: min(100%, 330px);
    max-width: 330px;
    max-height: 330px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.section-ornament,
.footer-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-ornament span,
.footer-decoration span {
    display: block;
    height: 1px;
    flex: 1 1 auto;
    background: currentColor;
}

.hero-copy {
    grid-column: 2 / 4;
    grid-row: 2;
    width: min(100%, 900px);
    margin: 0.15rem auto 0;
    padding: 0.25rem 0 0;
    border-top: 0;
    border-left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.6rem;
}

.hero-event-details {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-event-details p { margin: 0 0 0.5rem; }

.hero-venue,
.hero-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.detail-icon {
    width: 1.35em;
    height: 1.35em;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.venue-icon { color: var(--green); }
.date-icon { color: var(--terracotta); }

.hero-venue {
    font-size: clamp(1.3rem, 1.9vw, 1.8rem);
    font-weight: 700;
    line-height: 1.4;
}

.hero-location,
.hero-date {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    line-height: 1.45;
}

.hero-location {
    text-align: center;
}

.hero-date { margin-top: 0.65rem !important; color: var(--terracotta); font-weight: 700; }

.hero-actions {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0;
    border-left: 2px solid var(--gold);
    padding-left: clamp(1rem, 2vw, 1.8rem);
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    min-width: 182px;
    padding: 0.72rem 1rem;
    border: 2px solid var(--green);
    border-radius: 999px;
    font-size: clamp(0.85rem, 0.95vw, 0.96rem);
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: transform 160ms ease, background-color 160ms ease;
}

.hero-button:hover { transform: translateY(-2px); }
.hero-button-primary { color: var(--white); background: var(--green-dark); }
.hero-button-primary:hover { background: var(--green-dark); }
.hero-button-secondary { color: var(--green-dark); background: rgba(255, 249, 240, 0.9); }
.hero-button-secondary:hover { background: var(--cream-light); }

/* VENUE AND YUCATÁN IMAGE GALLERY */


.venue-showcase-container {
    width: min(100% - 2rem, 1250px);
    max-width: 1250px;
    height: clamp(280px, 32vw, 440px);
    margin: 0 auto;
    padding: 1.1rem 0 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 0.75rem;
}


.venue-main-card,
.photo-sub-card {
    overflow: hidden;
    min-width: 0;
    min-height: 0;
    border-radius: 5px;
    background: rgba(247, 232, 210, 0.18);
    box-shadow: var(--shadow-soft);
}

.venue-main-card img,
.photo-sub-card img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

.tourism-quad-grid {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: clamp(0.25rem, 0.65vw, 0.65rem);
}

.photo-sub-card img { transition: transform 250ms ease; }
.photo-sub-card:hover img { transform: scale(1.035); }


/* WELCOME SECTION */
.welcome {
    padding: clamp(1.2rem, 2.2vw, 1.8rem) var(--page-gutter) clamp(3rem, 5vw, 4.5rem);
    border-top: 0;
    background: transparent;
}

.section-inner {
    width: min(100%, 1250px);
    margin: 0 auto;
}

.section-title {
    margin-bottom: 0.8rem;
    text-align: center;
}

.section-ornament {
    width: min(280px, 65%);
    margin: 0 auto 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--gold);
}

.section-ornament span {
    flex: 1;
    height: 3px;
    background: var(--gold);
}

.section-ornament strong {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--gold);
}
}

.section-ornament strong {
    font-size: 1rem;
}

.section-title h2 {
    margin: 0;
    color: var(--green-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.25;
}

.welcome-text {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.5rem 0 0.75rem;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(0.95rem, 1.1vw, 1.08rem);
    line-height: 1.5;
    text-align: center;
}
/* Welcome message */
.welcome-text {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0.5rem 0 0.75rem;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    line-height: 1.6;
    text-align: center;
}

.welcome-text > p:first-child {
    margin: 0 auto 0.8rem;
    font-weight: 700;
}

/* Terracotta sentence in italics */
.welcome-text .poetic-highlight {
    max-width: 1200px;
    margin: 0 auto 0.35rem;
    color: #a6533d;
    font-family: "Times New Roman", Times, serif;
    font-size: clamp(1.2rem, 1.5vw, 1.4rem);
    font-style: italic;
    font-weight: 700;
    line-height: 1.5;
}


/* FOOTER */
.mexican-footer {
    padding: 1.5rem var(--page-gutter) 2rem;
    color: var(--white);
    background: var(--terracotta);
    border-top: 4px solid var(--gold);
}

.footer-decoration { width: min(180px, 45%); margin: 0 auto 1.4rem; color: rgba(255, 255, 255, 0.9); }
.footer-decoration strong { font-size: 0.85rem; }
.footer-inner { width: min(100%, var(--content-width)); margin: 0 auto; }

.footer-logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1.25rem, 4vw, 3.5rem);
}

.partner-logo { width: auto; max-width: min(180px, 35vw); max-height: 76px; object-fit: contain; }
.partner-logo.yucatan-dimension { max-width: min(210px, 40vw); }

/* TABLET: retain a clear two-column structure and place event details below */
@media (max-width: 1050px) and (min-width: 761px) {
    .site-header nav { gap: 0.02rem; padding-inline: 0.3rem; }
    .site-header nav > a,
    .site-header .dropdown-trigger { padding-inline: 0.24rem; font-size: 0.68rem; }

    .conference-hero { min-height: 0; padding-block: 2.8rem; padding-top: 10.8rem; }
    .hero-layout {
        max-width: 980px;
        grid-template-columns: minmax(190px, 0.9fr) minmax(0, 1.1fr) minmax(0, 0.9fr);
        gap: 0.9rem;
    }
    .hero-copy { gap: 0.9rem; width: min(100%, 760px); }
    .hero-title { font-size: clamp(1.7rem, 2.5vw, 2.4rem); }
    .hero-subtitle { font-size: clamp(1.25rem, 1.95vw, 1.9rem); }
    .hero-logo-wrap { padding-right: 0.85rem; }
    .hero-logo { width: min(100%, 245px); max-width: 245px; max-height: 245px; }
    .hero-actions { margin-top: 0; }
    .venue-showcase-container { grid-template-columns: 1fr 1fr; }
}

/* MOBILE NAVIGATION AND HERO */
@media (max-width: 760px) {
    .site-header { padding: 0.55rem var(--page-gutter); }
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.55rem;
        min-height: 44px;
        padding: 0.55rem 0.85rem;
        border: 1px solid rgba(255, 255, 255, 0.7);
        border-radius: 3px;
        color: var(--white);
        background: transparent;
        cursor: pointer;
    }
    .menu-icon { font-size: 1.25rem; line-height: 1; }

    .site-header nav {
        display: none;
        width: 100%;
        min-height: 0;
        margin-top: 0.55rem;
        padding: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .venue-name {
    white-space: nowrap;
    }
    .conference-hero span[data-en="Yucatán International Congress Center (CIC)"] {
    white-space: nowrap;
    }
    .site-header nav.is-open { display: flex; }

    .site-header nav > a,
    .site-header .dropdown-trigger {
        width: 100%;
        min-height: 46px;
        justify-content: flex-start;
        padding: 0.75rem 0.8rem;
        border-bottom: 1px solid rgba(214, 177, 94, 0.55);
        font-weight: 750;
        text-align: left;
        font-size: 0.95rem;
    }
    .nav-dropdown { display: block; }
    .site-header .dropdown-trigger { justify-content: space-between; }
    .dropdown-menu {
        position: static;
        min-width: 0;
        padding: 0 0 0.35rem 0.8rem;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.12);
    }
    .dropdown-menu a { padding: 0.65rem 0.9rem; font-size: 0.9rem; }
    .site-header .lang-btn { align-self: flex-start; min-height: 40px; margin: 0.7rem 0; }

    .conference-hero {
        min-height: 0;
        padding: 2.6rem var(--page-gutter) 1.5rem;
        padding-top: 7.5rem;
        background: transparent;
    }
    .hero-layout {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
        gap: 1.25rem;
    }
    .hero-logo-wrap { grid-column: 1; grid-row: 1; padding: 0.2rem 0.75rem 0 0; border: 0; }
    .hero-brand-copy { grid-column: 2; grid-row: 1; transform: none; }
    .hero-copy { grid-column: 1 / -1; grid-row: 2; max-width: 620px; width: 100%; padding: 1rem 0 0; border-top: 0; border-left: 0; flex-direction: column; align-items: center; gap: 0.9rem; }
    .hero-title { font-size: clamp(1.45rem, 4.7vw, 2.25rem); white-space: normal; }
    .hero-subtitle { font-size: clamp(1.25rem, 3.8vw, 1.9rem); }
    .hero-heading-row { align-items: center; row-gap: 0.75rem; max-width: 100%; }
    .hero-logo { width: min(100%, 230px); max-width: 230px; max-height: 210px; }
    .hero-venue { font-size: 1.12rem; justify-content: center; }
    .hero-location, .hero-date { font-size: 1.08rem; text-align: center; justify-content: center; }
    .detail-icon { width: 1.2em; height: 1.2em; }
    .hero-actions { gap: 0.65rem; margin-top: 0.75rem; width: 100%; flex-direction: row; flex-wrap: wrap; justify-content: center; border-left: 0; padding-left: 0; }
    .hero-button { min-height: 44px; min-width: 0; padding: 0.65rem 0.9rem; font-size: 0.9rem; }

    .venue-showcase-container {
        height: auto;
        grid-template-columns: 1fr;
        gap: 0.5rem;
        margin: 0 auto 1.25rem;
        padding: 0.25rem var(--page-gutter) 0.75rem;
    }
    .welcome {padding-top: 1rem; padding-bottom: 3.5rem;}
    .section-title { margin-bottom: 1.25rem; }
    .venue-main-card { aspect-ratio: 16 / 9; }
    .tourism-quad-grid { grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 0.5rem; aspect-ratio: 1.5 / 1; }
    .footer-logos-row { gap: 1.2rem 1.5rem; }
    .partner-logo { max-width: 36vw; max-height: 62px; }
}

@media (max-width: 480px) {
    .conference-hero { padding-top: 6.8rem; padding-bottom: 1.25rem; }
    .hero-layout { grid-template-columns: 1fr; gap: 1.1rem; }
    .hero-logo-wrap { grid-column: 1; grid-row: 1; padding: 0 0 1rem; border: 0; }
    .hero-brand-copy { grid-column: 1; grid-row: 2; transform: none; }
    .hero-heading-row { align-items: center; row-gap: 0.7rem; }
    .hero-copy {
        grid-column: 1;
        grid-row: 3;
        width: 100%;
        padding: 1rem 0 0;
        border-top: 0;
        border-left: 0;
        flex-direction: column;
        align-items: center;
        gap: 0.9rem;
    }
    .hero-title { font-size: clamp(1.55rem, 6.8vw, 2.3rem); white-space: normal; text-align: center; }
    .hero-subtitle { font-size: clamp(1.3rem, 5.7vw, 1.9rem); text-align: center; }
    .hero-logo { width: min(70%, 245px); max-width: 245px; max-height: 225px; }
    .hero-actions { flex-direction: column; align-items: stretch; width: min(100%, 290px); margin-inline: auto; }
    .hero-button { width: 100%; }
    .tourism-quad-grid { gap: 0.35rem; aspect-ratio: 1.15 / 1; }
}

/* Accessibility: respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
/* HOMEPAGE - Decorative divider above the photos */
.photos-divider { display: none; }

.photos-divider span {
    flex: 1;
    height: 3px;
    background: var(--gold);
}

.photos-divider strong {
    font-size: 1.25rem;
    line-height: 1;
    color: var(--gold);
}
/* Fix: keep the closing ornament inside the welcome section */
.welcome {
    padding-bottom: 4rem !important;
}

.welcome-closing-ornament {
    display: flex;
    position: static;
    width: min(280px, 65%);
    margin: 1.5rem auto 0 !important;
    transform: none;
}

/* =========================================================
   MOBILE-ONLY FIXES — IFPA 2027
   Keep desktop styles unchanged.
   ========================================================= */
@media (max-width: 760px) {
    /* Ensure long venue names wrap instead of overflowing the viewport. */
    .venue-name,
    .conference-hero span[data-en="Yucatán International Congress Center (CIC)"],
    .hero-venue span {
        white-space: normal;
        overflow-wrap: break-word;
        min-width: 0;
    }
    .hero-venue { min-width: 0; }
    .hero-venue .detail-icon { flex-shrink: 0; }

    /* Keep the Maya illustration while giving the welcome text a readable surface. */
    .welcome-text {
        /* Blend welcome copy into the Maya background, with no inset panel. */
        background: transparent;
        border-radius: 0;
        padding: 1rem 0.85rem;
        text-shadow: 0 1px 2px rgba(252, 224, 190, 0.65);
    }

    /* On interior pages with a yellow mobile menu button, make text legible. */
    .site-header .menu-toggle,
    .site-header .menu-toggle .menu-icon,
    .site-header .menu-toggle span {
        color: var(--green) !important;
    }
}

/* Mobile: remove the pale rectangular frame around Menu. */
@media (max-width: 760px) {
    .site-header .menu-toggle {
        border: 0 !important;
        outline: 0;
        box-shadow: none !important;
    }
}

/* Unified mobile navigation: dark green bar, light Menu label. */
@media (max-width: 760px) {
    .site-header {
        background-color: var(--green) !important;
        color: #FFFFFF !important;
    }
    .site-header .menu-toggle {
        color: #FFFFFF !important;
        background: transparent !important;
        border: 0 !important;
        outline: 0;
        box-shadow: none !important;
    }
    .site-header .menu-toggle .menu-icon,
    .site-header .menu-toggle span {
        color: #FFFFFF !important;
    }
    .site-header nav { background-color: var(--green) !important; }
}

/* =========================================================
   INTERIOR PAGES ONLY — MOBILE CONGRESS BANNER
   Remove the green frame around the cream congress identity.
   Homepage (index.html) has no .conference-brand and is untouched.
   ========================================================= */
@media (max-width: 760px) {
    .site-header:has(> .conference-brand) {
        padding: 0 !important;
    }

    .site-header:has(> .conference-brand) > .menu-toggle {
        margin: 0.55rem var(--page-gutter);
    }

    .site-header:has(> .conference-brand) > nav {
        margin-top: 0 !important;
        width: 100%;
    }

    .site-header:has(> .conference-brand) > .conference-brand {
        width: 100%;
        margin: 0 !important;
        box-sizing: border-box;
    }
}

/* ==============================================================
   IFPA 2027 HOME — SINGLE AUTHORITATIVE HERO LAYOUT
   Overrides the historical hero rules above, without affecting
   menu, gallery, welcome section or footer.
   ============================================================== */
.conference-hero {
    min-height: 0;
    padding: clamp(9rem, 12vw, 11.5rem) var(--page-gutter) 1.5rem;
}
.conference-hero .hero-layout {
    width: min(100%, 1210px);
    display: grid;
    grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
    column-gap: clamp(1.5rem, 3vw, 2.5rem);
    row-gap: 0.2rem;
    align-items: start;
}
.conference-hero .hero-logo-wrap {
    grid-column: 1;
    grid-row: 1 / span 2;
    padding: 0.3rem 0 0;
    align-self: start;
}
.conference-hero .hero-logo {
    width: min(100%, 320px);
    max-width: 320px;
    max-height: 320px;
}
.conference-hero .hero-brand-copy {
    grid-column: 2;
    grid-row: 1;
    align-items: stretch;
    padding: 0.8rem 0 0;
    text-align: left;
}
.conference-hero .hero-heading-row {
    width: 100%;
    max-width: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(0.8rem, 1.5vw, 1.1rem);
    padding-left: clamp(1rem, 2vw, 1.5rem);
    border-left: 3px solid var(--gold);
}
/* IFPA title: serif italic, like the lettering above IFPA 2027 */
.conference-hero .hero-title {
    margin: 0;
    color: #203B7A;
    font-family: Baskerville, "Palatino Linotype", "Book Antiqua", Georgia, serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(2.05rem, 2.8vw, 2.75rem);
    line-height: 1.13;
    letter-spacing: -0.018em;
    white-space: normal;
    text-wrap: balance;
    text-align: left;
}
.conference-hero .ifpa-title-line { display: block; }
/* On narrow screens allow natural wrapping instead of enforcing two long lines. */
@media (max-width: 760px) {
    .conference-hero .ifpa-title-line { display: inline; }
}
/* SLIMP: explicitly upright sans serif, closer to XII SLIMP lettering in the logo */
.conference-hero .hero-subtitle {
    margin: 0;
    color: #263F7F;
    font-family: Aptos, Arial, Helvetica, sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: clamp(1.22rem, 1.68vw, 1.62rem);
    line-height: 1.25;
    letter-spacing: 0;
    text-wrap: balance;
    text-align: left;
}
.conference-hero .hero-copy {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    max-width: none;
    margin: 1.8rem 0 0;
    padding: 0;
    border: 0;  /* No horizontal divider above the venue */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(0.8rem, 2vw, 1.5rem);
}
.conference-hero .hero-event-details {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.conference-hero .hero-event-details p { margin-bottom: 0.4rem; }
.conference-hero .hero-venue,
.conference-hero .hero-date { justify-content: center; }
.conference-hero .hero-venue {
    font-size: clamp(1.25rem, 1.8vw, 1.55rem);
    font-weight: 700;
    line-height: 1.3;
}
.conference-hero .hero-location {
    font-size: clamp(1.2rem, 1.75vw, 1.5rem);
    line-height: 1.35;
    text-align: center;
}
.conference-hero .hero-date {
    font-size: clamp(1.25rem, 1.8vw, 1.55rem);
    line-height: 1.35;
    margin-top: 0 !important;
}
.conference-hero .hero-actions {
    position: static;
    transform: none;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.65rem;
    margin: 0;
    padding-left: clamp(1rem, 2vw, 1.5rem);
    border-left: 2px solid var(--gold); /* Vertical separator at buttons */
}
.conference-hero .hero-button {
    min-width: 158px;
    min-height: 43px;
    padding: 0.6rem 0.8rem;
    font-size: 0.83rem;
}
@media (max-width: 1050px) and (min-width: 761px) {
    .conference-hero { padding-top: 10rem; }
    .conference-hero .hero-layout { grid-template-columns: minmax(170px, 0.7fr) minmax(0, 2fr); }
    .conference-hero .hero-title { font-size: clamp(1.7rem, 3.05vw, 2.3rem); }
    .conference-hero .hero-subtitle { font-size: clamp(1.1rem, 1.9vw, 1.48rem); }
    .conference-hero .hero-copy { flex-wrap: wrap; justify-content: center; }
    .conference-hero .hero-actions { flex-direction: row; border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
    .conference-hero { padding-top: 5rem; }
    .conference-hero .hero-layout {
        grid-template-columns: minmax(110px, 0.75fr) minmax(0, 1.5fr);
        gap: 1rem;
    }
    .conference-hero .hero-logo-wrap { grid-column: 1; grid-row: 1; }
    .conference-hero .hero-brand-copy { grid-column: 2; grid-row: 1; padding: 0; }
    .conference-hero .hero-title { font-size: clamp(1.45rem, 4.1vw, 2rem); }
    .conference-hero .hero-subtitle { font-size: clamp(1.02rem, 2.7vw, 1.3rem); }
    .conference-hero .hero-copy { grid-column: 1 / -1; grid-row: 2; flex-direction: column; gap: 0.8rem; margin-top: 1.3rem; }
    .conference-hero .hero-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; border-left: 0; padding-left: 0; }
    .conference-hero .hero-venue { font-size: 1.16rem; }
    .conference-hero .hero-location, .conference-hero .hero-date { font-size: 1.13rem; }
}
@media (max-width: 480px) {
    .conference-hero .hero-layout { grid-template-columns: 1fr; }
    .conference-hero .hero-logo-wrap { grid-column: 1; grid-row: 1; }
    .conference-hero .hero-brand-copy { grid-column: 1; grid-row: 2; }
    .conference-hero .hero-heading-row { padding-left: 0.8rem; }
    .conference-hero .hero-title { font-size: clamp(1.65rem, 6.5vw, 2.1rem); }
    .conference-hero .hero-subtitle { font-size: clamp(1.05rem, 4.5vw, 1.32rem); }
    .conference-hero .hero-copy { grid-column: 1; grid-row: 3; }
    .conference-hero .hero-actions { width: min(100%, 300px); flex-direction: column; }
}

/* Homepage: consistent centered venue in both languages, including long Spanish name. */
@media (min-width: 1100px) {
    .conference-hero .hero-event-details { min-width: 0; }
    .conference-hero .hero-venue {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        font-size: clamp(1.1rem, 1.45vw, 1.35rem);
        gap: 0.4rem;
        white-space: nowrap;
    }
    .conference-hero .hero-venue span {
        white-space: nowrap;
        overflow-wrap: normal;
    }
}
@media (max-width: 1099px) {
    .conference-hero .hero-venue {
        display: grid;
        grid-template-columns: 1.35em minmax(0, 1fr) 1.35em;
        align-items: center;
        justify-items: center;
        gap: 0.35rem;
        width: 100%;
    }
    .conference-hero .hero-venue .detail-icon { grid-column: 1; }
    .conference-hero .hero-venue span {
        grid-column: 2;
        text-align: center;
        white-space: normal;
        overflow-wrap: normal;
    }
}

/* IFPA 2027 — color coordinado con el título del CIC.
   Colocado al final para prevalecer sobre reglas anteriores. */
.site-header,
.site-header nav,
.site-header nav.is-open { background-color: var(--green) !important; }
.hero-button-primary,
.hero-button-primary:hover,
.hero-button-primary:focus-visible {
    background-color: var(--green) !important;
    border-color: var(--green) !important;
    color: #FFFFFF;
}
.hero-button-secondary { border-color: var(--green) !important; color: var(--green); }
.hero-venue { color: var(--green); }
@media (max-width: 760px) {
    .site-header, .site-header nav, .site-header nav.is-open {
        background-color: var(--green) !important;
    }
}

/* Unificación final: verde de referencia del CIC para toda la identidad verde. */
.conference-hero .hero-venue,
.conference-hero .hero-location,
.conference-hero .venue-icon { color: var(--green) !important; }
.site-header, .site-header nav, .site-header nav.is-open,
.site-header .dropdown-menu { background-color: var(--green) !important; }
.hero-button-primary, .hero-button-primary:hover,
.hero-button-primary:focus-visible { background-color: var(--green) !important; border-color: var(--green) !important; }
.hero-button-secondary { color: var(--green) !important; border-color: var(--green) !important; }

/* ================================================================
   FINAL — Identidad cromática tomada del título CIC de la captura.
   Verde seco de referencia: RGB(33,58,46) = #213A2E.
   El nombre de IFPA en azul marino más oscuro: #102653.
   ================================================================ */
:root { --green: #213A2E; --green-dark: #213A2E; --blue: #102653; }
.site-header,
.site-header nav,
.site-header nav.is-open,
.site-header .dropdown-menu {
    background: #213A2E !important;
    background-color: #213A2E !important;
}
.conference-hero .hero-venue,
.conference-hero .hero-venue span,
.conference-hero .hero-location,
.conference-hero .venue-icon { color: #213A2E !important; }
.conference-hero .hero-button-primary,
.conference-hero .hero-button-primary:hover,
.conference-hero .hero-button-primary:focus-visible {
    background: #213A2E !important;
    background-color: #213A2E !important;
    border-color: #213A2E !important;
    color: #FFFFFF !important;
}
.conference-hero .hero-button-secondary,
.conference-hero .hero-button-secondary:hover,
.conference-hero .hero-button-secondary:focus-visible {
    border-color: #213A2E !important;
    color: #213A2E !important;
}
.conference-hero .hero-title { color: #102653 !important; }
@media (max-width: 760px) {
    .site-header, .site-header nav, .site-header nav.is-open { background-color: #213A2E !important; }
}

/* Shared desktop/tablet navigation — index and interior pages */
@media (min-width: 1051px) {
  .site-header nav > a,
  .site-header .dropdown-trigger {
    font-size: clamp(0.84rem, 0.86vw, 0.99rem);
    padding-inline: clamp(0.2rem, 0.43vw, 0.55rem);
  }
}
@media (min-width: 761px) and (max-width: 1050px) {
  .site-header nav > a,
  .site-header .dropdown-trigger {
    font-size: 0.73rem;
    padding-inline: 0.16rem;
  }
}


/* IFPA homepage: latest update occupies the ORIGINAL hero button area.
   No change to main illustration, welcome section, glyphs or footer. */
.conference-hero .hero-actions.hero-news {
    flex: 0 1 270px;
    width: min(270px, 100%);
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .45rem;
    padding-left: clamp(.95rem, 1.5vw, 1.3rem);
    border-left: 2px solid var(--gold);
    margin: 0;
    text-align: left;
}
.hero-news-badge-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    margin-bottom: .1rem;
}
.hero-news-section {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-height: 27px;
    padding: .28rem .72rem;
    border-radius: 6px;
    background: #CF252F;
    color: #fff;
    text-align: center;
    font: 800 .82rem/1.1 Arial, Helvetica, sans-serif;
    letter-spacing: .045em;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(101, 18, 22, .17);
}
/* A narrow, moving reflection — no blinking, scaling or moving the label. */
.hero-news-section::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: -90%;
    bottom: -90%;
    left: -75%;
    width: 42%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.08) 18%, rgba(255,255,255,.72) 50%, rgba(255,255,255,.08) 82%, transparent);
    transform: skewX(-22deg) translateX(0);
    animation: ifpaUpdatesShine 3s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes ifpaUpdatesShine {
    0% { left: -75%; }
    100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-news-section::after { animation: none; display: none; }
}
.hero-news-date {
    display: block;
    margin: 0;
    font: 700 1.03rem/1.25 Arial, Helvetica, sans-serif;
    color: #754C3C;
}
.hero-news-headline {
    margin: 0;
    color: #213A2E;
    font: 700 clamp(1rem, 1.14vw, 1.14rem)/1.36 Arial, Helvetica, sans-serif;
}
.hero-news-link {
    color: #963F30;
    font: 700 .92rem/1.4 Arial, Helvetica, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.hero-news-link:hover,
.hero-news-link:focus-visible { color: #6e2e23; }
.conference-hero .hero-news[hidden] { display: none !important; }
@media(max-width:1050px) {
    .conference-hero .hero-actions.hero-news {
        width: min(100%, 290px);
        flex: 0 1 290px;
        align-items: flex-start;
        text-align: left;
        border-left: 2px solid var(--gold);
        padding-left: 1rem;
    }
}
@media(max-width:760px) {
    .conference-hero .hero-actions.hero-news {
        width: min(100%, 360px);
        flex: 0 1 auto;
        align-items: center;
        text-align: center;
        border-left: 0;
        border-top: 2px solid var(--gold);
        padding: 1rem 0 0;
        margin: .25rem auto 0;
    }
    .hero-news-badge-row { justify-content: center; }
    .hero-news-date { font-size: 1.07rem; }
}
@media(max-width:420px) {
    .hero-news-section { font-size: .78rem; }
    .hero-news-headline { font-size: 1rem; }
}

/* Homepage: understated countdown beneath the conference date.
   Keep the original Maya background and all other section layouts intact. */
.conference-hero .hero-countdown {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .4rem;
  margin: -.1rem 0 .45rem;
  color: #213A2E;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(.88rem, 1.05vw, 1rem);
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
}
.conference-hero .countdown-days {
  color: #963F30;
  font-size: clamp(1.1rem, 1.35vw, 1.3rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* IFPA 2027: interactive venue and Yucatán images. Scoped to photo gallery only. */
.venue-showcase-container .photo-link {
  position: relative;
  display: block;
  isolation: isolate;
  cursor: pointer;
  text-decoration: none;
}
.venue-showcase-container .photo-link img {
  transition: transform 300ms ease;
}
.venue-showcase-container .photo-link:hover img,
.venue-showcase-container .photo-link:focus-visible img {
  transform: scale(1.035);
}
.venue-showcase-container .photo-link:focus-visible {
  outline: 3px solid #D6B15E;
  outline-offset: 3px;
}
.venue-showcase-container .photo-hover-label {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .65rem .85rem;
  color: #fff;
  background: linear-gradient(to top, rgba(24,45,34,.92), rgba(24,45,34,.76));
  font: 700 clamp(.82rem, 1.1vw, 1.04rem)/1.3 Arial, Helvetica, sans-serif;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}
.venue-showcase-container .photo-link:hover .photo-hover-label,
.venue-showcase-container .photo-link:focus-visible .photo-hover-label {
  opacity: 1;
  transform: translateY(0);
}
@media (hover: none) {
  .venue-showcase-container .photo-hover-label {
    opacity: 1;
    transform: none;
    min-height: 34px;
    padding: .35rem .5rem;
    font-size: clamp(.69rem, 2.4vw, .88rem);
  }
}
@media (prefers-reduced-motion: reduce) {
  .venue-showcase-container .photo-link img,
  .venue-showcase-container .photo-hover-label { transition: none; }
}

/* IFPA 2027 — mobile-only refinements (desktop unchanged).
   Touch devices: photo captions remain accessible through link aria-labels,
   but do not permanently cover the actual photographs. */
@media (hover: none) and (pointer: coarse) {
  .venue-showcase-container .photo-hover-label,
  .venue-showcase-container .photo-link:hover .photo-hover-label {
    opacity: 0 !important;
    transform: translateY(6px) !important;
    visibility: hidden;
  }
  .venue-showcase-container .photo-link:active .photo-hover-label,
  .venue-showcase-container .photo-link:focus-visible .photo-hover-label {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible;
  }
  .venue-showcase-container .photo-link:hover img {transform: none;}
}
@media (max-width: 600px) {
  .conference-hero { padding-top: 1.75rem !important; padding-bottom: 1.1rem; }
  .conference-hero .hero-layout { grid-template-columns: 1fr !important; row-gap: .9rem; }
  .conference-hero .hero-logo-wrap {grid-column: 1 !important; grid-row: 1 !important; padding: 0;}
  .conference-hero .hero-logo {width: min(76vw, 270px); max-height: none; margin-inline: auto;}
  .conference-hero .hero-brand-copy {grid-column: 1 !important; grid-row: 2 !important; padding: 0;}
  .conference-hero .hero-heading-row {padding-left: .85rem; gap: .65rem;}
  .conference-hero .hero-title {font-size: clamp(1.38rem, 5.6vw, 1.8rem) !important; line-height: 1.16;}
  .conference-hero .hero-subtitle {font-size: clamp(.98rem, 3.5vw, 1.15rem) !important; line-height: 1.35;}
  .conference-hero .hero-copy {grid-column: 1 !important; grid-row: 3 !important; margin-top: .5rem; gap: .65rem;}
  .conference-hero .hero-date {font-size: clamp(1rem, 3.8vw, 1.17rem);}
  .conference-hero .hero-venue {font-size: clamp(1rem, 3.8vw, 1.16rem);}
  .conference-hero .hero-location {font-size: clamp(1rem, 3.7vw, 1.13rem);}
  .conference-hero .hero-countdown {margin-top: .1rem;}
  .conference-hero .hero-actions.hero-news {width: min(100%, 330px);}
  .welcome {padding-top: 1.1rem; padding-bottom: 2rem;}
  .welcome .section-title h2 {font-size: clamp(1.6rem, 6vw, 2.1rem); line-height: 1.18;}
  .welcome .welcome-text {font-size: 1rem; line-height: 1.58; padding: .8rem .7rem;}
  .welcome .welcome-text .poetic-highlight {font-size: 1.04rem; line-height: 1.5;}
  .venue-showcase-container {margin-top: .9rem;}
}

/* IFPA 2027 — align the homepage mobile Menu control in the center,
   matching the internal pages. Does not affect the opened navigation. */
@media (max-width: 760px) {
  .site-header:not(:has(> .conference-brand)) > .menu-toggle {
    display: flex;
    width: max-content;
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
    justify-content: center;
    align-items: center;
  }
}

/* IFPA 2027 — MOBILE WELCOME: a full-width, feathered transition.
   No small box behind the paragraphs; the Maya artwork softly fades
   into the same cream background used by the rest of the page. */
@media (max-width: 760px) {
  .welcome {
    position: relative;
    isolation: isolate;
    background: transparent !important;
  }
  .welcome::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
      rgba(247, 232, 210, 0) 0,
      rgba(247, 232, 210, .55) 75px,
      rgba(247, 232, 210, .92) 165px,
      #F7E8D2 260px);
  }
  .welcome > .section-inner {
    position: relative;
    z-index: 1;
  }
  .welcome .welcome-text {
    background: transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    text-shadow: none;
  }
}
