/* ==========================================
   GRUPO TERRACOM - Premium Design System
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* CSS Variables */
:root {
    /* Brand Colors */
    --verde-folha: #4DB848;
    --azul-ceruleo: #0076BE;
    --azul-turquesa: #00A99D;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--verde-folha) 0%, var(--azul-turquesa) 50%, var(--azul-ceruleo) 100%);
    --gradient-dark: linear-gradient(180deg, #060e1a 0%, #0f1c30 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    --gradient-glow: radial-gradient(ellipse at 50% 0%, rgba(0,169,157,0.15) 0%, transparent 60%);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.75);
    --text-muted: rgba(255,255,255,0.5);
    --text-dark: #0f1c30;

    /* Background Colors */
    --bg-dark: #060e1a;
    --bg-dark-alt: #0a1525;
    --bg-card: rgba(255,255,255,0.05);
    --bg-card-hover: rgba(255,255,255,0.1);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Spacing */
    --section-padding: 100px;
    --container-width: 1320px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: var(--azul-turquesa);
    color: white;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 32px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.85rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.header.scrolled {
    background: linear-gradient(to bottom, rgba(255,255,255,0.97) 0%, rgba(255,255,255,0.85) 70%, rgba(255,255,255,0) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    padding: 8px 0 20px;
    box-shadow: none;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 70px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-color {
    display: none;
}

.header.scrolled .logo-white {
    display: none;
}

.header.scrolled .logo-color {
    display: block;
}

.header.scrolled .logo {
    height: 50px;
}

.nav {
    display: flex;
    gap: 36px;
    align-items: center;
}

.nav-link {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    position: relative;
    transition: var(--transition-fast);
    padding: 8px 0;
    text-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-link:hover { color: #ffffff; }
.nav-link:hover::after { width: 100%; }

.header.scrolled .nav-link {
    color: var(--text-dark);
}

.header.scrolled .nav-link:hover {
    color: var(--azul-turquesa);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    z-index: 10001;
    transition: var(--transition-fast);
}

.header.scrolled .mobile-menu-btn {
    color: var(--text-dark);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(6,14,26,0.9) 0%,
            rgba(6,14,26,0.75) 20%,
            rgba(6,14,26,0.55) 40%,
            rgba(6,14,26,0.4) 60%,
            rgba(6,14,26,0.85) 80%,
            rgba(6,14,26,1) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 900px;
    padding: 0 24px;
}

.hero-title {
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(40px);
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.4s;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    color: var(--text-secondary);
    margin-bottom: 48px;
    font-weight: 300;
    line-height: 1.8;
    opacity: 0;
    transform: translateY(40px);
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.6s;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    gap: 16px;
    opacity: 0;
    transform: translateY(40px);
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.8s;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: heroFadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 1.2s;
}

.scroll-indicator .scroll-line {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

.scroll-indicator .scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    animation: scrollLineMove 2s ease-in-out infinite;
}

@keyframes scrollLineMove {
    0% { top: -100%; }
    50% { top: 100%; }
    51% { top: -100%; }
    100% { top: -100%; }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    min-height: 48px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 60px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
    text-align: center;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 24px rgba(77,184,72,0.25);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--azul-ceruleo) 0%, var(--azul-turquesa) 50%, var(--verde-folha) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.btn-primary:hover::before { opacity: 1; }
/* isolation: isolate keeps z-index:-1 on ::before contained — text stays visible */
.btn-primary { position: relative; isolation: isolate; }

/* Card watermark (logo at 3% opacity, injected via JS) */
.card-watermark {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70% auto;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}
.governance-card > *:not(.card-watermark),
.esg-card > *:not(.card-watermark):not(.esg-hover-detail),
.area-card > *:not(.card-watermark):not(.area-desc) {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(77,184,72,0.35);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255,255,255,0.2);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

/* ==========================================
   SECTION SHARED STYLES
   ========================================== */
.section-padding {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 56px;
}

.section-subtitle {
    color: var(--azul-turquesa);
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 16px;
    display: inline-block;
}

.section-title {
    margin-bottom: 20px;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Companies section description — keep on single line on desktop */
@media (min-width: 769px) {
    .companies-section .section-description {
        white-space: nowrap;
        max-width: none;
    }
}

/* Decorative divider */
.section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 16px auto 0;
    border-radius: 3px;
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
    padding: var(--section-padding) 0;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.about::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('https://static.wixstatic.com/media/cb5f8c_d98f828da3e34ad1ab7beae7d830d993~mv2.jpg/v1/fill/w_2545,h_991,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/cb5f8c_d98f828da3e34ad1ab7beae7d830d993~mv2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.06;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
    pointer-events: none;
    z-index: 0;
}

.about .container {
    position: relative;
    z-index: 1;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,169,157,0.3), transparent);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 32px;
    font-weight: 700;
    text-align: center;
}

.about-text p {
    margin-bottom: 24px;
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    text-align: center;
}


/* ==========================================
   SECTION TRANSITIONS — soft gradient blend
   ========================================== */
.about::before,
.stats-section::before,
.companies-section::before,
.areas-section::before,
.governance-section::before,
.esg-section::before,
.partners-section::before,
.news-section::before,
.quote-section::before,
.timeline-section::before {
    content: '';
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent 0%, rgba(6,14,26,1) 35%, rgba(6,14,26,1) 65%, transparent 100%);
    z-index: 2;
    pointer-events: none;
}

/* ==========================================
   STATS SECTION
   ========================================== */
.stats-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark-alt);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
}

.stat-card {
    text-align: center;
    padding: 36px 24px;
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0,169,157,0.3);
    box-shadow: 0 20px 60px rgba(0,169,157,0.1);
}

.stat-card:hover::before {
    opacity: 0.05;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    letter-spacing: -0.03em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-prefix, .stat-suffix {
    font-size: 0.45em;
    font-weight: 700;
    vertical-align: text-bottom;
    margin: 0 4px;
    display: inline-block;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-sublabel {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==========================================
   COMPANIES MOSAIC
   ========================================== */
.companies-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark);
    position: relative;
}

.companies-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
}

.company-card {
    position: relative;
    aspect-ratio: 1;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
    text-decoration: none;
}

.company-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(0,169,157,0.3);
    box-shadow: 0 12px 32px rgba(0,169,157,0.12);
    background: #ffffff;
}

