/* ===================================
   NAF Vale do Sousa - Institutional Design System
   =================================== */

/* CSS Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --color-black: #0a0a0a;
    --color-dark-gray: #2a2a2a;
    --color-medium-gray: #4a4a4a;
    --color-light-gray: #e5e5e5;
    --color-off-white: #f8f8f8;
    --color-white: #ffffff;
    --color-accent-green: #2d5f3f;
    --color-accent-blue: #1a4d6f;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-regular);
    color: var(--color-dark-gray);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   Accessibility Improvements
   =================================== */

/* Skip to content link */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-accent-green);
    color: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    z-index: 10000;
    transition: top var(--transition-fast);
}

.skip-to-content:focus {
    top: 0;
    outline: 3px solid var(--color-accent-blue);
    outline-offset: 3px;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Enhanced focus visible for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--color-accent-green);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* Remove default focus for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
    outline: none;
}

/* ===================================
   prefers-reduced-motion
   Disables animations for users with
   motion sensitivity set in their OS.
   =================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Keep slides visible — just remove cross-fade */
    .slide {
        transition: none !important;
    }

    /* Keep scroll indicator visible but static */
    .scroll-indicator span::before {
        animation: none !important;
    }

    /* Hero text: show immediately without fade */
    .hero-subtitle,
    .hero-title,
    .hero-description,
    .cta-button {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
    }
}


/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--spacing-lg);
    }
}

/* ===================================
   Navigation
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar .container {
    display: flex;
    align-items: center;
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    max-width: 100%;
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

@media (min-width: 768px) {
    .navbar .container {
        padding-left: var(--spacing-xl);
        padding-right: var(--spacing-xl);
    }
}

.nav-brand {
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.nav-brand:hover {
    opacity: 0.9;
}

.brand-logo {
    height: 40px;
    width: auto;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    margin-left: auto;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-white);
    transition: var(--transition-fast);
}

.nav-menu {
    position: fixed;
    top: 60px;
    left: -100%;
    width: 100%;
    background-color: var(--color-black);
    list-style: none;
    padding: var(--spacing-lg);
    transition: var(--transition-normal);
    flex-direction: column;
    gap: var(--spacing-md);
}

.nav-menu.active {
    left: 0;
}

.nav-link {
    color: var(--color-light-gray);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
    display: block;
    padding: var(--spacing-xs) 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent-green);
}

@media (min-width: 1280px) {
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        flex-direction: row;
        background-color: transparent;
        padding: 0;
        width: auto;
        display: flex;
        margin-left: auto;
        padding-left: var(--spacing-2xl);
    }

    .nav-link {
        padding: var(--spacing-xs) var(--spacing-sm);
        white-space: nowrap;
    }
}

/* ===================================
   Hero Section
   =================================== */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    /* dvh accounts for mobile browser chrome */
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.85), rgba(45, 95, 63, 0.75));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--spacing-2xl) 0;
}

.hero-subtitle {
    color: var(--color-light-gray);
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: var(--spacing-sm);
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 0.95rem;
        letter-spacing: 0.1em;
    }
}

.hero-title {
    color: var(--color-white);
    font-size: 2.5rem;
    font-weight: var(--font-weight-extrabold);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.2s forwards;
}

.hero-description {
    color: var(--color-off-white);
    font-size: 1.15rem;
    font-weight: var(--font-weight-light);
    max-width: 900px;
    margin: 0 auto var(--spacing-xl);
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.4s forwards;
}

.scroll-indicator {
    position: absolute;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background-color: var(--color-white);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scrollDown 2s infinite;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }

    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes scrollDown {

    0%,
    100% {
        top: 8px;
        opacity: 1;
    }

    50% {
        top: 20px;
        opacity: 0;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-description {
        font-size: 1.25rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
}

/* ===================================
   Buttons
   =================================== */

.cta-button {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-xl);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-normal);
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.6s forwards;
}

.cta-button.primary {
    background-color: var(--color-accent-green);
    color: var(--color-white);
    border-color: var(--color-accent-green);
}

.cta-button.primary:hover {
    background-color: transparent;
    border-color: var(--color-accent-green);
    color: var(--color-accent-green);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.cta-button.large {
    padding: var(--spacing-md) var(--spacing-2xl);
    font-size: 1.1rem;
}

/* ===================================
   Section Styles
   =================================== */

.section {
    padding: var(--spacing-3xl) 0;
}

.section:nth-child(even) {
    background-color: var(--color-off-white);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2.25rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    margin-bottom: var(--spacing-sm);
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent-green), var(--color-accent-blue));
    margin: 0 auto;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.75rem;
    }
}

/* ===================================
   Quem Somos Section
   =================================== */

.content-grid {
    display: grid;
    gap: var(--spacing-xl);
    align-items: center;
}

.content-text p {
    margin-bottom: var(--spacing-md);
    color: var(--color-medium-gray);
    font-size: 1.05rem;
    text-align: left;
}

.lead-text {
    font-size: 1.25rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-dark-gray);
    margin-bottom: var(--spacing-lg);
}

.stats-card {
    background: linear-gradient(135deg, var(--color-dark-gray), var(--color-black));
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--color-white);
    padding: var(--spacing-md) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-size: 3rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-accent-green);
    line-height: 1;
    margin-bottom: var(--spacing-xs);
}

.stat-icon {
    font-size: 3rem;
    color: var(--color-accent-green);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    opacity: 0.9;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }
}

/* ===================================
   Formação Section
   =================================== */

.features-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.feature-card {
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent-green), var(--color-accent-blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-white);
}

.feature-title {
    font-size: 1.35rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    color: var(--color-medium-gray);
    line-height: 1.7;
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===================================
   Ser Árbitro Section
   =================================== */

.content-centered {
    max-width: 800px;
    margin: 0 auto var(--spacing-2xl);
    text-align: center;
}

.values-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

.value-card {
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}


.value-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent-green), var(--color-accent-blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
}

.value-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-white);
}

.value-title {
    font-size: 1.35rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
    margin-bottom: var(--spacing-sm);
}

.value-description {
    color: var(--color-medium-gray);
    line-height: 1.7;
}

