/* ==========================================================================
   CSS Variables - Exact YouCine Matching
   ========================================================================== */
:root {
    --color-primary: #214DC4;
    --color-primary-hover: #1b3fa1;
    --color-bg-dark: #030916;
    --color-bg-dark-alt: #131720;
    --color-bg-light: #FFFFFF;
    --color-bg-light-alt: #F6F7F9;
    
    --color-text-dark: #131720;
    --color-text-muted: #6A7181;
    --color-text-light: #FFFFFF;
    --color-text-light-muted: rgba(255, 255, 255, 0.8);
    
    --color-border: #DCDFE5;
    
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

a:hover {
    color: var(--color-primary-hover);
}

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

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    line-height: 1.2;
    color: inherit;
}

h1.hero-title {
    font-size: clamp(36px, 5vw, 60px);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2.section-title {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
}

p.hero-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light-muted);
    margin-bottom: 1.5rem;
    max-width: 800px;
}

/* ==========================================================================
   Layout & Containers
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-dark {
    background-color: var(--color-bg-dark);
    color: var(--color-text-light);
}

.bg-dark-alt {
    background-color: var(--color-bg-dark-alt);
    color: var(--color-text-light);
}

.bg-light {
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
}

.bg-light-alt {
    background-color: var(--color-bg-light-alt);
    color: var(--color-text-dark);
}

.bg-primary-banner {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    padding: 40px 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    position: sticky;
    top: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    padding: 15px 0;
}

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

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--color-text-dark);
}

.site-branding .logo-badge {
    background: var(--color-primary);
    color: white;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-navigation a {
    color: var(--color-text-dark);
    font-weight: 500;
    font-size: 0.95rem;
}

.main-navigation a:hover {
    color: var(--color-primary);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-dark);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-bg-light);
        border-bottom: 1px solid var(--color-border);
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    }
    .main-navigation.toggled {
        display: block;
    }
    .main-navigation ul {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-weight: 800;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-align: center;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #214DC4 0%, #3b82f6 100%);
    color: var(--color-text-light);
    box-shadow: 0 4px 15px rgba(33, 77, 196, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1b3fa1 0%, #2563eb 100%);
    color: var(--color-text-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(33, 77, 196, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 16px 32px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-sm {
    padding: 10px 20px;
    font-size: 14px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 60px 0;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Add grid background texture */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
    animation: panGrid 20s linear infinite;
}

@keyframes panGrid {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

/* Giant background text */
.hero-section::after {
    content: 'YOUCINE';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(100px, 15vw, 250px);
    font-weight: 900;
    color: rgba(255,255,255,0.02);
    z-index: 0;
    pointer-events: none;
    white-space: nowrap;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.hero-text {
    flex: 1 1 500px;
}

.hero-visual {
    flex: 1 1 400px;
    display: flex;
    justify-content: center;
    position: relative;
}

/* Glowing orb behind the image to blend the background and add a premium feel */
.hero-visual::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, rgba(3,9,22,0) 70%);
    transform: translate(-50%, -50%);
    z-index: 0;
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.hero-visual img {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.05);
    max-height: 65vh;
    width: auto;
    object-fit: contain;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.hero-badge .icon {
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.hero-actions .btn-primary {
    animation: pulsePrimary 2s infinite;
}

@keyframes pulsePrimary {
    0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

.hero-link {
    color: var(--color-text-light);
    font-weight: 500;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.hero-link:hover {
    opacity: 1;
    color: white;
}

.hero-stats-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--color-text-light-muted);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
}

.hero-stats-bar span:not(:last-child)::after {
    content: '|';
    margin-left: 15px;
    color: rgba(255,255,255,0.2);
}

/* ==========================================================================
   Cards (Visão Rápida, Guias)
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 30px;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: rgba(33, 77, 196, 0.3); /* Primary with opacity */
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transform: translateY(-2px);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: var(--color-text-dark);
}

.feature-card p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.guide-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.2s ease;
    color: inherit;
}

.guide-card:hover {
    border-color: rgba(33, 77, 196, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    color: var(--color-text-dark);
}

.guide-card-icon {
    font-size: 2rem;
}

.guide-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.guide-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   App Stats Cards
   ========================================================================== */
.app-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--color-bg-light-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 15px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-dark);
}

/* ==========================================================================
   Stats Banner
   ========================================================================== */
.stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
}

.stats-banner-item {
    padding: 0 20px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.stats-banner-item:last-child {
    border-right: none;
}

.stats-banner-val {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.stats-banner-lbl {
    font-size: 0.85rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .stats-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 0;
    }
    .stats-banner-item:nth-child(2) {
        border-right: none;
    }
}

/* ==========================================================================
   Gallery Section
   ========================================================================== */
.gallery-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}

.gallery-item {
    flex: 0 0 280px;
    scroll-snap-align: start;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Ficha Tecnica
   ========================================================================== */
.ficha-tecnica-table {
    width: 100%;
    border-collapse: collapse;
}

.ficha-tecnica-table th,
.ficha-tecnica-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: left;
}

