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

:root {
    /* Color Palette */
    --primary-dark: #0a0e14;
    --secondary-dark: #121821;
    --accent-blue: #1e3a8a;
    --accent-gold: #ebb13a;
    --accent-gold-hover: #d19a2e;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Spacing & Transitions */
    --section-padding: 80px 20px;
    --transition-fast: 0.3s ease;
    --transition-medium: 0.4s ease;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

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

.section {
    padding: var(--section-padding);
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 24px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn-gold {
    background: var(--accent-gold);
    color: var(--primary-dark);
}

.btn-gold:hover {
    background: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(235, 177, 58, 0.3);
}

.btn-outline {
    border: 1px solid var(--glass-border);
    color: var(--text-light);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--text-light);
}


/* --- Global Modal System --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    animation: modalFadeIn .3s ease;
}

.modal-overlay.hidden {
    display: none;
}

.modal-box {
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    padding: 32px;
    background: var(--secondary-dark);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-light);
}

.modal-box h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.modal-body-content {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

.modal-body-content a {
    color: var(--accent-gold);
    text-decoration: underline;
    font-weight: 600;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10000 !important;
    /* Absolute top priority */
    transition: var(--transition-fast);
    padding: 20px 0;
    pointer-events: auto;
}

header.scrolled {
    background: rgba(10, 14, 20, 0.8);
    backdrop-filter: blur(20px);
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    display: flex;
    align-items: center;
    font-family: 'Merriweather', serif;
    font-weight: 700;
    font-size: 2rem;
    /* Slightly larger */
    letter-spacing: -0.5px;
}

.logo-white {
    color: #f8fafc;
}

.logo-amp {
    color: #f8fafc;
    font-family: 'Merriweather', serif;
    /* Ensure same font */
    margin: 0 12px;
    /* Precise equal spacing */
    opacity: 0.8;
    /* Subtle distinction */
}

.logo-gold {
    color: var(--accent-gold);
}

.nav-links {
    display: flex;
    gap: 32px;
}

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

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-light);
}

.mobile-toggle {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-image: linear-gradient(to bottom, rgba(10, 14, 20, 0.7) 0%, rgba(10, 14, 20, 0.9) 100%),
        url('assets/images/hero-bg.jpg');
    /* Original skyline: https://images.unsplash.com/photo-1449824913935-59a10b8d2000 */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
    padding-top: 130px;
    /* Standardizing hero top spacing */
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 50px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 24px;
    line-height: 1.1;
    background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
    position: relative;
    z-index: 10;
}

.feature-card {
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(235, 177, 58, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-fast);
    pointer-events: none;
    /* Crucial fix for click interception */
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: rgba(235, 177, 58, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}


.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

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

/* Calculator Section */
.calculator-cta {
    background: var(--secondary-dark);
    text-align: center;
}

.calculator-cta h2 {
    margin-bottom: 16px;
    font-size: 2rem;
}

.divider {
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
    margin: 0 auto 24px;
}

/* Product Section Refinement */
#livro.section {
    padding: 40px 20px;
    /* Reduced vertical padding */
}

.product-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.book-mockup {
    position: relative;
    perspective: 1000px;
}

.book-img {
    width: 100%;
    max-width: 300px;
    /* Reduced image size */
    margin: 0 auto;
    box-shadow: 15px 15px 40px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.book-img:hover {
    transform: rotateY(-10deg) rotateX(5deg);
}

.product-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.product-content p {
    margin-bottom: 32px;
    color: var(--text-muted);
}

/* Blog Section */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

/* Blog Sidebar Layout */
.blog-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 40px;
}

/* Article Detail Styles */
.article-detail-header {
    margin-bottom: 40px;
    max-width: 800px;
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.article-content h2 {
    margin: 40px 0 20px;
    font-size: 1.8rem;
}

.article-content p {
    margin-bottom: 24px;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-gold);
    padding: 20px 30px;
    background: rgba(235, 177, 58, 0.05);
    border-radius: 0 8px 8px 0;
    margin: 40px 0;
    font-style: italic;
    font-size: 1.2rem;
}

.article-content ul {
    margin-bottom: 24px;
    padding-left: 20px;
}

.article-content li {
    margin-bottom: 12px;
}

.internal-page main {
    padding-top: 80px;
    padding-bottom: 60px;
}

/* Evitar espaçamento duplo em páginas que usam .section dentro do main */
.internal-page .section:first-of-type {
    padding-top: 0;
}

.article-tags {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.tag:hover {
    background: var(--accent-gold);
    color: var(--bg-dark);
}

.breadcrumbs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--accent-gold);
}