.cta-secondary {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-text {
    font-size: 1.1rem;
    color: var(--color-medium-gray);
    line-height: 1.8;
}

@media (min-width: 768px) {
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .values-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===================================
   Destaques Section
   =================================== */

.highlights-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.highlight-card {
    background: linear-gradient(135deg, var(--color-dark-gray), var(--color-black));
    padding: var(--spacing-2xl);
    border-radius: var(--radius-lg);
    text-align: center;
    color: var(--color-white);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-normal);
}

.highlight-card:hover {
    transform: scale(1.03);
}

.highlight-number,
.highlight-icon {
    font-size: 3.5rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-accent-green);
    line-height: 1;
    margin-bottom: var(--spacing-sm);
}

.highlight-label {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
}

.highlight-description {
    color: var(--color-light-gray);
    font-size: 1rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   Final CTA Section
   =================================== */

.cta-final {
    background: linear-gradient(135deg, var(--color-dark-gray), var(--color-black));
    color: var(--color-white);
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.cta-description {
    font-size: 1.15rem;
    color: var(--color-light-gray);
    line-height: 1.8;
    margin-bottom: var(--spacing-xl);
}

.cta-final .cta-button {
    opacity: 1;
}

@media (min-width: 768px) {
    .cta-title {
        font-size: 3rem;
    }
}

/* ===================================
   Contactos Section
   =================================== */

.contact-grid {
    display: grid;
    gap: var(--spacing-2xl);
}

.contact-heading {
    font-size: 1.5rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
    margin-bottom: var(--spacing-lg);
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--color-accent-green), var(--color-accent-blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-white);
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-xs);
}

.contact-value {
    font-size: 1.1rem;
    color: var(--color-dark-gray);
    text-decoration: none;
}

.contact-value:hover {
    color: var(--color-accent-green);
}

/* Form Styles */
.contact-form {
    background-color: var(--color-white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark-gray);
    margin-bottom: var(--spacing-xs);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--spacing-sm);
    font-family: var(--font-family);
    font-size: 1rem;
    /* minimum 16px prevents iOS auto-zoom on focus */
    color: var(--color-dark-gray);
    background-color: var(--color-off-white);
    border: 2px solid var(--color-light-gray);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    -webkit-appearance: none;
    /* remove iOS default styling */
    -moz-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent-green);
    background-color: var(--color-white);
}

.form-textarea {
    resize: vertical;
}

.form-message {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    display: none;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.contact-map {
    margin-top: var(--spacing-xl);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 300px;
    width: 100%;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
        gap: var(--spacing-3xl);
    }
}

/* ===================================
   Footer
   =================================== */

.footer {
    background-color: var(--color-black);
    color: var(--color-light-gray);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.footer-content {
    display: grid;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-brand:hover {
    opacity: 0.9;
}

.footer-logo {
    height: 60px;
    width: auto;
}

.footer-brand-text h3 {
    color: var(--color-white);
    font-size: 1.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-xs);
}

.footer-brand-text p {
    color: var(--color-light-gray);
    font-style: italic;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-link {
    color: var(--color-light-gray);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--color-accent-green);
}

.footer-social {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: var(--color-dark-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    transition: var(--transition-fast);
}

.social-link:hover {
    background-color: var(--color-accent-green);
    transform: translateY(-3px);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    border-top: 1px solid var(--color-dark-gray);
    padding-top: var(--spacing-md);
    text-align: center;
}

.footer-bottom p {
    color: var(--color-medium-gray);
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: 1.5fr 1fr auto;
        align-items: center;
    }

    .footer-links {
        justify-content: flex-end;
    }
}

/* ===================================
   Footer Apoios
   =================================== */

.footer-apoios {
    border-top: 1px solid var(--color-dark-gray);
    padding: var(--spacing-xl) 0;
    margin-bottom: var(--spacing-xl);
}

.footer-apoios-title {
    font-size: 0.8rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.footer-apoios-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xl);
}

.apoio-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.apoio-logo:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.apoio-logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
    max-width: 180px;
    filter: grayscale(100%) brightness(1.5);
    transition: filter var(--transition-fast);
}

.apoio-logo:hover img {
    filter: grayscale(0%) brightness(1);
}

@media (max-width: 767px) {
    .footer-apoios-logos {
        gap: var(--spacing-lg);
    }

    .apoio-logo img {
        height: 70px;
        max-width: 150px;
    }
}

/* ===================================
   Utility Classes
   =================================== */

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

/* ===================================
   Eventos Section
   =================================== */

.eventos-description {
    font-size: 1.05rem;
    color: var(--color-medium-gray);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

/* ===================================
   Page Hero (for eventos.html)
   =================================== */

.page-hero {
    position: relative;
    padding: calc(var(--spacing-3xl) + 60px) 0 var(--spacing-3xl);
    background: linear-gradient(135deg, var(--color-dark-gray), var(--color-black));
    text-align: center;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.85), rgba(45, 95, 63, 0.75));
}

.page-hero-content {
    position: relative;
    z-index: 2;
}

.page-hero-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-extrabold);
    color: var(--color-white);
    margin-bottom: var(--spacing-md);
}

.page-hero-description {
    font-size: 1.15rem;
    color: var(--color-light-gray);
    max-width: 700px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .page-hero-title {
        font-size: 3.5rem;
    }

    .page-hero-description {
        font-size: 1.25rem;
    }
}

/* ===================================
   Events Gallery
   =================================== */

.events-gallery {
    background-color: var(--color-off-white);
}

.event-cards-grid {
    display: grid;
    gap: var(--spacing-xl);
}

.event-card {
    background-color: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.event-card-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.event-card:hover .event-card-image img {
    transform: scale(1.05);
}

.event-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 95, 63, 0.8), rgba(26, 77, 111, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

.event-card:hover .event-card-overlay {
    opacity: 1;
}

.event-card-icon {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.event-card-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--color-accent-green), var(--color-accent-blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.event-card-icon-wrapper svg {
    width: 40px;
    height: 40px;
    color: var(--color-white);
}

.event-card-content {
    padding: var(--spacing-xl);
}

.event-card-title {
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    margin-bottom: var(--spacing-xs);
}

.event-card-count {
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-accent-green);
    margin-bottom: var(--spacing-sm);
}

.event-card-description {
    font-size: 1rem;
    color: var(--color-medium-gray);
    line-height: 1.7;
}

@media (min-width: 768px) {
    .event-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-card-image {
        height: 350px;
    }
}

@media (min-width: 1024px) {
    .event-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .event-card-image {
        height: 400px;
    }
}

/* ===================================
   Lightbox Modal
   =================================== */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next,
.lightbox-download {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    z-index: 10001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-download:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--color-accent-green);
    transform: scale(1.1);
}

