/* ============================================
   MODERN FLUID CSS - Using clamp(), min(), max()
   All sizes in rem for better accessibility
   Congreso Mundial de Escritores Líderes
   ============================================ */

:root {
    /* Colors */
    --bg: #000;
    --fg: #fff;
    --muted: #bdbdbd;
    --red: #d30000;
    --gold: #f1c232;

    /* Layout */
    --max: 71.25rem;
    /* 1140px */

    /* Fluid spacing */
    --space-xs: clamp(0.5rem, 1vw, 0.75rem);
    --space-sm: clamp(0.75rem, 1.5vw, 1.125rem);
    --space-md: clamp(1rem, 2vw, 1.5rem);
    --space-lg: clamp(1.5rem, 3vw, 2.5rem);
    --space-xl: clamp(2rem, 5vw, 3.75rem);
    --space-2xl: clamp(2.5rem, 6vw, 5rem);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 100%;
    /* 16px base for rem calculations */
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.page {
    max-width: var(--max);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-sm) var(--space-lg);
}

/* ============================================
   TOP BAR (3 columns on desktop, stacked on mobile)
   ============================================ */
.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.topbar__left {
    /* Fluid: 18px → 28px (1.125rem → 1.75rem) */
    font-size: clamp(1.125rem, 2vw + 0.5rem, 1.75rem);
    font-weight: 500;
    font-family: "Bebas Neue", sans-serif;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.9;
}

.topbar__left .red {
    color: var(--red);
}

.topbar__center {
    display: flex;
    justify-content: center;
}

.brand-logo {
    /* Fluid width with min/max constraints */
    width: min(21.875rem, 56vw);
    /* max 350px */
    height: auto;
    display: block;
}

.topbar__right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.right-content-wrapper {
    display: flex;
    align-items: center;
    font-family: 'Bebas Neue', sans-serif;
    text-align: left;
    line-height: 0.9;
}

.right-date-group {
    text-align: center;
    margin-right: clamp(0.5rem, 2vw, 0.9375rem);
}

.date-big {
    /* Fluid: 24px → 34px (1.5rem → 2.125rem) */
    font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2.125rem);
    font-weight: 400;
    font-family: 'Bebas Neue', sans-serif;
    color: #fff;
    letter-spacing: 0.0625rem;
}

.date-small {
    /* Fluid: 12px → 18px (0.75rem → 1.125rem) */
    font-size: clamp(0.75rem, 1.2vw + 0.3rem, 1.125rem);
    color: #ccc;
    letter-spacing: 0.0625rem;
    margin-top: 0.125rem;
}

.right-divider {
    width: 0.125rem;
    height: clamp(2.5rem, 6vw, 4.375rem);
    background: #fff;
    opacity: 0.8;
}