.breadcrumbs span {
    opacity: 0.5;
}

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 32px;
}

.sidebar-widget h4 {
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 8px;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    justify-content: space-between;
}

.category-list a:hover {
    color: var(--accent-gold);
}

.category-list .count {
    opacity: 0.5;
    font-size: 0.85rem;
}

@media (max-width: 992px) {
    .blog-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    transition: var(--transition-medium);
    border-top: 3px solid var(--accent-gold);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.blog-img-wrapper {
    display: none;
}

/* .blog-card img removed as per user request */

.blog-info {
    padding: 24px;
}

.blog-category {
    color: var(--accent-gold);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.blog-info h3 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 16px;
    font-family: 'Outfit', sans-serif;
    color: #fff;
}

.blog-info p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Footer */
footer {
    padding: 60px 0 30px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    background: var(--secondary-dark);
}

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

.footer-col h4 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 16px;
    font-family: 'Outfit', sans-serif;
}

.footer-brand .logo {
    font-size: 1.5rem;
    margin-bottom: 12px;
    display: inline-flex;
}

.footer-brand p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);
    max-width: 280px;
}

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

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

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-gold);
}

.footer-newsletter p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.footer-newsletter .btn {
    font-size: 0.85rem;
    padding: 10px 24px;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--accent-gold);
}

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

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

/* Enhanced CTA Section */
.calculator-cta .cta-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 48px 40px;
    text-align: center;
}

.calculator-cta .cta-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    display: block;
}

/* Article Card Category Colors */
.blog-card[data-category="estrategia"] {
    border-top-color: var(--accent-gold);
}

.blog-card[data-category="financas"] {
    border-top-color: #60a5fa;
}

.blog-card[data-category="gestao"] {
    border-top-color: #34d399;
}

.blog-card[data-category="tendencias"] {
    border-top-color: #c084fc;
}

.blog-card[data-category="estrategia"] .blog-category {
    color: var(--accent-gold);
}

.blog-card[data-category="financas"] .blog-category {
    color: #60a5fa;
}

.blog-card[data-category="gestao"] .blog-category {
    color: #34d399;
}

.blog-card[data-category="tendencias"] .blog-category {
    color: #c084fc;
}

/* Reading Time Badge */
.blog-read-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 12px;
    opacity: 0.8;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Active Nav Link Underline */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Article Content Lists */
.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.article-content ul {
    list-style: disc;
}

.article-content ol {
    list-style: decimal;
}

.article-content li {
    margin-bottom: 12px;
    color: var(--text-light);
}

/* Mobile Adjustments */
/* Form Pages (Login/Newsletter) */
.form-container {
    max-width: 450px;
    margin: 80px auto;
    text-align: center;
}

.form-container h1 {
    margin-bottom: 12px;
}

.form-container p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

.glass-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-light);
    font-family: inherit;
    transition: var(--transition-fast);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.08);
}

.form-footer {
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--accent-gold);
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 10001;
        padding: 0;
    }

    .mobile-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--text-light);
        border-radius: 2px;
        transition: var(--transition-fast);
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--primary-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 9999;
        display: flex;
        /* Override display: none */
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        color: var(--text-light);
    }

    .product-showcase {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .book-img {
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
        margin-top: 40px;
    }
}

/* Newsletter CTA */
.newsletter-cta {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(10, 14, 20, 0.4) 100%);
    text-align: center;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.newsletter-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 40px;
}

.newsletter-box h2 {
    font-size: 2.2rem;
    margin-bottom: 16px;
    background: linear-gradient(180deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.newsletter-box p {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .newsletter-box {
        padding: 40px 20px;
    }

    .newsletter-box h2 {
        font-size: 1.8rem;
    }
}

/* Internal Page Fixes - Final Global Solution */
/* Internal Page Fixes - Final Global Solution */
body.internal-page {
    /* Resetting generic padding */
    padding-top: 0 !important;
}

.internal-page main {
    position: relative;
    z-index: 1;
    display: block;
    padding-top: 120px !important;
    /* Restore normal spacing for standard pages */
}


/* Final Layout Lock */
body.single-article .section {
    padding-top: 130px !important;
}

/* Force elements back into flow */
.single-article .article-main,
.single-article .article-detail-header,
.single-article .article-content,
.single-article h1 {
    position: relative !important;
    top: auto !important;
    margin-top: 0;
}

@media (max-width: 768px) {
    .internal-page main {
        padding-top: 100px !important;
    }

    body.single-article .section {
        padding-top: 110px !important;
    }
}