.lightbox-close svg,
.lightbox-prev svg,
.lightbox-next svg,
.lightbox-download svg {
    width: 24px;
    height: 24px;
}

.lightbox-close {
    top: var(--spacing-lg);
    right: var(--spacing-lg);
}

.lightbox-download {
    top: var(--spacing-lg);
    right: calc(var(--spacing-lg) + 60px);
}

.lightbox-prev {
    left: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: var(--spacing-lg);
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: fixed;
    bottom: var(--spacing-xl);
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: var(--font-weight-semibold);
    z-index: 10001;
}

@media (max-width: 767px) {

    .lightbox-close,
    .lightbox-prev,
    .lightbox-next,
    .lightbox-download {
        width: 40px;
        height: 40px;
    }

    .lightbox-close svg,
    .lightbox-prev svg,
    .lightbox-next svg,
    .lightbox-download svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-close {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    .lightbox-download {
        top: var(--spacing-sm);
        right: calc(var(--spacing-sm) + 50px);
    }

    .lightbox-prev {
        left: var(--spacing-sm);
    }

    .lightbox-next {
        right: var(--spacing-sm);
    }

    .lightbox-counter {
        font-size: 0.9rem;
        padding: var(--spacing-xs) var(--spacing-md);
        bottom: var(--spacing-lg);
    }
}

/* ===================================
   Refactored Form Styles
   =================================== */

.form-centered-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.form-large {
    width: 100%;
    max-width: 800px;
}

.form-row {
    display: grid;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.full-width {
    width: 100%;
    display: block;
    text-align: center;
}

/* Ensure date input matches other inputs */
input[type="date"].form-input {
    appearance: none;
    -webkit-appearance: none;
    min-height: 50px;
    /* Match typical height if needed, though padding usually handles it */
}

/* ===================================
   Resources Page Styles
   =================================== */

.resources-section {
    padding: var(--spacing-3xl) 0;
}

.resources-section.alt {
    background-color: var(--color-light-gray);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

/* Resource Card */
.resource-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    border: 1px solid transparent;
}

.resource-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent-green);
}

.resource-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent-green), var(--color-accent-blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.resource-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-white);
}

.resource-content {
    flex: 1;
}

.resource-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark-gray);
    margin: 0 0 var(--spacing-xs);
}

.resource-description {
    font-size: 0.95rem;
    color: var(--color-medium-gray);
    line-height: 1.6;
    margin: 0 0 var(--spacing-sm);
}

.resource-meta {
    display: flex;
    gap: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--color-medium-gray);
}

.resource-size,
.resource-type {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.resource-type {
    background: var(--color-light-gray);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-weight: var(--font-weight-medium);
}

.resource-download {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--color-accent-green);
    color: var(--color-white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: 0.95rem;
    transition: var(--transition-normal);
    align-self: flex-start;
}

.resource-download:hover {
    background: #1a7a3e;
    transform: translateX(4px);
}

.resource-download svg {
    width: 18px;
    height: 18px;
}

/* Responsive */
@media (max-width: 768px) {
    .resources-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Carousel Styles for Regulamentos
   =================================== */

.carousel-wrapper {
    position: relative;
    width: 100%;
    margin-top: var(--spacing-xl);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-accent-green);
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    z-index: 10;
    box-shadow: var(--shadow-lg);
}

.carousel-arrow-left {
    left: 20px;
}

.carousel-arrow-right {
    right: 20px;
}

.carousel-arrow:hover {
    background: #1a7a3e;
    transform: translateY(-50%) scale(1.15);
}

.carousel-arrow svg {
    width: 28px;
    height: 28px;
    color: var(--color-white);
}

.resources-carousel {
    width: 100%;
    overflow: hidden;
    padding: 0 90px;
}

.carousel-track {
    display: flex;
    gap: var(--spacing-lg);
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    padding-bottom: var(--spacing-sm);
}

.carousel-track::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.carousel-track .resource-card {
    min-width: 280px;
    max-width: 320px;
    flex-shrink: 0;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .carousel-wrapper {
        padding: 0;
    }

    .carousel-arrow {
        display: none;
    }

    .resources-carousel {
        overflow-x: auto;
        padding: 0;
    }

    .carousel-track .resource-card {
        min-width: 260px;
    }
}

/* Ocultar tamanho e tipo de ficheiro nos recursos */
.resource-size,
.resource-type {
    display: none;
}

/* ===================================
   Resource Card — Estado Indisponível
   =================================== */

.resource-card--unavailable {
    opacity: 0.55;
    filter: grayscale(100%);
    cursor: default;
    pointer-events: none;
}

.resource-card--unavailable:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: transparent;
}

.resource-card--unavailable .resource-icon {
    background: var(--color-light-gray);
}

.resource-card--unavailable .resource-icon svg {
    color: var(--color-medium-gray);
}

.resource-unavailable-notice {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-medium-gray);
    background: var(--color-light-gray);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    align-self: flex-start;
}

.resource-unavailable-notice svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-medium-gray);
}

/* ===================================
   Jantar Aniversário — Inscrição
   =================================== */
.aniversario-inscricao {
    background-color: var(--color-black);
}

.aniversario-inscricao .section-title,
.aniversario-inscricao .section-subtitle {
    color: var(--color-white);
}

/* Banner em contexto de fundo branco (jantar.html) */
.socios .aniversario-banner {
    background: #f4f4f4;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.socios .aniversario-info-label {
    color: #666;
}

.socios .aniversario-info-value {
    color: #111;
}