.ficha-tecnica-table th {
    font-weight: 600;
    color: var(--color-text-light-muted);
    width: 40%;
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px;
    background: none;
    border: none;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 20px 20px;
    display: none;
    color: var(--color-text-muted);
}

.faq-item.active .faq-answer {
    display: block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    padding: 80px 0 30px;
    color: var(--color-text-light-muted);
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.footer-brand p {
    margin-top: 15px;
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 400px;
}

.footer-links-group h4 {
    color: var(--color-text-light);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links-group a {
    color: var(--color-text-light-muted);
    font-size: 0.95rem;
}

.footer-links-group a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
}

.footer-disclaimer {
    font-size: 0.85rem;
    opacity: 0.7;
    max-width: 800px;
    margin: 0 auto 20px;
    line-height: 1.5;
}

.site-info {
    font-size: 0.85rem;
    opacity: 0.5;
}

/* ==========================================================================
   Section Labels
   ========================================================================== */
.section-label {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* ==========================================================================
   Card Grid Variants
   ========================================================================== */
.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .card-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Two-Column Layout (Checklist + FAQ)
   ========================================================================== */
.two-col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

@media (max-width: 768px) {
    .two-col-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ==========================================================================
   Checklist Styles
   ========================================================================== */
.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.95rem;
    color: var(--color-text-dark);
}

.checklist li:last-child {
    border-bottom: none;
}

.check-icon {
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* ==========================================================================
   Content + Sidebar Layout ("O que é o YouCine?" section)
   ========================================================================== */
.content-sidebar-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 60px;
    align-items: start;
}

.main-content-col p {
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

@media (max-width: 900px) {
    .content-sidebar-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ==========================================================================
   Sidebar Sticky + Widgets
   ========================================================================== */
.sidebar-sticky {
    position: sticky;
    top: 90px;
}

.sidebar-widget {
    background: var(--color-bg-light-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 25px;
}

.sidebar-routes {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-routes li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
}

.sidebar-routes li:last-child {
    border-bottom: none;
}

.sidebar-routes a {
    color: var(--color-text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-routes a:hover {
    color: var(--color-primary);
}

/* ==========================================================================
   Phone Mockup (Hero image)
   ========================================================================== */
.hero-phone-mockup {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
    perspective: 1000px;
}

.phone-frame {
    width: 290px;
    height: 580px;
    background: linear-gradient(135deg, #374151, #030916);
    border-radius: 45px;
    padding: 10px;
    box-shadow: 
        0 30px 60px -10px rgba(0,0,0,0.8),
        inset 0 0 0 2px rgba(255,255,255,0.15),
        inset 0 4px 10px rgba(255,255,255,0.3);
    border: 1px solid rgba(0,0,0,0.8);
    position: relative;
    transform: rotateY(-15deg) rotateX(5deg);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    animation: floatingPhone 6s ease-in-out infinite;
}

@keyframes floatingPhone {
    0% { transform: rotateY(-15deg) rotateX(5deg) translateY(0); }
    50% { transform: rotateY(-15deg) rotateX(5deg) translateY(-20px); }
    100% { transform: rotateY(-15deg) rotateX(5deg) translateY(0); }
}

.phone-frame:hover {
    transform: rotateY(0deg) rotateX(0deg) translateY(-10px);
    animation-play-state: paused;
}

/* Dynamic Island / Notch */
.phone-frame::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 25px;
    background: #030916;
    border-radius: 20px;
    z-index: 10;
    box-shadow: inset 0 0 2px rgba(255,255,255,0.1);
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 35px;
    overflow: hidden;
    background: #0a1628;
    position: relative;
}

/* ==========================================================================
   Gallery Placeholders
   ========================================================================== */
.gallery-placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 10px;
}

.gallery-placeholder-icon {
    font-size: 2.5rem;
}

/* ==========================================================================
   FAQ Icon transition
   ========================================================================== */
.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* ==========================================================================
   Ficha Tecnica Table (Light version for sidebar)
   ========================================================================== */
.sidebar-widget .ficha-tecnica-table th,
.sidebar-widget .ficha-tecnica-table td {
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-dark);
    font-size: 0.9rem;
}

.sidebar-widget .ficha-tecnica-table th {
    color: var(--color-text-muted);
    font-weight: 600;
}

/* ==========================================================================
   Page Template Styles
   ========================================================================== */
.page-hero {
    padding: 60px 0;
    text-align: center;
}

.page-hero .hero-badge {
    justify-content: center;
}

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

.page-content p {
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.page-content h2 {
    font-weight: 800;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.page-content h3 {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.page-content ul,
.page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--color-text-muted);
}

.page-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.step-list {
    list-style: none;
    padding: 0;
    counter-reset: step-counter;
}

.step-list li {
    counter-increment: step-counter;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--color-border);
}

.step-list li::before {
    content: counter(step-counter);
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}
