:root {
    /* Cores Base */
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --secondary: #10b981;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;

    /* Gradientes e Fundos de Seção */
    --hero-bg: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    --body-bg: var(--light);
    --footer-bg: #080c14;
    /* Escuro profundo do padrão */

    /* Cores de Texto do Topo (Padrão: Claro) */
    --hero-h1: #fff;
    --hero-p: #94a3b8;
    --nav-link: #cbd5e1;
    --nav-logo: #fff;

    /* Menu Mobile (Padrão: Escuro) */
    --mobile-menu-bg: #0f172a;
    --mobile-menu-link: #cbd5e1;
    --mobile-menu-toggle: #fff;
    --mobile-menu-border: rgba(255, 255, 255, 0.1);

    /* Estilos dos Cards (Tema Padrão) */
    --card-normal-bg: linear-gradient(165deg, #ffffff 0%, #f0fdf4 100%);
    --card-normal-border: #10b981;
    --card-featured-bg: linear-gradient(165deg, #ffffff 0%, #f5f3ff 100%);
    --card-featured-border: #6366f1;
    --featured-tag-bg: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
}

/* Tema Ocean - Variação Azul Profundo */
body.theme-ocean {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --hero-bg: linear-gradient(135deg, #0c4a6e 0%, #082f49 100%);
    --footer-bg: #042031;
    /* Azul ainda mais escuro que o topo */
    --card-featured-border: #0ea5e9;
    --card-featured-bg: linear-gradient(165deg, #ffffff 0%, #f0f9ff 100%);
    --featured-tag-bg: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);

    /* Menu Mobile */
    --mobile-menu-bg: #0c4a6e;
    --mobile-menu-link: #f0f9ff;
    --mobile-menu-toggle: #f0f9ff;
    --mobile-menu-border: rgba(255, 255, 255, 0.1);
}

/* Tema Sunset - Variação Tons Quentes */
/* Tema Slate - Moderno e Corporativo em Tons de Cinza/Grafite */
body.theme-slate {
    --primary: #475569;
    --primary-dark: #334155;
    --hero-bg: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    --footer-bg: #020617;
    /* Grafite quase preto */
    --card-featured-border: #475569;
    --card-featured-bg: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
    --featured-tag-bg: linear-gradient(135deg, #475569 0%, #64748b 100%);

    /* Menu Mobile */
    --mobile-menu-bg: #1e293b;
    --mobile-menu-link: #f8fafc;
    --mobile-menu-toggle: #f8fafc;
    --mobile-menu-border: rgba(255, 255, 255, 0.05);
}

/* Tema Nature - Leve, Orgânico e Tons de Menta (Claro) */
body.theme-nature {
    --primary: #059669;
    --primary-dark: #047857;
    --hero-bg: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    --footer-bg: #064e3b;
    /* Verde floresta profundo */
    --card-featured-border: #059669;
    --card-featured-bg: linear-gradient(165deg, #ffffff 0%, #ecfdf5 100%);
    --featured-tag-bg: linear-gradient(135deg, #10b981 0%, #34d399 100%);

    /* Textos Escuros para fundo claro */
    --hero-h1: #064e3b;
    --hero-p: #065f46;
    --nav-link: #065f46;
    --nav-logo: #064e3b;

    /* Menu Mobile */
    --mobile-menu-bg: #f0fdf4;
    --mobile-menu-link: #065f46;
    --mobile-menu-toggle: #064e3b;
    --mobile-menu-border: rgba(6, 78, 59, 0.1);
}

body.theme-nature .btn-outline {
    border-color: rgba(6, 78, 59, 0.2);
    color: #064e3b;
}

body.theme-nature .btn-login {
    background: rgba(6, 78, 59, 0.1);
    color: #064e3b !important;
}

/* Tema Sky - Versão Clara e Refrescante do Azul */
body.theme-sky {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --hero-bg: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    --footer-bg: #0c4a6e;
    /* Azul marinho profundo */
    --card-featured-border: #0ea5e9;
    --card-featured-bg: linear-gradient(165deg, #ffffff 0%, #f0f9ff 100%);
    --featured-tag-bg: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);

    /* Textos Escuros para fundo claro */
    --hero-h1: #0c4a6e;
    --hero-p: #075985;
    --nav-link: #075985;
    --nav-logo: #0c4a6e;

    /* Menu Mobile */
    --mobile-menu-bg: #f0f9ff;
    --mobile-menu-link: #075985;
    --mobile-menu-toggle: #0c4a6e;
    --mobile-menu-border: rgba(12, 74, 110, 0.1);
}

body.theme-sky .btn-outline {
    border-color: rgba(12, 74, 110, 0.2);
    color: #0c4a6e;
}

body.theme-sky .btn-login {
    background: rgba(12, 74, 110, 0.1);
    color: #0c4a6e !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--body-bg);
    color: var(--dark);
    line-height: 1.6;
}

.bg-gradient-hero {
    background: var(--hero-bg);
    position: relative;
    overflow: hidden;
}

.bg-gradient-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--nav-logo);
    text-decoration: none;
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--nav-link);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #fff;
}

.btn-login {
    background: rgba(255, 255, 255, 0.1);
    color: #fff !important;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--mobile-menu-toggle);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        /* Largura mais compacta para gaveta lateral */
        height: 100vh;
        background: var(--mobile-menu-bg);
        flex-direction: column;
        justify-content: flex-start;
        /* Alinhado ao topo */
        padding-top: 6rem;
        /* Espaço para o topo */
        padding-left: 2rem;
        padding-right: 2rem;
        gap: 1.5rem;
        /* Espaçamento mais encostado entre itens */
        transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 90;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    }

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

    .nav-links a {
        font-size: 1.1rem;
        /* Fonte mais equilibrada */
        width: 100%;
        text-align: left;
        /* Alinhamento à esquerda para cara de menu */
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--mobile-menu-border);
        color: var(--mobile-menu-link);
    }

    .nav-links .btn-login {
        margin-top: 1rem;
        text-align: center;
        background: var(--primary);
    }
}

/* Hero Section */
.hero {
    padding: 4rem 0 5rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--hero-h1);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--hero-p);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 10px 15px -3px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Pricing Section */