/* Form elements em fundo branco (jantar.html) */
.socios .aniversario-section-label {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.socios .aniversario-participants-hint {
    color: #888;
}

.socios .participante-remove-btn {
    border: 1px solid rgba(0, 0, 0, 0.18);
    color: #888;
}

.socios .participante-remove-btn:hover {
    background: rgba(231, 76, 60, 0.06);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.35);
}

.socios .aniversario-summary {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.socios .aniversario-summary-row {
    color: #555;
}

.socios .aniversario-summary-row.total {
    color: #111;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.aniversario-banner {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-3xl);
    padding: var(--spacing-xl) var(--spacing-2xl);
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
}

.aniversario-info-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.aniversario-info-icon {
    color: var(--color-accent-green);
    flex-shrink: 0;
}

.aniversario-info-label {
    display: block;
    color: var(--color-light-gray);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 2px;
}

.aniversario-info-value {
    display: block;
    color: var(--color-white);
    font-size: 1.1rem;
    font-weight: var(--font-weight-bold);
}

.aniversario-section-label {
    color: var(--color-accent-green);
    font-weight: var(--font-weight-semibold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.aniversario-participants-hint {
    color: var(--color-light-gray);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-md);
}

/* Participant rows */
.participante-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.participante-num {
    color: var(--color-accent-green);
    font-weight: var(--font-weight-bold);
    min-width: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.participante-item .form-input {
    flex: 1;
    margin: 0;
}

.participante-remove-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--color-light-gray);
    border-radius: var(--radius-sm);
    padding: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.participante-remove-btn:hover {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.4);
}

/* Add participant button */
.aniversario-add-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: transparent;
    color: var(--color-accent-green);
    border: 1px dashed var(--color-accent-green);
    border-radius: var(--radius-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
    font-size: 0.875rem;
    font-family: var(--font-family);
    transition: var(--transition-fast);
    margin-top: var(--spacing-xs);
    margin-bottom: var(--spacing-lg);
    opacity: 0.85;
}

.aniversario-add-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.04);
}

/* Summary */
.aniversario-summary {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.aniversario-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-xs) 0;
    color: var(--color-light-gray);
    font-size: 0.95rem;
}

.aniversario-summary-row.total {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--spacing-xs);
    padding-top: var(--spacing-sm);
    color: var(--color-white);
    font-size: 1rem;
}

.aniversario-summary-row.total strong {
    color: var(--color-accent-green);
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .aniversario-banner {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
    }
}

/* ===================================
   Eventos — Full-section Slideshow
   =================================== */

/* Remove default section padding so slideshow fills edge-to-edge */
.eventos-section {
    padding: 0 !important;
    position: relative;
}

/* Slideshow container = full section
   Using display:block (not flex) so overflow:hidden reliably clips
   position:absolute slides on all browsers, including tablet Safari. */
.eventos-slideshow {
    position: relative;
    width: 100%;
    min-height: 600px;
    height: 80vh;
    max-height: 750px;
    overflow: hidden;
    background-color: var(--color-black);
    display: block;
}

/* Each slide — position:absolute, fills the container */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease;
    pointer-events: none;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

/* Dark + green gradient overlay — same style as the hero */
.eventos-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(10, 10, 10, 0.80), rgba(45, 95, 63, 0.70));
    z-index: 2;
    pointer-events: none;
}

/* Content sits above the overlay, centered like the hero */
.eventos-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl) var(--spacing-md);
}

/* White text variants for elements inside the slideshow */
.section-title.light {
    color: var(--color-white);
}

.lead-text.light {
    color: var(--color-off-white);
    font-weight: var(--font-weight-light);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* CTA button inside slideshow — remove the hero animation opacity:0 */
.eventos-content .cta-button {
    opacity: 1;
    animation: none;
    margin-top: var(--spacing-lg);
}

/* Arrow buttons — centered vertically in the slideshow */
.slideshow-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 50px;
    height: 50px;
    background: rgba(10, 10, 10, 0.50);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.slideshow-arrow svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.slideshow-arrow-prev {
    left: var(--spacing-lg);
}

.slideshow-arrow-next {
    right: var(--spacing-lg);
}

.slideshow-arrow:hover {
    background: var(--color-accent-green);
    border-color: var(--color-accent-green);
    transform: translateY(-50%) scale(1.1);
}

/* Dot indicators */
.slideshow-dots {
    position: absolute;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slideshow-dot {
    /* Visible dot: 10×10px */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.40);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition-fast), transform var(--transition-fast);
    /* 44×44px touch target (WCAG 2.5.5) via transparent padding */
    position: relative;
}

.slideshow-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    /* invisible but tappable */
}

.slideshow-dot.active,
.slideshow-dot:hover {
    background: var(--color-accent-green);
    transform: scale(1.3);
}

/* Tablet */
@media (max-width: 1024px) {
    .eventos-slideshow {
        min-height: 550px;
        height: 75vh;
    }
}

/* Mobile landscape / small tablet */
@media (max-width: 768px) {
    .eventos-slideshow {
        min-height: 480px;
        height: 70vh;
    }

    .slideshow-arrow {
        width: 40px;
        height: 40px;
    }

    .slideshow-arrow svg {
        width: 18px;
        height: 18px;
    }

    .slideshow-arrow-prev {
        left: var(--spacing-sm);
    }

    .slideshow-arrow-next {
        right: var(--spacing-sm);
    }

    .eventos-content {
        padding: var(--spacing-2xl) var(--spacing-md);
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .eventos-slideshow {
        min-height: 400px;
        height: 65vh;
    }

    .eventos-content {
        padding: var(--spacing-md) var(--spacing-sm);
        gap: var(--spacing-sm);
    }

    /* Smaller title inside the slideshow on mobile */
    .eventos-content .section-title {
        font-size: 1.6rem;
    }

    /* Clamp lead text to 3 lines so it doesn't overflow the slideshow */
    .eventos-content .lead-text {
        font-size: 0.88rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-align: center;
    }

    /* Reduce button size on mobile — large variant is too tall */
    .eventos-content .cta-button.large {
        padding: var(--spacing-sm) var(--spacing-xl);
        font-size: 0.95rem;
        margin-top: var(--spacing-sm);
    }
}

/* ===================================
   Gallery Modal - Intermediate grid
   =================================== */

.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(5, 10, 5, 0.97);
    flex-direction: column;
    overflow: hidden;
}

