/* ===== VARIÁVEIS CSS (Cores e valores reutilizáveis) ===== */
:root {
    /* Cores principais do tema */
        --primary-color: #2c4a3e; /* Cor principal - azul esverdeado */
        --secondary-color: #1a2f24; /* Cor secundária - azul mais escuro */
        --accent-color: #1a2f24; /* Cor de destaque - verde vibrante da logo */
        --bg-dark: #2c4a3e; /* Cor de fundo escuro */
        --bg_light: #ffffff; /* Cor de fundo claro */
    /* Cores de texto */
        --text-light: #64748b; /* Texto claro/cinza */
        --text-dark: #2c4a3e; /* Texto escuro */
    /* Elementos visuais */
        --border-color: #e2e8f0; /* Cor das bordas */
        --shadow: 0 10px 15px -3px rgba(44, 74, 62, 0.1), 0 4px 6px -2px rgba(44, 74, 62, 0.05); /* Sombra padrão */
        --shadow-lg: 0 25px 50px -12px rgba(44, 74, 62, 0.25); /* Sombra grande */
    }
    
    /* ===== ESTILOS DO CORPO DA PÁGINA ===== */
    body {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
        line-height: 1.6;
        color: var(--text-dark);
        min-height: 100vh;
        overflow-x: hidden;
        margin: 0;
        padding: 0;
        position: relative;
    }
    
    /* Camada de fundo com a imagem original (sem blur) */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url('https://pixlog.com.br/images/Background_logs.jpg');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        z-index: -2;
        pointer-events: none;
    }
    
    /* Camada de blur sobre toda a imagem de fundo */
    body::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url('https://pixlog.com.br/images/Background_logs.jpg');
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        filter: blur(3px);
        z-index: -1;
        pointer-events: none;
    }
    
    /* ===== CABEÇALHO DA PÁGINA ===== */
    .modern-header {
        position: relative; /* Mudou de sticky para relative */
        z-index: 1000; /* Reduziu o z-index */
        isolation: isolate;
    }
    
    /* Backdrop blur específico para o header (mais intenso) */
    .modern-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.2);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: -1;
    }
    
    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 2rem;
        max-width: 1400px;
        margin: 0 auto;
        position: relative;
        z-index: 1;
    }
    
    .logo-container {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.5rem 1rem;
        margin-left: -14rem; /* Move a logo mais para a esquerda */
    }
    
    .logo {
        width: 120px;
        height: auto;
        transition: all 0.3s ease;
        filter: brightness(1.2) contrast(1.2) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.4));
    }
    
    .logo:hover {
        transform: scale(1.03);
        filter: brightness(1.2) contrast(1.2) drop-shadow(0 4px 12px rgba(255, 255, 255, 0.4));
    }
    
    .theme-toggle {
        background: rgba(59, 130, 246, 0.1);
        border: 1px solid rgba(59, 130, 246, 0.3);
        color: var(--primary-color);
        padding: 0.5rem;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* ===== SEÇÃO PRINCIPAL (HERO) ===== */
    .hero-section {
        background: linear-gradient(135deg, rgba(30, 58, 95, 0.9), rgba(44, 74, 62, 0.9));
        color: white;
        padding: 4rem 2rem;
        text-align: center;
        position: relative;
        overflow: hidden;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    
    .hero-content {
        max-width: 800px;
        margin: 0 auto;
        position: relative;
        z-index: 2;
    }
    
    .hero-title {
        font-size: 3.5rem;
        font-weight: 700;
        margin-bottom: 1rem;
        color: white;
        display: block;
        width: 100%;
        line-height: 1.3;
        padding: 1rem 0;
        position: relative;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        color: #cbd5e1;
        margin-bottom: 2rem;
        font-weight: 300;
    }
    
    .hero-features {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 2rem;
        margin-top: 3rem;
    }
    
    .feature-card {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 20px;
        padding: 2rem;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .feature-card:hover {
        transform: translateY(-10px);
        background: rgba(255, 255, 255, 0.15);
        box-shadow: var(--shadow-lg);
    }
    
    .feature-icon {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        color: #a1ec58;
    }
    
    .feature-title {
        font-size: 1.2rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }
    
    .feature-description {
        color: #cbd5e1;
        font-size: 0.9rem;
    }
    
    /* ===== CONTAINER PRINCIPAL ===== */
    .main-container {
        background: rgba(255, 255, 255, 0.98);
        margin: 2rem;
        border-radius: 20px;
        overflow: visible;
        box-shadow: var(--shadow-lg);
        position: relative;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        /* Removido qualquer padding-top que possa estar interferindo */
    }
    
    .content-header {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.95));
        padding: 1rem 2rem; /* Reduzir ainda mais o padding vertical */
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 100;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        /* Adicionar sombra para separar do conteúdo */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .content-title {
        font-size: 2rem;
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 0.5rem;
    }
    
    .content-description {
        color: var(--text-light);
        font-size: 1.1rem;
    }
    
    .api-container {
        min-height: 600px;
        position: relative;
        overflow: visible;
    }
    
    /* ===== PERSONALIZAÇÃO DO STOPLIGHT (Documentação da API) ===== */
    elements-stoplight-project,
    elements-api {
        --color-primary: var(--primary-color);
        --color-secondary: var(--secondary-color);
        --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    }

    
    /* Ensure code blocks are fully visible */
    pre {
        overflow: visible !important;
        max-height: none !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
    }
    
    code {
        overflow: visible !important;
        max-height: none !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
    }
    
    /* Configuração global para scroll consistente */
    * {
        scroll-margin-top: 60px !important;
    }
    
    /* ===== RODAPÉ DA PÁGINA ===== */
    .modern-footer {
        background: rgba(44, 74, 62, 0.95);
        color: white;
        padding: 3rem 2rem 2rem;
        margin-top: 4rem;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }
    
    .footer-content {
        max-width: 1400px;
        margin: 0 auto;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 3rem;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
        font-weight: 600;
        margin-bottom: 1rem;
        color: #a1ec58;
    }
    
    .footer-section p,
    .footer-section a {
        color: #cbd5e1;
        text-decoration: none;
        line-height: 1.8;
        transition: color 0.3s ease;
    }
    
    .footer-section a:hover {
        color: #a1ec58;
    }
    
    .social-links {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .social-link {
        width: 40px;
        height: 40px;
        background: rgba(161, 236, 88, 0.1);
        border: 1px solid rgba(161, 236, 88, 0.3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .social-link:hover {
        background: var(--accent-color);
        transform: translateY(-3px);
    }
    
    .footer-bottom {
        text-align: center;
        padding-top: 2rem;
        margin-top: 2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        color: #64748b;
    }
    
    /* ===== DESIGN RESPONSIVO (Adaptação para dispositivos móveis) ===== */
    @media (max-width: 768px) {
        .header-content {
            padding: 1rem;
        }
        
        .hero-title {
            font-size: 2.5rem;
        }
        
        .main-container {
            margin: 1rem;
            border-radius: 15px;
        }
        
        .hero-features {
            grid-template-columns: 1fr;
        }
    }
    
    html {
        scroll-padding-top: 60px; /* Altura mais precisa para parar no "Explore Nossa API" */
    }
    
    /* Correção para links internos da documentação */
    .api-container * {
        scroll-margin-top: 60px;
    }
    
    /* Melhorar o comportamento de scroll para elementos do Stoplight */
    elements-stoplight-project *,
    elements-api * {
        scroll-margin-top: 60px !important;
    }
    
    /* Configuração específica para elementos de navegação do Stoplight */
    elements-stoplight-project a[href*="#"],
    elements-api a[href*="#"] {
        scroll-margin-top: 60px !important;
    }
    
    /* Garantir que todos os elementos clicáveis tenham o mesmo comportamento */
    [id] {
        scroll-margin-top: 60px !important;
    }