.company-logo {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.company-card:hover .company-logo {
    opacity: 1;
    transform: scale(1.08);
    filter: none;
}

.company-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.company-card:hover .company-name {
    opacity: 1;
    transform: translateY(0);
    color: var(--text-dark);
    background: linear-gradient(transparent, rgba(255,255,255,0.98));
}

/* ==========================================
   AREAS OF OPERATION
   ========================================== */
.areas-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark-alt);
    position: relative;
}

.areas-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    pointer-events: none;
}

.areas-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    position: relative;
    justify-content: center;
}

.area-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 32px 16px;
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.06);
    text-align: center;
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s, transform 0.3s;
    position: relative;
    overflow: visible;
    flex: 0 1 150px;
    min-width: 130px;
    cursor: pointer;
}

.area-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.area-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-6px);
    border-color: rgba(77,184,72,0.3);
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
}

.area-card:hover::before {
    transform: scaleX(1);
}

.area-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    flex-shrink: 0;
}

.area-icon svg,
.governance-icon svg {
    width: 28px;
    height: 28px;
    stroke: #ffffff !important;
    fill: none;
    transition: var(--transition-medium);
}

.area-card:hover .area-icon svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 6px rgba(255,255,255,0.4));
}

.area-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.3;
}

.area-card:hover .area-name {
    color: var(--text-primary);
}

.area-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    width: 260px;
    max-width: calc(100vw - 48px);
    background: var(--bg-card);
    border: 1px solid rgba(77,184,72,0.25);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 20;
}

.area-card:hover .area-desc {
    opacity: 1;
    transform: translateX(-50%) translateY(8px);
    pointer-events: auto;
}

/* ==========================================
   GOVERNANCE SECTION
   ========================================== */
.governance-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark);
    position: relative;
}

.governance-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}

.governance-card {
    text-align: center;
    padding: 40px 24px;
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.governance-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.governance-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(0,118,190,0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.governance-card:hover::after {
    opacity: 1;
}

.governance-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
}

.governance-icon svg {
    width: 32px;
    height: 32px;
}

.governance-card:hover .governance-icon svg {
    transform: scale(1.1);
}

.governance-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.governance-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================
   PARTNERS SECTION
   ========================================== */
.partners-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark-alt);
    text-align: center;
    position: relative;
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 48px;
}

a.partner-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.partner-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md);
    padding: 22px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    min-height: 110px;
    justify-content: center;
    flex: 0 1 calc((100% - 4 * 14px) / 5);
    min-width: 150px;
}

.partner-card:hover {
    background: #ffffff;
    border-color: rgba(0,169,157,0.3);
    box-shadow: 0 12px 32px rgba(0,169,157,0.12);
    transform: translateY(-3px);
}

.partner-logo {
    height: 64px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.partner-monogram {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e8e8e8, #d0d0d0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: #999;
    letter-spacing: -0.02em;
    transition: background 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

.partner-card:hover .partner-monogram {
    background: var(--gradient-primary);
    color: #fff;
}

.partner-name {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.35;
    transition: color 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.partner-card:hover .partner-name {
    color: var(--text-dark);
}

@media (max-width: 1024px) {
    .partner-card { flex: 0 1 calc((100% - 3 * 14px) / 4); }
}
@media (max-width: 768px) {
    .partners-grid { gap: 12px; }
    .partner-card { flex: 0 1 calc((100% - 2 * 12px) / 3); }
}

/* ==========================================
   NEWS SECTION
   ========================================== */
.news-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark);
    text-align: center;
    position: relative;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    align-items: center;
    justify-items: center;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.news-logo {
    background: var(--gradient-card);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-logo:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.news-logo img {
    max-width: 100%;
    max-height: 80%;
    object-fit: contain;
}

/* ==========================================
   NEWS CARDS
   ========================================== */
.news-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 72px;
}

.news-card {
    background: var(--gradient-card);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0,169,157,0.3);
    box-shadow: 0 24px 60px rgba(0,0,0,0.25);
    background: var(--bg-card-hover);
}

.news-card-badge {
    display: inline-block;
    padding: 6px 16px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 0 0 var(--radius-sm) 0;
    position: absolute;
    top: 0;
    left: 0;
}

/* All badges use Grupo Terracom gradient */

/* News card featured image (generated by JS) */
.news-card-image {
    height: 100px;
    width: 100%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.news-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.06) 0%, transparent 55%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.04) 0%, transparent 50%);
}