.gallery-modal.active {
    display: flex;
}

/* Header */
.gallery-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    gap: 1rem;
}

.gallery-modal-header-info {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.gallery-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-modal-count {
    font-size: 0.85rem;
    color: var(--color-accent-green, #4caf50);
    font-weight: 500;
    white-space: nowrap;
}

.gallery-modal-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

.gallery-modal-close:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: rotate(90deg);
}

.gallery-modal-close svg {
    width: 18px;
    height: 18px;
}

/* Scrollable grid */
.gallery-modal-grid {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
}

/* Individual thumbnail item — justified gallery */
.gallery-modal-item {
    /* flex-grow and flex-basis are set via JS once image loads */
    flex-grow: 1;
    /* proportional to aspect ratio */
    flex-shrink: 1;
    flex-basis: 180px;
    /* minimum width before wrapping */
    height: 220px;
    overflow: hidden;
    border-radius: 6px;
    cursor: pointer;
    background: #111;
    position: relative;
    outline: 2px solid transparent;
    transition: outline-color 0.15s, transform 0.15s;
}

.gallery-modal-item:hover,
.gallery-modal-item:focus-visible {
    outline-color: var(--color-accent-green, #4caf50);
    transform: scale(1.02);
    z-index: 1;
}

.gallery-modal-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* fill the fixed-height container, clipping only minimal edges */
    display: block;
    transition: opacity 0.3s;
}

/* Skeleton loading animation while image not yet loaded */
.gallery-modal-thumb:not([src]),
.gallery-modal-thumb[src=""] {
    min-height: 150px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.06) 75%);
    background-size: 400% 100%;
    animation: gallery-skeleton 1.4s ease infinite;
}

@keyframes gallery-skeleton {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

@media (max-width: 768px) {
    .gallery-modal-item {
        height: 160px;
        flex-basis: 120px;
    }
}

@media (max-width: 480px) {
    .gallery-modal-item {
        height: 120px;
        flex-basis: 90px;
    }

    .gallery-modal-grid {
        padding: 0.5rem;
        gap: 4px;
    }

    .gallery-modal-title {
        font-size: 1rem;
    }
}

/* ===================================
   História Page
   =================================== */

.historia-fundacao {
    background: var(--color-off-white);
}

.historia-fundacao-inner {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--spacing-3xl);
}

.historia-fundacao-badge {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: var(--color-accent-green);
    color: #fff;
    text-align: center;
    box-shadow: 0 8px 32px rgba(45, 95, 63, 0.35);
}

.historia-year {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
}

.historia-year-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-top: 4px;
}

.historia-section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--spacing-sm);
}

.historia-desc {
    color: var(--color-medium-gray);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: var(--spacing-md);
    max-width: 680px;
}

.historia-stats {
    display: flex;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    flex-wrap: wrap;
}

.historia-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.historia-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--color-accent-green);
    line-height: 1;
}

.historia-stat-label {
    font-size: 0.78rem;
    color: var(--color-medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-top: 4px;
}

/* Presidente Atual */
.historia-presidente {
    background: #fff;
}

.presidente-atual-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    text-align: center;
    border: 3px solid var(--color-accent-green);
    max-width: 320px;
    margin: 0 auto;
}

.presidente-atual-foto {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-off-white);
}

.presidente-atual-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.presidente-atual-info {
    padding: var(--spacing-md) var(--spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.presidente-atual-cargo {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent-green);
}

.presidente-atual-nome {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-black);
    margin: 2px 0 4px;
    line-height: 1.3;
}

.presidente-atual-desde {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--color-medium-gray);
    font-weight: 500;
}

.presidente-atual-desde svg {
    flex-shrink: 0;
    color: var(--color-accent-green);
}

.presidente-atual-desde-lines {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.presidente-atual-badge {
    margin-top: var(--spacing-xs);
}

/* Keep legacy icon style in case it's needed elsewhere */
.presidente-atual-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    background: var(--color-accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.presidente-atual-icon svg {
    width: 32px;
    height: 32px;
}

/* ── Presidentes anteriores — grelha de cards ── */
.presidentes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
}

.presidente-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
}

.presidente-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.presidente-card-foto {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--color-off-white);
}

.presidente-card-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s ease;
}

.presidente-card:hover .presidente-card-foto img {
    transform: scale(1.06);
}

.presidente-card-info {
    padding: var(--spacing-md) var(--spacing-sm);
}

.presidente-card-nome {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-black);
    margin: 0 0 4px;
    line-height: 1.3;
}

.presidente-card-periodo {
    font-size: 0.8rem;
    color: var(--color-medium-gray);
    font-style: italic;
}

/* Aviso */
.presidentes-aviso {
    margin-top: var(--spacing-xl);
    font-size: 0.85rem;
    color: var(--color-medium-gray);
    text-align: center;
    font-style: italic;
}

/* Responsive — presidentes grid */
@media (max-width: 1023px) {
    .presidentes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 640px) {
    .presidentes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }
}

@media (max-width: 400px) {
    .presidentes-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }
}



.badge-em-funções {
    display: inline-block;
    background: rgba(45, 95, 63, 0.12);
    color: var(--color-accent-green);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(45, 95, 63, 0.25);
}

/* ── Órgãos Sociais ── */
.orgaos-sociais {
    background: var(--color-white);
}

.orgaos-sociais .section-description {
    margin-top: var(--spacing-sm);
    font-size: 1rem;
    color: var(--color-medium-gray);
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.04em;
}

.orgao-grupo {
    margin-bottom: var(--spacing-3xl);
}

.orgao-grupo:last-child {
    margin-bottom: 0;
}

.orgao-grupo-titulo {
    font-size: 1.15rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-accent-green);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--color-light-gray);
}

.orgao-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--spacing-md);
}

/* Centred variant: limits width for small groups */
.orgao-cards-grid--centrado {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    max-width: 700px;
}