.right-info-group {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-big {
    /* Fluid: 22px → 40px (1.375rem → 2.5rem) */
    font-size: clamp(1.375rem, 3vw + 0.5rem, 2.5rem);
    font-weight: 400;
    font-family: 'Bebas Neue', sans-serif;
    color: #fff;
    letter-spacing: 0.0625rem;
    white-space: nowrap;
    border-bottom: 0.125rem solid #fff;
    padding: 0 0 0.125rem clamp(0.5rem, 1.5vw, 0.9375rem);
}

.info-small {
    /* Fluid: 12px → 18px (0.75rem → 1.125rem) */
    font-size: clamp(0.75rem, 1.2vw + 0.3rem, 1.125rem);
    color: #fff;
    letter-spacing: 0.0625rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0 0 clamp(0.5rem, 1.5vw, 0.9375rem);
}

/* ============================================
   HERO TITLE (Fluid typography)
   ============================================ */
.quote {
    /* Fluid: 20px → 46px (1.25rem → 2.875rem) */
    font-size: clamp(1.25rem, 4vw + 0.5rem, 2.875rem);
    font-weight: 100;
    font-family: "Bebas Neue", sans-serif;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    opacity: 0.9;
}

.hero-title {
    /* Fluid: 20px → 48px (1.25rem → 3rem) */
    font-size: clamp(1.25rem, 4vw + 0.5rem, 3rem);
    font-weight: 400;
    line-height: 1;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    opacity: 0.9;
    margin: var(--space-sm) 0;
}

.hero-title .red {
    color: var(--red);
}

/* ============================================
   VIDEO PLAYER (Plyr.js customization)
   ============================================ */
.hero-media {
    position: relative;
    margin: 0 auto var(--space-sm);
    width: 100%;
}

/* Plyr custom colors - match site theme */
.hero-media .plyr {
    --plyr-color-main: var(--red);
    --plyr-video-control-color: #fff;
    --plyr-video-control-color-hover: var(--red);
    --plyr-video-control-background-hover: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Large play button */
.hero-media .plyr__control--overlaid {
    background: var(--red);
    border: none;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.5);
}

.hero-media .plyr__control--overlaid:hover {
    background: #ff1a1a;
}

/* Progress bar */
.hero-media .plyr--full-ui input[type=range] {
    color: var(--red);
}

/* Fallback for old iframe style (if needed) */
.hero-media__frame {
    background: #111;
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
    border-radius: 0.5rem;
}

/* Custom overlay to hide YouTube branding */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    /* Transparent by default */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 0.5rem;
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease;
}

/* Dark background only when paused after playing */
.video-overlay.paused {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 20, 0.9) 100%);
}

.video-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.video-overlay__poster {
    width: clamp(8rem, 25vw, 14rem);
    height: auto;
    filter: drop-shadow(0 0.5rem 2rem rgba(211, 0, 0, 0.3));
}

/* Pulse animation keyframes */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(211, 0, 0, 0.7);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 1.5rem rgba(211, 0, 0, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(211, 0, 0, 0);
    }
}

.video-overlay__play {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: var(--red);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0.5rem 2rem rgba(211, 0, 0, 0.5);
    animation: pulse 2s ease-in-out infinite;
    transition: transform 0.2s ease, background 0.2s ease;
}

.video-overlay__play:hover {
    transform: scale(1.15);
    background: #ff1a1a;
    animation: none;
    /* Stop pulse on hover */
}

.video-overlay__play i {
    margin-left: 0.25rem;
    /* Center the play icon visually */
}

/* ============================================
   ORGANIZER BLOCK (Fluid typography)
   ============================================ */
.organizer {
    margin: var(--space-md) 0 var(--space-xs);
    text-align: left;
}

.organizer__label {
    /* Fluid: 14px → 18px (0.875rem → 1.125rem) */
    font-size: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
    color: var(--fg);
    margin-bottom: 0.5rem;
}

.organizer__title {
    /* Fluid: 18px → 34px (1.125rem → 2.125rem) */
    font-size: clamp(1.125rem, 2.5vw + 0.5rem, 2.125rem);
    line-height: 1.15;
    font-weight: 500;
    margin: 0 0 0.375rem;
}

.organizer__title a {
    color: inherit;
    text-decoration: none;
}

.organizer__title a:hover {
    color: var(--red);
}

.organizer__subtitle {
    /* Fluid: 14px → 18px (0.875rem → 1.125rem) */
    font-size: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
    color: var(--fg);
    margin: 0;
}

/* ============================================
   DESCRIPTION TEXT
   ============================================ */
.desc {
    margin: var(--space-sm) 0 var(--space-lg);
    /* Fluid: 14px → 18px (0.875rem → 1.125rem) */
    font-size: clamp(0.875rem, 1vw + 0.5rem, 1.125rem);
    line-height: 1.6;
    color: var(--fg);
}

/* ============================================
   BIG CIRCLE LOGO
   ============================================ */
.big-logo {
    display: flex;
    justify-content: center;
    margin: var(--space-xl) 0 0;
}