/* When card has an image, badge overlays it — reduce body top padding */
.news-card:has(.news-card-image) .news-card-body {
    padding-top: 20px;
}

/* Recent/highlight card */
.news-card.news-recent {
    border-color: rgba(0,169,157,0.25);
    box-shadow: 0 0 20px rgba(0,169,157,0.08);
}

/* All badges use Grupo Terracom gradient — no overrides per card type */



.news-card-body {
    padding: 40px 20px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-card-source {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--azul-turquesa);
    margin-bottom: 12px;
}

.news-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card:hover .news-card-title {
    color: white;
}

.news-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--azul-turquesa);
    margin-top: 20px;
    transition: all 0.3s ease;
}

.news-card:hover .news-card-link {
    color: var(--verde-folha);
    padding-left: 8px;
}

/* News load more */
.news-load-more {
    text-align: center;
    margin-top: 48px;
    margin-bottom: 48px;
}

/* Media Logos subsection */
/* ==========================================
   MEDIA GALLERY — Clean grid, visible on load
   ========================================== */
.media-logos-section {
    text-align: center;
    padding-top: 64px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.media-logos-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--text-muted);
    margin-bottom: 36px;
}

/* Clean CSS grid — uniform cards */
.media-logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Tier separator */
.media-tier-sep {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0 4px;
}

.media-tier-sep::before,
.media-tier-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.06);
}

.media-tier-sep span {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.2);
    white-space: nowrap;
}

/* Media outlet wrapper — stagger-in animation */
.media-outlet {
    position: relative;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.media-outlet.media-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Unified card style — both <a> and <button> */
.media-logo-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    aspect-ratio: 1.2;
    padding: 16px 10px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
}

.media-logo-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.07);
    border-color: rgba(0,169,157,0.3);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,169,157,0.1);
}

/* Button reset */
.media-outlet button.media-logo-link {
    font-family: inherit;
    cursor: pointer;
}

/* Favicon */
.media-favicon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    object-fit: contain;
    opacity: 0.85;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border-radius: 8px;
}

.media-logo-link:hover .media-favicon {
    opacity: 1;
    transform: scale(1.1);
}

/* Fallback initials */
.media-favicon-fallback {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Outlet name */
.media-name {
    font-size: 0.62rem;
    font-weight: 600;
    color: inherit;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Article count badge */
.media-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 5px;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

/* ==========================================
   MEDIA MODAL — appended to body, always on top
   ========================================== */
.media-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.94);
    min-width: 320px;
    max-width: 460px;
    width: 92vw;
    max-height: 72vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    background: #0b192c;
    border: 1px solid rgba(0,169,157,0.22);
    border-radius: 22px;
    box-shadow: 0 28px 72px rgba(0,0,0,0.7);
    opacity: 0;
    transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.media-modal.open {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* Scroll fade hint at bottom */
.media-modal::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: linear-gradient(transparent, #0b192c);
    pointer-events: none;
    flex-shrink: 0;
    border-radius: 0 0 22px 22px;
    transition: opacity 0.3s ease;
}

.media-modal.scrolled-bottom::after {
    opacity: 0;
}

.media-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    background: #0b192c;
    border-radius: 22px 22px 0 0;
    z-index: 1;
}

.media-modal-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.02em;
}

.media-modal-close {
    background: rgba(255,255,255,0.06);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    font-family: inherit;
}

.media-modal-close:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.media-modal-links {
    padding: 8px;
}

.media-modal-links a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 13px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    line-height: 1.45;
    border-radius: 12px;
    transition: background 0.18s ease, color 0.18s ease;
}

.media-modal-links a:hover {
    background: rgba(0,169,157,0.1);
    color: var(--text-primary);
}

.media-modal-links a strong {
    font-size: 0.84rem;
    font-weight: 600;
    color: inherit;
    display: block;
    line-height: 1.4;
}

.media-modal-links a:hover strong {
    color: var(--azul-turquesa);
}

.media-modal-links a span {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
}

/* Backdrop */
.media-dropdown-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.55);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.media-dropdown-backdrop.open {
    display: block;
}

/* Hidden in-HTML dropdowns — data source only, never rendered */
.media-dropdown {
    display: none !important;
}

@media (max-width: 1200px) {
    .news-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .news-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .news-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-card-badge {
        position: static;
        display: inline-block;
        border-radius: var(--radius-sm);
        margin: 16px 16px 0;
    }

    .news-card-body {
        padding-top: 12px;
    }

    .news-card:has(.news-card-image) .news-card-badge {
        position: absolute;
        margin: 0;
        border-radius: 0 0 var(--radius-sm) 0;
    }

    .news-card:has(.news-card-image) .news-card-body {
        padding-top: 16px;
    }

    .media-logos-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }

    .media-logo-link {
        padding: 12px 8px;
        border-radius: 12px;
    }

    .media-favicon {
        width: 26px;
        height: 26px;
    }

    .media-name {
        font-size: 0.58rem;
    }
}

/* ==========================================
   NEWS SUGGESTION STRIP
   ========================================== */
.news-suggestion {
    text-align: center;
    padding: 20px 32px;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--gradient-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.06);
    margin-top: 32px;
    line-height: 1.6;
}

.news-suggestion strong {
    color: var(--verde-folha);
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    padding: 80px 0 32px;
    background: #030810;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,169,157,0.4), transparent);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo-img {
    height: 64px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.85;
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.address-box {
    padding: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.06);
}