.orgao-card {
    background: var(--color-off-white);
    border: 1px solid var(--color-light-gray);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.orgao-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Highlighted card (President of Direção) */
.orgao-card--destaque {
    background: linear-gradient(135deg, var(--color-accent-green), var(--color-accent-blue));
    border-color: transparent;
    color: var(--color-white);
}

.orgao-card--destaque .orgao-card-cargo {
    color: rgba(255, 255, 255, 0.8);
}

.orgao-card--destaque .orgao-card-nome {
    color: var(--color-white);
}

.orgao-card-cargo {
    font-size: 0.72rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent-green);
}

.orgao-card-nome {
    font-size: 0.95rem;
    font-weight: var(--font-weight-bold);
    color: var(--color-black);
    line-height: 1.3;
}

/* Responsive */
@media (max-width: 640px) {
    .orgao-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .orgao-cards-grid--centrado {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .orgao-cards-grid,
    .orgao-cards-grid--centrado {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }
}

/* Presidentes Anteriores - Placeholder */
.historia-presidentes {
    background: var(--color-off-white);
}

.presidentes-placeholder {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    background: #fff;
    border-radius: 16px;
    border: 2px dashed var(--color-light-gray);
}

.presidentes-placeholder-icon {
    width: 72px;
    height: 72px;
    background: var(--color-off-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    color: var(--color-medium-gray);
}

.presidentes-placeholder-icon svg {
    width: 36px;
    height: 36px;
}

.presidentes-placeholder-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-dark-gray);
    margin-bottom: var(--spacing-sm);
}

.presidentes-placeholder-text {
    font-size: 0.95rem;
    color: var(--color-medium-gray);
    line-height: 1.7;
}

/* Timeline (pronta a usar) */
.presidentes-timeline {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    padding-left: 40px;
}

.presidentes-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-light-gray);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-xl);
}

.timeline-dot {
    position: absolute;
    left: -34px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-accent-green);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--color-accent-green);
}

.timeline-content {
    background: #fff;
    border: 1px solid var(--color-light-gray);
    border-radius: 10px;
    padding: var(--spacing-md) var(--spacing-lg);
}

.timeline-periodo {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-accent-green);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.timeline-nome {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-black);
    margin-top: 4px;
}

@media (max-width: 768px) {
    .historia-fundacao-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-xl);
    }

    .historia-stats {
        justify-content: center;
    }

    .historia-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .presidente-atual-card {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-xl);
    }

    .presidente-atual-desde {
        justify-content: center;
    }
}

/* =====================================================
   TABLET RESPONSIVE — Lenovo IdeaPad TB336FU & similar
   2560×1660 WQXGA screen, ~267 DPI, DPR ≈ 2
   CSS viewport: portrait ≈ 830×1280px
                 landscape ≈ 1280×830px
   ===================================================== */

/* ── Portrait orientation (tablet standing upright, ~830px wide) ── */
@media screen and (orientation: portrait) and (min-width: 640px) and (max-width: 1100px) {

    /* Hero: fill most of the tall viewport */
    .hero {
        min-height: 90vh;
    }

    /* Sections: slightly tighter vertical padding */
    .section {
        padding: var(--spacing-2xl) 0;
    }

    /* Quem Somos: 2-column grid */
    .content-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Formação: 2 columns */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Ser Árbitro values: 2 columns */
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Destaques: keep 3 columns */
    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Slideshow: taller in portrait to fill more screen */
    .eventos-slideshow {
        height: 80vh;
        min-height: 520px;
    }

    /* Contact: stacked in portrait */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Form row: 2 columns */
    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    /* Section titles: intermediate size */
    .section-title {
        font-size: 2.25rem;
    }

    /* CTA title */
    .cta-title {
        font-size: 2.5rem;
    }

    /* Gallery modal thumbnails: larger in portrait tablet */
    .gallery-modal-item {
        height: 200px;
        flex-basis: 160px;
    }

    /* Historia fundação: side by side */
    .historia-fundacao-inner {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .historia-stats {
        justify-content: flex-start;
    }

    /* Presidentes: 4 columns in portrait tablet */
    .presidentes-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Limit photo height on tablet so cards don't dominate */
    .presidente-card-foto {
        max-height: 180px;
    }

    /* Presidente atual: keep it centered as a block card */
    .presidente-atual-card {
        max-width: 280px;
    }
}

/* ── Landscape orientation (tablet on its side, ~1280px wide) ── */
@media screen and (orientation: landscape) and (min-width: 900px) and (max-width: 1400px) and (max-height: 960px) {

    /* Navbar: force horizontal layout in tablet landscape */
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        flex-direction: row;
        background-color: transparent;
        padding: 0;
        width: auto;
        display: flex;
        margin-left: auto;
        padding-left: var(--spacing-xl);
    }

    .nav-link {
        padding: var(--spacing-xs) var(--spacing-sm);
        white-space: nowrap;
    }

    /* Hero: shorter in landscape (viewport not as tall) */
    .hero {
        min-height: 100vh;
    }

    /* Slideshow: shorter in landscape to fit viewport height */
    .eventos-slideshow {
        height: 72vh;
        min-height: 480px;
    }

    /* Sections: standard spacing */
    .section {
        padding: var(--spacing-2xl) 0;
    }

    /* Formação: 4 columns in landscape */
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Ser Árbitro: 4 columns */
    .values-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Destaques: 3 columns */
    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Contact: 2 columns */
    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
    }

    /* Gallery modal thumbnails */
    .gallery-modal-item {
        height: 180px;
        flex-basis: 150px;
    }

    /* Page hero (eventos, recursos, etc.) slightly shorter */
    .page-hero {
        padding: calc(var(--spacing-2xl) + 60px) 0 var(--spacing-2xl);
    }

    /* Event cards grid: 3 columns */
    .event-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Presidentes: 5 columns in landscape (smaller, proportionate cards) */
    .presidentes-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Limit photo height in landscape */
    .presidente-card-foto {
        max-height: 160px;
    }

    /* Presidente atual card: slightly smaller in landscape */
    .presidente-atual-card {
        max-width: 260px;
    }
}

/* ── High-DPI screen quality improvement (applies to the Lenovo + any retina screen) ── */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Ensure images use high-quality rendering */
    img {
        image-rendering: auto;
    }

    /* Slightly thinner borders look crisper on high-DPI */
    .title-underline {
        height: 3px;
    }
}