.pricing {
    padding: 30px 0 60px;
    background: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-title p {
    color: var(--gray);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    align-items: stretch;
}

.pricing-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    margin: 1rem 0;
    /* Margem de segurança vertical */
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    transform: scale(1.03);
    /* Escala reduzida para evitar sobreposição excessiva */
    position: relative;
    background: linear-gradient(to bottom, #fff, #f5f3ff);
    z-index: 2;
}

.pricing-card.featured:hover {
    z-index: 10;
}

.featured-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 2.5rem;
    /* Reduzido de 3rem para evitar quebras */
    font-weight: 800;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
    /* Permite quebra se realmente não houver espaço */
}

.plan-price span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray);
    display: inline-block;
}

.plan-features-wrapper {
    max-height: 265px;
    /* Altura para aprox 6 itens */
    overflow: hidden;
    position: relative;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 1rem;
    flex-grow: 1;
    /* Garante que o botão de contratar vá para o fundo */
}

.plan-features-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(transparent, #ffffff 90%);
    transition: opacity 0.4s;
    pointer-events: none;
    z-index: 2;
}

/* Ajuste do fade para o card dourado/featured */
.featured .plan-features-wrapper::after {
    background: linear-gradient(transparent, #f5f3ff 90%);
}

.plan-features-wrapper.expanded {
    max-height: 2000px;
}

.plan-features-wrapper.expanded::after {
    opacity: 0;
    visibility: hidden;
}

.plan-features-toggle {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 5;
}

.btn-features-toggle {
    background: none;
    border: none;
    color: var(--secondary);
    /* Verde para o card normal */
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 15px;
    transition: all 0.3s;
}

.featured .btn-features-toggle {
    color: var(--primary);
    /* Roxo/Azul para o destaque */
}

.btn-features-toggle:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.btn-features-toggle i {
    font-size: 0.75rem;
    transition: transform 0.4s;
}

.plan-features-wrapper.expanded+.plan-features-toggle i {
    transform: rotate(180deg);
}

.plan-features {
    list-style: none;
    margin-bottom: 0;
    flex-grow: 1;
}

.plan-features li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #475569;
}