.address-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-map-btns {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-map {
    padding: 8px 14px;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.08);
    color: var(--text-secondary);
    border-radius: 60px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-map:hover {
    background: var(--azul-turquesa);
    color: white;
    transform: translateY(-1px);
}

.footer-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 14px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: var(--azul-turquesa);
    padding-left: 8px;
}

.footer-emails a {
    font-size: 0.82rem;
    word-break: break-all;
}

.footer-emails-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 16px;
    padding: 20px 0;
    margin-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-emails-strip a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-emails-strip a:hover {
    color: var(--azul-turquesa);
}

.footer-email-sep {
    color: rgba(255,255,255,0.15);
    font-size: 0.75rem;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 50%;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-social a:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,169,157,0.25);
}

/* ==========================================
   BACK TO TOP
   ========================================== */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 24px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: rgba(0,169,157,0.2);
    border-color: rgba(0,169,157,0.4);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0,169,157,0.25);
}

.back-to-top svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.back-to-top:hover svg {
    transform: translateY(-2px);
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.stats-grid .stat-card.visible,
.areas-grid .area-card.visible,
.governance-grid .governance-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
    .governance-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .governance-card {
        padding: 36px 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    /* ── Section dividers: subtle gradient line between sections ── */
    section {
        position: relative;
    }

    section + section::after {
        content: '';
        position: absolute;
        top: 0;
        left: 10%;
        right: 10%;
        height: 1px;
        background: linear-gradient(to right,
            transparent,
            rgba(0,169,157,0.2) 30%,
            rgba(0,169,157,0.2) 70%,
            transparent);
        z-index: 1;
        pointer-events: none;
    }

    .nav {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(6,14,26,0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
        z-index: 10000;
    }

    .nav.active {
        display: flex;
    }

    .nav .nav-link {
        color: var(--text-primary) !important;
        font-size: 1.5rem;
        font-weight: 600;
        padding: 16px 32px;
        opacity: 0;
        transform: translateY(20px);
        animation: heroFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .nav.active .nav-link:nth-child(1) { animation-delay: 0.1s; }
    .nav.active .nav-link:nth-child(2) { animation-delay: 0.15s; }
    .nav.active .nav-link:nth-child(3) { animation-delay: 0.2s; }
    .nav.active .nav-link:nth-child(4) { animation-delay: 0.25s; }
    .nav.active .nav-link:nth-child(5) { animation-delay: 0.3s; }

    .nav .nav-link:hover {
        color: var(--azul-turquesa) !important;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-btn svg {
        width: 24px;
        height: 24px;
    }

    .hero-content {
        padding: 0 20px;
    }

    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .stat-card {
        padding: 32px 24px;
    }

    .companies-mosaic {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .governance-grid {
        grid-template-columns: 1fr;
    }

    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .area-desc {
        position: static;
        transform: none;
        width: auto;
        opacity: 1;
        pointer-events: auto;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 6px 0 0;
        font-size: 0.7rem;
    }

    .area-card:hover .area-desc {
        transform: none;
    }

    .company-name {
        opacity: 1;
        transform: translateY(0);
        font-size: 0.7rem;
        padding: 8px;
        background: linear-gradient(transparent, rgba(0,0,0,0.85));
    }

    .company-logo {
        max-height: 65%;
        margin-top: -10px;
    }

    .company-card {
        padding: 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }

    .scroll-indicator {
        bottom: 24px;
    }

    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
    }

    .error-report-btn {
        bottom: 16px;
        right: 68px;
        width: 44px;
        height: 44px;
    }

    .section-header::after {
        margin-top: 20px;
    }
}

@media (max-width: 480px) {
    :root {
        --section-padding: 48px;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .footer-email-sep {
        display: none;
    }

    .footer-emails-strip {
        flex-direction: column;
        gap: 6px;
    }

    .governance-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 24px 16px;
    }

    .stat-number {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .companies-mosaic {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .areas-grid {
        grid-template-columns: 1fr 1fr;
    }

    .partners-grid {
        gap: 10px;
    }

    .partner-card {
        flex: 0 1 calc((100% - 10px) / 2);
    }

    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .logo {
        height: 50px;
    }

    .header.scrolled .logo {
        height: 40px;
    }

    .governance-card {
        padding: 28px 20px;
    }

    .error-report-btn:hover {
        width: 44px;
        padding: 0;
        justify-content: center;
    }

    .error-report-btn:hover .error-report-text {
        display: none;
    }
}

@media (max-width: 360px) {
    :root {
        --section-padding: 48px;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .companies-mosaic {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .partners-grid {
        gap: 8px;
    }

    .partner-card {
        flex: 0 1 calc((100% - 8px) / 2);
    }

    .partner-card {
        padding: 16px 10px 14px;
        min-height: 90px;
    }

    .governance-card {
        padding: 24px 16px;
    }

    .section-title {
        font-size: clamp(1.4rem, 6vw, 2rem);
    }
}

/* ==========================================
   TIMELINE SECTION
   ========================================== */
.timeline-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

.timeline-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    pointer-events: none;
}

.timeline-wrapper {
    position: relative;
}

/* Hover zones for left/right navigation */
.timeline-nav-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.timeline-wrapper:hover .timeline-nav-zone {
    opacity: 1;
}

@media (max-width: 768px) {
    .timeline-nav-zone {
        display: none;
    }
}

.timeline-nav-zone--left {
    left: 0;
    background: linear-gradient(90deg, var(--bg-dark) 0%, transparent 100%);
}

.timeline-nav-zone--right {
    right: 0;
    background: linear-gradient(-90deg, var(--bg-dark) 0%, transparent 100%);
}

.timeline-nav-zone svg {
    width: 28px;
    height: 28px;
    stroke: rgba(255,255,255,0.5);
    fill: none;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.timeline-nav-zone:hover svg {
    stroke: var(--azul-turquesa);
    transform: scale(1.2);
}

.timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 40px 0 32px;
    position: relative;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    /* Fade edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 60px, black calc(100% - 60px), transparent);
    mask-image: linear-gradient(to right, transparent, black 60px, black calc(100% - 60px), transparent);
}

.timeline::-webkit-scrollbar {
    display: none;
}

/* Timeline line — inserted via JS as a real element (.timeline-line) */
.timeline-line {
    position: absolute;
    top: 58px;
    left: 0;
    height: 3px;
    background: rgba(0,169,157,0.25);
    border-radius: 2px;
    z-index: 1;
    pointer-events: none;
    /* Fade at both ends */
    -webkit-mask-image: linear-gradient(to right, transparent, black 80px, black calc(100% - 80px), transparent);
    mask-image: linear-gradient(to right, transparent, black 80px, black calc(100% - 80px), transparent);
}

.timeline-line-glow {
    position: absolute;
    top: 56px;
    left: -120px;
    width: 120px;
    height: 7px;
    background: linear-gradient(90deg, transparent, var(--azul-turquesa), var(--verde-folha), transparent);
    border-radius: 4px;
    filter: blur(3px);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 170px;
    flex: 1;
    position: relative;
    text-align: center;
    padding: 0 10px;
    padding-top: 38px; /* content below dot: 12.5px top + 14px dot + ~11px gap */
}

.timeline-item::before {
    content: '';
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 0 16px rgba(0,169,157,0.4);
    position: absolute;
    top: 12.5px; /* center on line: (58px line - 40px timeline-padding) + 1.5px - 7px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    transition: all 0.4s ease;
}

.timeline-item:hover::before {
    transform: translateX(-50%) scale(1.4);
    box-shadow: 0 0 24px rgba(0,169,157,0.6);
}

.timeline-year {
    font-size: 1.1rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Scroll-in animation for timeline years */
.timeline-year.tl-year-init {
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-year.tl-year-visible {
    opacity: 1;
    transform: scale(1);
}

/* Hover scale-up */
.timeline-item:hover .timeline-year,
.timeline-item-double:hover .timeline-year {
    transform: scale(1.3);
}

/* Legend hidden — logos are self-explanatory */
.timeline-desc {
    display: none;
}

/* Timeline logo elements */
.timeline-logo-wrap {
    width: 138px;
    height: 100px;
    border-radius: 16px;
    background: rgba(255,255,255,0.06);
    border: 1.5px solid rgba(255,255,255,0.14);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
    padding: 10px 16px;
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    animation: logoPulse 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.timeline-logo-wrap:hover {
    transform: scale(1.18) translateY(-5px);
    border-color: var(--azul-turquesa);
    background: #ffffff;
    box-shadow: 0 0 24px rgba(0,169,157,0.35), 0 10px 24px rgba(0,0,0,0.3);
    animation: none;
}

.timeline-logo {
    max-width: 100px;
    max-height: 66px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    transition: all 0.4s ease;
}

.timeline-logo-wrap:hover .timeline-logo {
    filter: none;
    transform: scale(1.05);
}

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

/* Multi-company timeline items — width scales with number of logos */
.timeline-item-double {
    min-width: 310px;
    flex: 2;
}

.timeline-item-double .timeline-year {
    font-size: 1.2rem;
}

.timeline-logos-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0;
    flex-wrap: wrap;
}

/* Connector lines from main dot to each logo — hidden */
.timeline-logos-row::before {
    display: none;
}

/* ==========================================
   TIMELINE MILESTONES (marcos históricos)
   ========================================== */

/* Color tokens per milestone type */
.timeline-milestone                   { --mc: #00A99D; --mc2: #0076BE; }
.tl-milestone--saneamento             { --mc: #0076BE; --mc2: #00A99D; }
.tl-milestone--aeroportos             { --mc: #7B61FF; --mc2: #00A99D; }
.tl-milestone--residuos               { --mc: #4DB848; --mc2: #00A99D; }
.tl-milestone--rodovias               { --mc: #0076BE; --mc2: #00A99D; }

.timeline-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 170px;
    flex: 1;
    position: relative;
    cursor: default;
    z-index: 2;
    padding: 0 10px;
    /* Start hidden — revealed by JS IntersectionObserver */
    opacity: 0;
    transform: scale(0.7) translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-milestone.tl-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Vertical glowing lines — hidden on desktop, badge sits directly on line */
.tl-milestone-line {
    display: none;
}

/* Circular badge — sits ON the timeline line */
.tl-milestone-badge {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, var(--mc2), var(--mc));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.06), 0 4px 16px rgba(0,0,0,0.4);
    filter: drop-shadow(0 0 8px var(--mc));
    animation: milestonePulse 3s ease-in-out infinite;
    position: absolute;
    top: -0.5px; /* center badge (40px) on line: 19.5px center - 20px half = -0.5px */
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.tl-milestone-badge svg {
    width: 18px;
    height: 18px;
    stroke: #fff;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

/* Text block — below the line */
.tl-milestone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 12px;
    margin-top: 38px; /* space for badge on line + gap */
    background: linear-gradient(135deg,
        rgba(255,255,255,0.06) 0%,
        rgba(255,255,255,0.02) 100%);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 14px;
    text-align: center;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
    min-width: 140px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.tl-milestone-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--mc), transparent);
}

.tl-milestone-year {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1;
}

.tl-milestone-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.tl-milestone-sub {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.55);
    font-style: italic;
    line-height: 1.3;
}

/* Hover — lift and intensify glow */
.timeline-milestone:hover .tl-milestone-badge {
    transform: translateX(-50%) scale(1.15);
    filter: brightness(1.2) drop-shadow(0 0 12px var(--mc));
    animation: none;
}

.timeline-milestone:hover .tl-milestone-content {
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.12);
    transform: translateY(-3px);
}

/* Pulse animation using opacity + filter instead of box-shadow for performance */
@keyframes milestonePulse {
    0%, 100% { filter: brightness(1) drop-shadow(0 0 8px var(--mc)); }
    50%       { filter: brightness(1.15) drop-shadow(0 0 18px var(--mc)); }
}

/* Mobile milestone sizes now handled inside main timeline @media block */

/* Logos in row — same size as singles */
.timeline-logos-row .timeline-logo-wrap {
    width: 138px;
    height: 100px;
    border-radius: 16px;
    border-width: 1.5px;
    padding: 10px 16px;
    margin: 0;
    flex-shrink: 0;
    z-index: 1;
    position: relative;
}

.timeline-logos-row .timeline-logo {
    max-width: 100px;
    max-height: 66px;
    width: auto;
    height: auto;
}

/* Hover: same as single logo cards */
.timeline-logos-row .timeline-logo-wrap:hover {
    transform: scale(1.18) translateY(-5px);
    z-index: 10;
    border-color: var(--azul-turquesa);
    background: #ffffff;
    box-shadow: 0 0 24px rgba(0,169,157,0.35), 0 10px 24px rgba(0,0,0,0.3);
    animation: none;
}

.timeline-logos-row .timeline-logo-wrap:hover .timeline-logo {
    filter: none;
    transform: scale(1.05);
}

/* Clickable timeline items */
a.timeline-item {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.timeline-item:hover {
    text-decoration: none;
}

/* Staggered animation delays for timeline logos */
.timeline-item:nth-child(1) .timeline-logo-wrap { animation-delay: 0s; }
.timeline-item:nth-child(2) .timeline-logo-wrap { animation-delay: 0.2s; }
.timeline-item:nth-child(3) .timeline-logo-wrap { animation-delay: 0.4s; }
.timeline-item:nth-child(4) .timeline-logo-wrap { animation-delay: 0.6s; }
.timeline-item:nth-child(5) .timeline-logo-wrap { animation-delay: 0.8s; }
.timeline-item:nth-child(6) .timeline-logo-wrap { animation-delay: 1.0s; }
.timeline-item:nth-child(7) .timeline-logo-wrap { animation-delay: 1.2s; }
.timeline-item:nth-child(8) .timeline-logo-wrap { animation-delay: 1.4s; }
.timeline-item:nth-child(9) .timeline-logo-wrap { animation-delay: 1.6s; }
.timeline-item:nth-child(10) .timeline-logo-wrap { animation-delay: 1.8s; }
.timeline-item:nth-child(11) .timeline-logo-wrap { animation-delay: 2.0s; }
.timeline-item:nth-child(12) .timeline-logo-wrap { animation-delay: 2.2s; }
.timeline-item:nth-child(13) .timeline-logo-wrap { animation-delay: 2.4s; }
.timeline-item:nth-child(14) .timeline-logo-wrap { animation-delay: 2.6s; }
.timeline-item:nth-child(15) .timeline-logo-wrap { animation-delay: 2.8s; }

/* Timeline scrollbar hidden — auto-scroll via JS */

/* Timeline responsive - vertical centered on mobile */
@media (max-width: 768px) {
    .timeline {
        flex-direction: column;
        align-items: center;
        overflow-x: hidden !important;
        overflow-y: visible;
        padding: 24px 0;
        scroll-behavior: auto;
        position: relative;
        width: 100%;
        gap: 20px; /* uniform spacing between ALL children */
        /* Override desktop horizontal mask — not needed on vertical */
        -webkit-mask-image: none;
        mask-image: none;
    }

    /* Hide JS-generated line and glow — we use a CSS pseudo-element instead */
    .timeline > .timeline-line,
    .timeline > .timeline-line-glow {
        display: none !important;
    }

    /* Central vertical line via pseudo-element — with fade at top/bottom */
    .timeline::before {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        background: linear-gradient(to bottom,
            transparent,
            rgba(0,169,157,0.3) 40px,
            rgba(0,169,157,0.3) calc(100% - 40px),
            transparent);
        z-index: 0;
        pointer-events: none;
    }

    /* Hide desktop nav zones */
    .timeline-nav-zone { display: none !important; }

    /* ── Regular items: stacked vertically, centered ── */
    .timeline-item {
        flex-direction: column;
        align-items: center;
        min-width: unset !important;
        width: auto;
        max-width: 300px;
        text-align: center;
        padding: 0 !important;
        margin: 0 !important;
        gap: 5px; /* tight gap: year label → logo box */
        position: relative;
        z-index: 1;
    }

    /* Hide the dot — year box replaces it visually */
    .timeline-item::before {
        display: none !important;
    }

    /* Year — gradient text like desktop, no box */
    .timeline-year {
        display: inline-block !important;
        font-size: 1.1rem;
        font-weight: 800;
        letter-spacing: -0.02em;
        background: var(--gradient-primary) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        border: none;
        border-radius: 0;
        padding: 0;
        margin-bottom: 0;
        position: relative;
        z-index: 2;
        opacity: 1 !important;
        transform: none !important;
    }

    .timeline-logo-wrap {
        width: 168px;
        height: 105px;
        border-radius: 16px;
        padding: 10px 16px;
        margin: 0 !important;
        flex-shrink: 0;
        animation: none !important;
    }

    .timeline-logo {
        max-width: 130px;
        max-height: 75px;
        width: auto;
        height: auto;
    }

    /* Double items are split into singles via JS on mobile */
    .timeline-item-double {
        display: none;
    }

    /* ── Milestones: centered card with animations ── */
    .timeline-milestone {
        width: 80%;
        max-width: 280px;
        flex-direction: column;
        align-items: center;
        padding: 0;
        margin: 0;
        position: relative;
        z-index: 1;
        /* Allow JS IntersectionObserver animations */
        opacity: 0;
        transform: scale(0.85) translateY(15px);
        transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .timeline-milestone.tl-visible {
        opacity: 1;
        transform: scale(1) translateY(0);
    }

    .tl-milestone-line {
        display: block;
        width: 2px;
        height: 20px;
        background: linear-gradient(to bottom, transparent, var(--mc), transparent);
        flex-shrink: 0;
    }

    .tl-milestone-badge {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        position: relative;
        left: auto;
        top: auto;
        transform: none;
        margin: 0;
        animation: milestonePulse 3s ease-in-out infinite;
    }

    .tl-milestone-badge svg {
        width: 18px;
        height: 18px;
    }

    .tl-milestone-content {
        width: 100%;
        padding: 14px 16px;
        text-align: center;
        position: relative;
        min-width: unset;
        margin-top: 0;
    }

    .tl-milestone-year {
        font-size: 1.3rem;
    }

    .tl-milestone-title {
        font-size: 0.85rem;
    }

    .tl-milestone-sub {
        font-size: 0.72rem;
    }
}

/* ==========================================
   ESG / SUSTENTABILIDADE SECTION
   ========================================== */
.esg-section {
    padding: var(--section-padding) 0;
    background: var(--bg-dark-alt);
    position: relative;
    overflow: hidden;
}

.esg-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-glow);
    pointer-events: none;
}

.esg-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    justify-content: center;
}

.esg-card {
    padding: 36px 24px;
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.06);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    flex: 1 1 220px;
    min-width: 200px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.esg-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.esg-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: rgba(77,184,72,0.3);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.esg-card:hover::after {
    opacity: 1;
}

.esg-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    margin-bottom: 20px;
}

.esg-icon svg {
    width: 28px;
    height: 28px;
    stroke: #ffffff;
    fill: none;
}

.esg-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.esg-card-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.esg-card:hover .esg-card-text {
    color: var(--text-secondary);
}

.esg-hover-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.5;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    width: 280px;
    max-width: calc(100vw - 48px);
    background: var(--bg-card);
    border: 1px solid rgba(77,184,72,0.3);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 20;
    display: block;
}

.esg-card:hover .esg-hover-detail {
    opacity: 1;
    transform: translateX(-50%) translateY(8px);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .esg-grid {
        flex-direction: column;
        gap: 16px;
    }

    .esg-card {
        flex: 1 1 auto;
        max-width: 100%;
        padding: 32px 24px;
    }

    .esg-hover-detail {
        display: block;
        position: static;
        transform: none;
        width: auto;
        opacity: 1;
        pointer-events: auto;
        background: rgba(255,255,255,0.04);
        border: none;
        box-shadow: none;
        padding: 10px 12px;
        margin-top: 12px;
        border-radius: 8px;
        border-left: 3px solid var(--verde-folha);
        color: var(--text-secondary);
        font-size: 0.8rem;
    }

    .esg-card:hover .esg-hover-detail {
        transform: none;
    }
}

/* ==========================================
   QUOTE SECTION
   ========================================== */
.quote-section {
    padding: var(--section-padding) 0;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.quote-bg-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.quote-bg-slide {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at center, rgba(0,0,0,0.6) 0%, transparent 100%);
    mask-image: radial-gradient(ellipse 70% 60% at center, rgba(0,0,0,0.6) 0%, transparent 100%);
}

.quote-bg-slide.active {
    opacity: 0.05;
}

/* Stars-in-the-sky company logos behind the quote */
.quote-marquee-wrap {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.quote-marquee-logo {
    position: absolute;
    width: var(--sz, 36px);
    height: auto;
    filter: brightness(0) invert(1);
    opacity: var(--op, 0.10);
    animation: starFloat1 8s ease-in-out infinite;
    transform-origin: center;
    will-change: transform;
}

@keyframes starFloat1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-10px) rotate(2deg); }
}
@keyframes starFloat2 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(8px) rotate(-2deg); }
}
@keyframes starFloat3 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    33%       { transform: translateY(-7px) rotate(1.5deg); }
    66%       { transform: translateY(6px) rotate(-1.5deg); }
}

.quote-content {
    max-width: 750px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.quote-icon {
    margin-bottom: 28px;
}

.quote-text {
    font-size: clamp(1.2rem, 2.5vw, 1.65rem);
    font-weight: 300;
    line-height: 1.9;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 28px;
}

.quote-divider {
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    margin: 0 auto 28px;
    border-radius: 3px;
}

.quote-author {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quote-author-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.quote-author-title {
    font-size: 0.85rem;
    color: var(--azul-turquesa);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .quote-marquee-logo { width: 22px !important; }
}

/* ==========================================
   SUBPAGE STYLES (Gallery, About, CTA, etc.)
   ========================================== */
.about-section {
    padding: 80px 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0d1e35 100%);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-text h3 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.about-text p {
    margin-bottom: 24px;
}

.about-areas {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 40px;
}

.about-areas h4 {
    color: var(--azul-turquesa);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 24px;
}

.areas-list { list-style: none; }

.areas-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.areas-list li:last-child { border-bottom: none; }
.areas-list li::before { content: '\2713'; color: var(--verde-folha); font-weight: bold; }

/* Metrics */
.metrics-section { padding: 80px 0; background: var(--bg-dark); }

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
}

.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 32px;
    text-align: center;
    transition: var(--transition-medium);
}

.metric-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    border-color: var(--azul-turquesa);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.metric-value--pending {
    opacity: 0.5;
    letter-spacing: 0.05em;
}

.metric-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CTA Section */
.cta-section { padding: 80px 0; background: var(--bg-dark); text-align: center; }

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 32px;
}

/* Gallery */
.gallery-section { padding: 80px 0; background: linear-gradient(180deg, #0d1e35 0%, var(--bg-dark) 100%); }

.gallery-category {
    color: var(--azul-turquesa);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 40px 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--azul-turquesa);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
    transition: var(--transition-medium);
}

.gallery-item:hover { transform: scale(1.02); box-shadow: 0 20px 40px rgba(0,169,157,0.3); }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-medium);
}