/* =====================================================
   RESPONSIVE SYSTEM — Full breakpoint coverage
   320px  │ Extra-small phones  (iPhone SE, Moto G)
   480px  │ Small phones
   481-767│ Large phones / phablets
   768-1023│ Tablet portrait
   1024-1279│ Large tablet / small desktop
   1440px │ Large desktop
   1920px │ Full-HD / wide monitor
   ===================================================== */

/* ── 320px — Extra small phones ── */
@media (max-width: 360px) {

    .hero-title {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 0.78rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .page-hero-title {
        font-size: 1.6rem;
    }

    .cta-button {
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: 0.9rem;
    }

    .cta-button.large {
        padding: var(--spacing-sm) var(--spacing-xl);
        font-size: 0.95rem;
    }

    .section {
        padding: var(--spacing-xl) 0;
    }

    /* Hide brand text on very small screens to avoid overflow */
    .brand-text {
        display: none;
    }

    .stat-number,
    .stat-icon,
    .highlight-number,
    .highlight-icon {
        font-size: 2.2rem;
    }

    .contact-map {
        height: 220px;
    }

    .footer-brand-text h3 {
        font-size: 1.1rem;
    }

    .form-input,
    .form-textarea {
        font-size: 0.95rem;
    }

    .slideshow-arrow {
        width: 34px;
        height: 34px;
    }

    .slideshow-arrow svg {
        width: 16px;
        height: 16px;
    }

    .slideshow-dot {
        width: 7px;
        height: 7px;
    }

    .eventos-slideshow {
        min-height: 360px;
        height: 60vh;
    }

    .feature-card,
    .value-card {
        padding: var(--spacing-lg);
    }

    .highlight-card {
        padding: var(--spacing-xl);
    }

    .gallery-modal-item {
        height: 100px;
        flex-basis: 80px;
    }
}

/* ── 480px — Small phones (max-width rules) ── */
@media (max-width: 480px) {

    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .section-title {
        font-size: 1.85rem;
    }

    .features-grid,
    .values-grid,
    .highlights-grid,
    .event-cards-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links,
    .footer-social,
    .footer-brand {
        justify-content: center;
    }

    .cta-title {
        font-size: 1.8rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .page-hero {
        padding: calc(var(--spacing-2xl) + 60px) 0 var(--spacing-xl);
    }

    .section-header {
        margin-bottom: var(--spacing-xl);
    }

    .contact-map {
        height: 240px;
    }
}

/* ── 481–767px — Large phones / phablets ── */
@media (min-width: 481px) and (max-width: 767px) {

    .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid,
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .event-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr auto;
    }

    .feature-card,
    .value-card {
        padding: var(--spacing-lg);
    }

    .eventos-slideshow {
        min-height: 440px;
        height: 65vh;
    }

    .gallery-modal-item {
        height: 160px;
        flex-basis: 130px;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── 768–1023px — Tablet portrait ── */
@media (min-width: 768px) and (max-width: 1023px) {

    .hero-title {
        font-size: clamp(2.5rem, 5vw, 3.5rem);
    }

    .eventos-slideshow {
        min-height: 500px;
        height: 70vh;
    }

    .contact-map {
        height: 280px;
    }

    .event-card-image {
        height: 300px;
    }

    .page-hero-title {
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .resources-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── 1024–1279px — Large tablet / small desktop gap ── */
@media (min-width: 1024px) and (max-width: 1279px) {

    /* Force horizontal nav in this range */
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        flex-direction: row;
        background-color: transparent;
        padding: 0;
        width: auto;
        display: flex;
        margin-left: auto;
        padding-left: var(--spacing-xl);
    }

    .nav-link {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .section {
        padding: var(--spacing-2xl) 0;
    }

    .eventos-slideshow {
        height: 72vh;
        min-height: 500px;
    }

    .hero-title {
        font-size: clamp(3rem, 4.5vw, 3.75rem);
    }

    .resources-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
    }

    .highlights-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .values-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── 1440px — Large desktop ── */
@media (min-width: 1440px) {

    .container {
        max-width: 1360px;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-description {
        font-size: 1.35rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .cta-title {
        font-size: 3.25rem;
    }

    .lead-text {
        font-size: 1.3rem;
    }

    .eventos-slideshow {
        height: 85vh;
        max-height: 880px;
    }

    .event-card-image {
        height: 420px;
    }

    .contact-map {
        height: 360px;
    }

    .gallery-modal-item {
        height: 260px;
        flex-basis: 220px;
    }
}

/* ── 1920px — Full-HD / ultra-wide monitors ── */
@media (min-width: 1920px) {

    .container {
        max-width: 1600px;
    }

    .hero-title {
        font-size: 5rem;
    }

    .section-title {
        font-size: 3.5rem;
    }

    .features-grid,
    .values-grid {
        gap: var(--spacing-xl);
    }

    .highlight-card {
        padding: var(--spacing-3xl);
    }

    .eventos-slideshow {
        height: 80vh;
        max-height: 1000px;
    }

    .event-card-image {
        height: 460px;
    }

    .footer {
        padding: var(--spacing-3xl) 0 var(--spacing-xl);
    }
}

/* =====================================================
   INDEX.HTML — Mobile Portrait
   Phones held upright, width ≤ 767px
   ===================================================== */
@media (max-width: 767px) and (orientation: portrait) {

    /* Hero */
    .hero {
        min-height: 100svh;
        min-height: 100vh;
        /* fallback */
    }

    .hero-title {
        font-size: clamp(2rem, 9vw, 3rem);
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        letter-spacing: 0.12em;
    }

    .hero-description {
        font-size: 1rem;
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
    }

    /* Stack hero CTA buttons vertically */
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .hero-cta .cta-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
        justify-content: center;
    }

    /* Sections: tighter padding */
    .section {
        padding: var(--spacing-xl) 0;
    }

    /* Section headers: center everything */
    .section-header {
        text-align: center;
    }

    .section-title {
        font-size: clamp(1.7rem, 7vw, 2.2rem);
    }

    /* Quem Somos: single column, centered */
    .content-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Formação: 1 column on portrait mobile */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Ser Árbitro: 1 column */
    .values-grid {
        grid-template-columns: 1fr;
    }

    /* Destaques: single column on portrait */
    .highlights-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
    }

    /* Highlights card: side-by-side icon + text on single column */
    .highlight-card {
        padding: var(--spacing-xl);
    }

    /* Event cards: 1 column */
    .event-cards-grid {
        grid-template-columns: 1fr;
    }

    /* Contact: single column */
    .contact-grid {
        grid-template-columns: 1fr;
    }

    /* Final CTA: stack buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .cta-button {
        width: 100%;
        max-width: 300px;
        text-align: center;
        justify-content: center;
    }

    /* Footer: single column, centered */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-xl);
    }

    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--spacing-sm) var(--spacing-lg);
    }

    .footer-social {
        justify-content: center;
    }

    .footer-brand {
        justify-content: center;
    }
}

/* =====================================================
   INDEX.HTML — Mobile Landscape
   Phone turned sideways: tall aspect flips to wide
   Typically: height ≤ 500px, orientation landscape
   ===================================================== */
@media (max-height: 500px) and (orientation: landscape) {

    /* Hero: fill the short viewport exactly */
    .hero {
        min-height: 100vmin;
    }

    .hero-title {
        font-size: clamp(1.8rem, 5vw, 2.6rem);
        margin-bottom: var(--spacing-sm);
    }

    .hero-subtitle {
        font-size: 0.75rem;
        margin-bottom: var(--spacing-xs);
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-md);
        max-width: 70%;
    }

    /* Sections: tightest padding in landscape */
    .section {
        padding: var(--spacing-lg) 0;
    }

    /* Section titles: smaller */
    .section-title {
        font-size: 1.6rem;
    }

    /* Eventos slideshow: very short in landscape */
    .eventos-slideshow {
        height: 55vh;
        min-height: 280px;
    }

    /* Hide lead text in eventos — no vertical room */
    .eventos-content .lead-text {
        display: none;
    }

    /* Compact eventos content */
    .eventos-content {
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .eventos-content .section-title {
        font-size: 1.4rem;
        margin-bottom: var(--spacing-sm);
    }

    /* Slideshow arrows: smaller */
    .slideshow-arrow {
        width: 36px;
        height: 36px;
    }

    /* Contact map: shorter in landscape */
    .contact-map {
        height: 200px;
    }
}

/* ===================================
   Jantar — Payment Note
   =================================== */

.aniversario-payment-note {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    background-color: rgba(180, 130, 20, 0.08);
    border: 1px solid rgba(180, 130, 20, 0.30);
    border-left: 4px solid #b48214;
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-md);
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    color: var(--color-dark-gray);
    font-size: 0.92rem;
    line-height: 1.6;
}