.plan-features li i {
    color: var(--secondary);
}

.btn-plan {
    width: 100%;
    text-align: center;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s;
}

.featured .btn-plan {
    background: var(--primary);
    color: #fff;
}

.pricing-card:not(.featured) .btn-plan {
    background: #f1f5f9;
    color: var(--dark);
}

.pricing-card:not(.featured) .btn-plan:hover {
    background: #e2e8f0;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: #94a3b8;
    padding: 2.5rem 0 2rem;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff !important;
    /* Sempre branco para contraste no fundo escuro */
    margin-bottom: 1rem;
    display: inline-block;
    text-decoration: none;
    letter-spacing: -1px;
}

.footer-logo span {
    color: var(--primary);
    /* Mantém o destaque na cor do tema */
}

.text-center {
    text-align: center;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-0 {
    margin-bottom: 0;
}

/* Features Section */
.features {
    padding: 60px 0;
    background: #f8fafc;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: #fff;
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .pricing-card.featured {
        transform: none;
    }

    .footer-contact {
        flex-direction: column;
        gap: 0.75rem;
    }

    .footer-separator {
        display: none;
    }

    .footer-desc {
        padding: 0 1rem;
    }
}

/* Footer Contact Info */
.footer-contact {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #94a3b8;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.footer-contact a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-contact i {
    color: var(--primary);
    opacity: 0.7;
}

/* How It Works Section */
.how-it-works {
    padding: 50px 0 20px;
    background-color: #fff;
}

#como-funciona .section-title {
    margin-bottom: 2.5rem;
}

.article-content,
.article-content * {
    color: #000 !important;
}

.article-content {
    width: 100%;
    margin: 0 auto;
    background: #ffffff !important;
    padding: 2.5rem;
    border-radius: 28px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    line-height: 1.8;
    position: relative;
    overflow: hidden;
}

.article-inner {
    max-height: 380px;
    /* Um pouco mais de espaço inicial */
    overflow: hidden;
    position: relative;
    transition: max-height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(transparent, #ffffff 90%);
    transition: opacity 0.5s ease;
    pointer-events: none;
    z-index: 2;
}

.article-inner.expanded {
    max-height: 10000px;
}

.article-inner.expanded::after {
    opacity: 0;
    visibility: hidden;
}

.article-read-more {
    text-align: center;
    margin-top: -20px;
    /* Sobrepõe levemente o fade para design premium */
    position: relative;
    z-index: 10;
}

.btn-read-more {
    background: #fff;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 3rem;
    border-radius: 100px;
    font-weight: 800;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-read-more:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -8px rgba(var(--primary-rgb, 139, 92, 246), 0.4);
    border-color: var(--primary);
}

.btn-read-more i {
    font-size: 0.8rem;
    transition: transform 0.5s ease;
}

.article-inner.expanded+.article-read-more i {
    transform: rotate(180deg);
}

.article-inner.expanded+.article-read-more .btn-read-more i {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .article-content {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .btn-read-more {
        padding: 0.7rem 2rem;
        font-size: 0.85rem;
        width: 80%;
        justify-content: center;
    }

    .article-inner {
        max-height: 300px;
    }
}

.article-content>*:last-child {
    margin-bottom: 0 !important;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s;
}

.article-content a:hover {
    border-bottom-color: var(--primary);
}

@media (max-width: 768px) {
    .article-content {
        padding: 2rem 1.5rem;
    }

    .article-content p {
        font-size: 1rem;
    }
}