.gallery-item:hover img { transform: scale(1.05); }

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition-medium);
}

.gallery-item:hover .gallery-caption { opacity: 1; transform: translateY(0); }

/* Microsite Hero / Back link */
.microsite-hero { min-height: 60vh; padding-top: 100px; }

.back-link {
    position: fixed;
    top: 100px;
    left: 24px;
    padding: 12px 20px;
    font-size: 0.95rem;
    z-index: 900;
    background: rgba(6,14,26,0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 60px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.back-link:hover { background: var(--azul-turquesa); color: white; }

@media (max-width: 768px) {
    .microsite-hero { min-height: 45vh; padding-top: 80px; }
    .back-link { position: relative; top: auto; left: auto; margin: 80px 16px 0; display: inline-flex; font-size: 0.85rem; padding: 10px 16px; }
    .cta-buttons { flex-direction: column; }
    .gallery-grid { grid-template-columns: 1fr; }
}

/* ==========================================
   ERROR REPORTING BUTTON
   ========================================== */
.error-report-btn {
    position: fixed;
    bottom: 28px;
    right: 72px; /* next to back-to-top */
    background: rgba(255,255,255,0.08);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    height: 40px;
    width: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
    white-space: nowrap;
}

.error-report-btn:hover {
    width: 170px;
    padding: 0 16px;
    justify-content: flex-start;
    gap: 10px;
    background: rgba(238,90,90,0.15);
    border-color: rgba(238,90,90,0.4);
    color: #ff6b6b;
    box-shadow: 0 4px 20px rgba(238,90,90,0.2);
    transform: translateY(-3px);
}

.error-report-text {
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    width: 0;
}

.error-report-btn:hover .error-report-text {
    opacity: 1;
    transform: translateX(0);
    width: auto;
}

.error-report-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
}

.error-report-icon svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.error-report-btn:hover .error-report-icon svg {
    transform: rotate(90deg);
}

/* Error Report Modal */
.error-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.error-modal-overlay.active { display: flex; }

.error-modal {
    background: #0f1c30;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.error-modal h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.error-modal textarea {
    width: 100%;
    min-height: 120px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-sm);
    padding: 12px;
    color: var(--text-primary);
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
}

