.navbar-apa {
    background: var(--apa-ink);
    border-bottom: 1px solid var(--apa-line);
}

.navbar-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-mark {
    color: var(--apa-gold);
    font-size: 1.2rem;
    text-decoration: none;
}

.brand-mark:hover { color: var(--apa-gold-hover); }

.hero-section {
    background: linear-gradient(125deg, #ffffff 0%, #f6f1e8 42%, #ffffff 100%);
    background-size: 180% 180%;
    color: var(--apa-fg);
    padding: 2.75rem 0 3.5rem;
    animation: heroWash 16s ease-in-out infinite;
}

.hero-copy {
    max-width: 38rem;
    color: var(--apa-muted);
    font-size: 1.08rem;
    line-height: 1.65;
}

.hero-title {
    font-size: clamp(2rem, 8vw, 4.25rem);
    color: var(--apa-fg);
    margin: 0 0 1.25rem;
}

.hero-title em {
    font-style: italic;
    font-weight: 560;
}

.hero-logo-frame {
    background: #ffffff;
    border: 1px solid rgba(20, 18, 16, 0.08);
    border-radius: 2rem;
    padding: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--apa-shadow);
    animation: logoFloat 5.5s ease-in-out infinite;
}

.hero-logo-frame img {
    width: min(360px, 86vw);
    height: auto;
    max-height: 380px;
    object-fit: contain;
    display: block;
}

.hero-cta {
    min-height: 52px;
    min-width: min(100%, 16rem);
}

.historia-copy {
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.historia-copy h2 {
    margin-bottom: 1.75rem;
}

.historia-copy h2::after {
    content: "";
    display: block;
    width: 3.5rem;
    height: 2px;
    margin: 0.9rem auto 0;
    background: var(--apa-gold);
    animation: goldLine 1.1s var(--apa-ease) 0.2s both;
}

.historia-copy p {
    font-size: 1.05rem;
    line-height: 1.7;
    text-wrap: pretty;
}

.section-pad { padding: 5.25rem 0 6rem; }

.profile-image {
    max-height: 250px;
    width: auto;
    border: 1px solid var(--apa-line);
}

.card-tournament {
    background: var(--apa-card);
    border: 1px solid rgba(20, 18, 16, 0.06);
    border-radius: var(--apa-radius);
    box-shadow: var(--apa-shadow);
}

.countdown-cell {
    background: var(--apa-paper);
    border-radius: var(--apa-radius-sm);
    padding: 0.85rem 0.25rem;
    min-height: 5.25rem;
}

.countdown-cell strong {
    font-family: var(--font-body);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    display: block;
    line-height: 1;
    color: var(--apa-gold);
}

.hero-copy em {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 560;
}

.on-ink { color: rgba(247, 243, 234, 0.78); }
.on-ink-kicker { color: rgba(247, 243, 234, 0.62); }

.is-closed { color: var(--apa-danger); }

.navbar-apa .navbar-brand {
    white-space: normal;
    max-width: calc(100% - 0.5rem);
}

.countdown-cell small {
    display: block;
    margin-top: 0.35rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 0.68rem;
    font-weight: 600;
}

.event-empty {
    background: var(--apa-card);
    border-radius: var(--apa-radius);
    padding: 2.5rem 1.75rem;
    max-width: 40rem;
    margin: 0.75rem auto 0;
    box-shadow: var(--apa-shadow);
}

.empty-line {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2.5vw, 1.85rem);
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0.75rem auto 0;
    max-width: 28ch;
}

.map-frame {
    border-radius: var(--apa-radius-sm);
    overflow: hidden;
    background: var(--apa-paper);
    position: relative;
}