.aniversario-payment-note svg {
    flex-shrink: 0;
    color: #b48214;
    margin-top: 2px;
}

/* ===================================
   Jantar — Local do Jantar (map area)
   =================================== */

.jantar-local-info {
    display: grid;
    gap: var(--spacing-xl);
    align-items: start;
    margin-top: var(--spacing-xl);
}

.jantar-local-info .contact-map {
    margin-top: 0;
}

.jantar-local-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .jantar-local-info {
        grid-template-columns: 280px 1fr;
    }
}

/* ===================================
   Cookie Consent Banner
   =================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 2px solid rgba(45, 95, 63, 0.6);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.45);
    padding: var(--spacing-md) var(--spacing-md);
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-banner--visible {
    transform: translateY(0);
}

.cookie-banner--hiding {
    transform: translateY(100%);
}

.cookie-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

/* Cookie icon */
.cookie-banner__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    color: var(--color-accent-green);
    display: none;
}

@media (min-width: 640px) {
    .cookie-banner__icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.cookie-banner__icon svg {
    width: 100%;
    height: 100%;
}

/* Text content */
.cookie-banner__content {
    flex: 1;
    min-width: 240px;
}

.cookie-banner__title {
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 4px;
}

.cookie-banner__text {
    color: rgba(229, 229, 229, 0.8);
    font-size: 0.85rem;
    line-height: 1.55;
    margin: 0;
}

.cookie-banner__text strong {
    color: var(--color-light-gray);
    font-weight: var(--font-weight-semibold);
}

/* Action buttons */
.cookie-banner__actions {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-shrink: 0;
}

.cookie-banner__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.4rem;
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid transparent;
    white-space: nowrap;
}

.cookie-banner__btn--accept {
    background-color: var(--color-accent-green);
    color: var(--color-white);
    border-color: var(--color-accent-green);
}

.cookie-banner__btn--accept:hover {
    background-color: transparent;
    color: var(--color-accent-green);
    transform: translateY(-1px);
}

.cookie-banner__btn--info {
    background: transparent;
    color: rgba(229, 229, 229, 0.75);
    border-color: rgba(229, 229, 229, 0.25);
}

.cookie-banner__btn--info:hover {
    color: var(--color-white);
    border-color: rgba(229, 229, 229, 0.55);
}

/* Expandable details */
.cookie-banner__details {
    max-width: 1200px;
    margin: var(--spacing-md) auto 0;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-banner__details[hidden] {
    display: none;
}

.cookie-banner__details-title {
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-sm);
}

.cookie-banner__list {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--spacing-sm);
    display: grid;
    gap: 0.5rem;
}

.cookie-banner__list li {
    color: rgba(229, 229, 229, 0.8);
    font-size: 0.82rem;
    line-height: 1.5;
    padding-left: 1.25rem;
    position: relative;
}

.cookie-banner__list li::before {
    content: '›';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--color-accent-green);
    font-weight: var(--font-weight-bold);
    font-size: 1rem;
    line-height: 1.3;
}

.cookie-banner__list li strong {
    color: var(--color-light-gray);
}

.cookie-banner__details-note {
    color: rgba(229, 229, 229, 0.65);
    font-size: 0.8rem;
    line-height: 1.5;
}

.cookie-banner__details-note strong {
    color: rgba(229, 229, 229, 0.9);
}

@media (min-width: 768px) {
    .cookie-banner {
        padding: var(--spacing-md) var(--spacing-xl);
    }

    .cookie-banner__list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cookie-banner__list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-banner {
        transition: none;
    }
}