.error-modal textarea:focus {
    outline: none;
    border-color: var(--azul-turquesa);
}

.error-modal-info {
    background: rgba(0,169,157,0.08);
    border: 1px solid rgba(0,169,157,0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.error-modal-info p { margin: 4px 0; }

.error-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.error-modal .btn-cancel {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.error-modal .btn-cancel:hover {
    border-color: rgba(255,255,255,0.3);
}

.error-format-hint {
    background: rgba(255,193,7,0.07);
    border: 1px solid rgba(255,193,7,0.22);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}
.error-format-hint strong {
    color: rgba(255,193,7,0.85);
    display: block;
    margin-bottom: 4px;
    font-size: 0.82rem;
}
.error-format-hint p { margin: 2px 0; }

.error-modal .btn-whatsapp {
    background: #25D366;
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.2s;
    flex: 1;
}
.error-modal .btn-whatsapp:hover {
    background: #22c55e;
    transform: translateY(-1px);
}

.error-modal .btn-send {
    background: #229ED9;
    border: none;
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s ease;
    flex: 1;
}

.error-modal .btn-send:hover {
    background: #1a8cc0;
    transform: translateY(-1px);
}

/* UOL logo fix */
.uol-logo {
    mix-blend-mode: screen;
    filter: brightness(200%) contrast(150%);
    opacity: 1;
    max-height: 40px;
    width: auto;
}