.map-ground { fill: var(--apa-paper); }
.empty-kicker { margin-top: 3.5rem; }
.map-block { fill: #ebe4d8; }
.map-road { stroke: rgba(28, 25, 22, 0.16); fill: none; }
.map-venue { fill: var(--apa-card); stroke: var(--apa-fg); }

.map-svg { width: 100%; height: 100%; display: block; }

.map-label {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    background: var(--apa-card);
    color: var(--apa-fg);
    border-radius: 0.5rem;
    padding: 0.45rem 0.7rem;
    box-shadow: 0 8px 20px rgba(20, 16, 10, 0.16);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.recintos { margin: 1rem 0 0; padding: 0; list-style: none; }
.recintos li { margin-top: 0.45rem; }

.instagram-panel {
    background: var(--apa-ink);
    color: var(--apa-on-ink);
    border-radius: var(--apa-radius);
    padding: 2rem;
}

.instagram-panel .kicker { color: rgba(247, 243, 234, 0.62); }

.instagram-embed {
    width: 100%;
    min-height: 480px;
    border: 0;
    border-radius: 0.85rem;
    background: var(--apa-card);
}

.footer-apa {
    background: var(--apa-ink);
    color: var(--apa-on-ink);
    padding: 2.75rem 0 3.25rem;
    border-top: 1px solid var(--apa-line);
}

.footer-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(247, 243, 234, 0.35);
}

.footer-link:hover { color: var(--apa-on-ink); border-bottom-color: var(--apa-on-ink); }

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes heroWash {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes goldLine {
    from { width: 0; opacity: 0; }
    to { width: 3.5rem; opacity: 1; }
}

@keyframes ctaGlow {
    0%, 100% { box-shadow: 0 8px 22px rgba(197, 160, 89, 0.22); }
    50% { box-shadow: 0 14px 32px rgba(197, 160, 89, 0.48); }
}

.hero-section .hero-logo-frame,
.hero-section .hero-title,
.hero-section .hero-copy,
.hero-section .hero-cta,
.historia-copy,
.card-tournament,
.event-empty,
.instagram-panel {
    animation: fadeUp 0.75s var(--apa-ease) both;
}

.hero-section .hero-title { animation-delay: 0.08s; }
.hero-section .hero-copy { animation-delay: 0.16s; }
.hero-section .hero-cta {
    animation: fadeUp 0.75s var(--apa-ease) 0.24s both, ctaGlow 2.8s ease-in-out 1s infinite;
}
.historia-copy { animation-delay: 0.1s; }
.historia-copy p:nth-of-type(2) { animation: fadeUp 0.7s var(--apa-ease) 0.18s both; }
.historia-copy p:nth-of-type(3) { animation: fadeUp 0.7s var(--apa-ease) 0.28s both; }
.historia-copy p:nth-of-type(4) { animation: fadeUp 0.7s var(--apa-ease) 0.38s both; }
.card-tournament,
.event-empty { animation-delay: 0.12s; }
.instagram-panel { animation-delay: 0.16s; }

.btn-custom:hover {
    transform: translateY(-2px);
}

.countdown-cell {
    transition: transform 0.25s var(--apa-ease);
}

.countdown-cell:hover {
    transform: translateY(-3px);
}

@media (max-width: 767.98px) {
    .hero-section { padding: 1.75rem 0 2.5rem; }
    .section-pad { padding: 2.5rem 0 3rem; }
    .instagram-panel { padding: 1.35rem; }
    .instagram-embed { min-height: 390px; }
    .hero-cta,
    .instagram-panel .btn-custom {
        width: 100%;
    }
    .navbar-logo { height: 48px; }
    .navbar-apa .brand-mark span {
        font-size: 0.98rem;
    }
    .hero-title {
        font-size: clamp(1.85rem, 9vw, 2.6rem);
    }
}

@media (min-width: 992px) {
    .hero-section { padding: 5rem 0 5.75rem; }
    .hero-logo-frame img {
        width: min(420px, 100%);
        max-height: 440px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .hero-logo-frame,
    .hero-section .hero-logo-frame,
    .hero-section .hero-title,
    .hero-section .hero-copy,
    .hero-section .hero-cta,
    .historia-copy,
    .historia-copy p,
    .historia-copy h2::after,
    .card-tournament,
    .event-empty,
    .instagram-panel,
    .apa-auth-brand img {
        animation: none;
    }
}