.big-logo__img {
    /* Fluid: 180px → 400px (11.25rem → 25rem) */
    width: clamp(11.25rem, 30vw + 5rem, 25rem);
    height: auto;
    display: block;
}

/* ============================================
   4 LOGOS ROW (Fluid grid)
   ============================================ */
.logo-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.logo-item {
    /* Fluid width with percentage fallback */
    flex: 0 0 clamp(8rem, 20vw + 2rem, 15.3125rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-item__circle {
    /* Fluid: 100px → 245px */
    width: clamp(6.25rem, 18vw + 1rem, 15.3125rem);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-item__circle img {
    width: 90%;
    height: auto;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}

.logo-item__circle a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.logo-item__circle a img {
    display: block;
    width: 90%;
    height: auto;
}

.logo-item__circle--solid {
    background: transparent;
}

.social-mini {
    display: flex;
    justify-content: center;
    gap: clamp(0.5rem, 1.5vw, 0.9375rem);
    opacity: 0.9;
}

.social-mini i {
    color: #fff;
    cursor: pointer;
    transition: color 0.2s;
    /* Fluid icon size */
    font-size: clamp(0.875rem, 1.2vw + 0.3rem, 1.125rem);
}

.social-mini i:hover {
    color: var(--red);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact {
    text-align: center;
    margin: var(--space-2xl) 0 var(--space-md);
    /* Fluid: 12px → 14px */
    font-size: clamp(0.75rem, 0.8vw + 0.3rem, 0.875rem);
    color: var(--fg);
    line-height: 1.6;
}

.contact-phone {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.contact-phone a {
    color: inherit;
    text-decoration: none;
}

.contact-phone a:hover {
    color: var(--red);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 100;
    text-align: center;
    font-size: 0.75rem;
    color: #9a9a9a;
    padding-top: var(--space-sm);
    border-top: 1px solid #1a1a1a;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.backtop {
    position: fixed;
    right: var(--space-sm);
    bottom: var(--space-sm);
    width: 2.125rem;
    height: 2.125rem;
    border: 0.125rem solid #fff;
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.backtop:before {
    content: "";
    width: 0.625rem;
    height: 0.625rem;
    border-left: 0.1875rem solid #fff;
    border-top: 0.1875rem solid #fff;
    transform: rotate(45deg);
    margin-top: 0.375rem;
}

/* ============================================
   MINIMAL MEDIA QUERIES
   Only for layout changes, not size changes
   ============================================ */

/* Tablet: Switch topbar to stacked layout */
@media (max-width: 56.25rem) {

    /* 900px */
    .topbar {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .topbar__left,
    .topbar__right {
        text-align: center;
    }

    .topbar__right {
        justify-content: center;
    }

    .right-content-wrapper {
        justify-content: center;
    }
}

/* Mobile: Stack date/YouTube info vertically */
@media (max-width: 37.5rem) {

    /* 600px */
    .right-content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0.625rem;
    }

    .right-date-group {
        margin-right: 0;
        display: flex;
        align-items: center;
        gap: 0.625rem;
    }

    .right-divider {
        width: 3.75rem;
        height: 0.125rem;
    }

    .info-big {
        padding: 0 0 0.125rem 0;
        text-align: center;
    }

    .info-small {
        padding: 0.375rem 0 0 0;
        justify-content: center;
    }
}

/* Mobile: 4 logos in 2x2 grid */
@media (max-width: 34.375rem) {

    /* 550px */
    .logo-row {
        gap: 1rem;
    }

    .logo-item {
        /* Force 2 columns: each item takes ~45% width */
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }

    .logo-item__circle {
        /* Larger circles on mobile 2x2 grid */
        width: clamp(6.5rem, 38vw, 9rem);
    }

    .social-mini {
        gap: 0.75rem;
        margin-top: 0.5rem;
    }

    .social-mini i {
        font-size: 1.25rem;
    }
}