/* ----------------------------------------------------------
   VARIÁVEIS & RESET
---------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #2563eb;          /* Azul Royal */
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    
    --accent: #f59e0b;           /* Laranja/Ambar para destaques */
    
    --text-main: #0f172a;        /* Azul Escuro Profundo */
    --text-body: #334155;        /* Cinza Azulado */
    --text-muted: #64748b;
    
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    
    --border-light: #e2e8f0;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    color: var(--text-body);
    background-color: var(--bg-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

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

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.2;
}

/* ----------------------------------------------------------
   LAYOUT
---------------------------------------------------------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    padding-top: 40px;
    min-height: calc(100vh - var(--header-height) - 100px); /* Ajuste para footer */
}

/* ----------------------------------------------------------
   HEADER
---------------------------------------------------------- */
.topbar {
    height: var(--header-height);
    background: #0f172a; /* Azul Escuro (Slate 900) */
    border-bottom: 1px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.topbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo {
    height: 40px;
    /* Se o logo for escuro, pode precisar de um filtro para ficar branco, mas vamos assumir que ele funciona ou ajustamos depois */
    filter: brightness(0) invert(1); /* Torna o logo branco se for imagem preta/colorida simples */
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: #94a3b8; /* Cinza claro */
    text-transform: uppercase;
    font-weight: 600;
}

.brand-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff; /* Branco */
    text-transform: uppercase;
}

/* NAV */
.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    color: #e2e8f0; /* Branco gelo */
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.nav-link:hover, .nav-item:hover > .nav-link {
    background-color: #1e293b; /* Fundo hover escuro */
    color: #ffffff;
}

/* Dropdown */
.nav-item {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 240px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    display: none;
    margin-top: 8px;
    z-index: 1001;
}

.nav-item:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--text-body); /* Volta a ser escuro dentro do dropdown branco */
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.dropdown-menu a:hover {
    background-color: var(--bg-body);
    color: var(--primary);
}

/* Mobile Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ffffff; /* Branco */
    cursor: pointer;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .menu-toggle { display: block; }
    
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow-lg);
        display: none;
    }
    
    .nav.show { display: flex; }
    
    .nav-item { width: 100%; }
    
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        padding-left: 20px;
        background: var(--bg-body);
        margin-top: 0;
    }
}

/* ----------------------------------------------------------
   HERO SECTION
---------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 60px 0;
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 2px solid transparent;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-light);
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.3s;
}

.hero-image:hover img {
    transform: perspective(1000px) rotateY(0) rotateX(0);
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .hero-image img {
        transform: none;
        margin: 0 auto;
    }
}

/* ----------------------------------------------------------
   CARDS & GRID
---------------------------------------------------------- */
.section-title {
    font-size: 2rem;
    margin-bottom: 12px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 700px;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem; /* Se usar ícones de fonte */
}

.card img {
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    object-fit: cover;
    aspect-ratio: 16/9;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    flex-grow: 1;
}

/* ----------------------------------------------------------
   ARTICLES & DOCUMENTATION STYLE
---------------------------------------------------------- */
.doc-content {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.doc-header {
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 40px;
}

.doc-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--text-main);
}

.doc-intro {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Tópicos numerados ou seções */
.step-section {
    margin-bottom: 50px;
    position: relative;
    padding-left: 0;
}

.step-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}

.step-number {
    background: var(--primary);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.doc-content p {
    margin-bottom: 16px;
    font-size: 1.05rem;
}

.doc-content ul, .doc-content ol {
    margin-bottom: 20px;
    padding-left: 24px;
    color: var(--text-body);
}

.doc-content li {
    margin-bottom: 8px;
}

/* Figuras */
.figure {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 10px;
    margin: 30px 0;
    box-shadow: var(--shadow-md);
}

.figure img {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.figure-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 12px;
    font-weight: 600;
}

/* Callouts / Alertas */
.callout {
    padding: 20px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    border-left: 4px solid;
    background-color: #fff;
    box-shadow: var(--shadow-sm);
}

.callout-info {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.callout-warning {
    border-color: var(--accent);
    background-color: #fffbeb; /* Amber 50 */
}

.callout h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.callout-info h4 { color: var(--primary); }
.callout-warning h4 { color: #b45309; }

/* ----------------------------------------------------------
   FOOTER
---------------------------------------------------------- */
.site-footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 60px 0 30px;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

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

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

.footer-links a {
    color: #94a3b8;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
}
