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

:root {
    /* Cores Nucleares - Dark Mode Premium */
    --bg-main: #020617;
    /* Slate 950 */
    --bg-card: #0f172a;
    /* Slate 900 */
    --bg-surface: #1e293b;
    /* Slate 800 */

    --primary: #38bdf8;
    /* Sky 400 */
    --primary-glow: rgba(56, 189, 248, 0.4);
    --secondary: #22d3ee;
    /* Cyan 400 */
    --accent: #818cf8;
    /* Indigo 400 */

    --text-primary: #f8fafc;
    /* Slate 50 */
    --text-muted: #e2e8f0 !important;
    /* Slate 200 - Increased for visibility */
    --text-dim: #cbd5e1 !important;
    /* Slate 300 - Increased for visibility */

    --border-subtle: rgba(255, 255, 255, 0.15);
    /* More visible */
    --border-highlight: rgba(56, 189, 248, 0.2);

    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-blur: 12px;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 32px;

    --shadow-premium: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Force Contrast Overrides */
.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-dim {
    color: var(--text-dim) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

/* --- Layout Base --- */
section {
    position: relative;
    padding: 120px 0;
}

/* Mesh Gradients de Fundo */
section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(56, 189, 248, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(129, 140, 248, 0.03) 0%, transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}

/* --- Header Moderna --- */
.site-header {
    transition: var(--transition);
}

.site-header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--border-subtle);
    padding: 10px 0;
}

.navbar-brand.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 1.2rem !important;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

/* --- UI Components --- */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-premium);
    padding: 2.5rem;
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: var(--border-highlight);
    transform: translateY(-5px);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn-premium {
    padding: 0.8rem 2.2rem;
    font-weight: 600;
    border-radius: 100px;
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary-glow {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--bg-main);
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary-glow:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

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

.btn-outline-glow:hover {
    background: var(--primary);
    color: var(--bg-main);
}

/* Forms */
.form-control {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-subtle) !important;
    color: #fff !important;
    /* Force maximum brightness for input text */
    padding: 1rem;
    border-radius: var(--radius-sm);
}

.form-control::placeholder {
    color: var(--text-dim) !important;
    opacity: 0.8;
}

.form-label {
    color: var(--text-muted) !important;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

/* --- Hero Section --- */
.hero-v3 {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at 50% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 60%);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1;
    margin-bottom: 2rem;
}

/* --- Footer --- */
.site-footer {
    background: #010409;
    padding-top: 100px;
    border-top: 1px solid var(--border-subtle);
}

.footer-bottom {
    background: #000;
    padding: 2rem 0;
}

/* --- Blog & Portfolio Cards --- */
.card-premium {
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    transition: var(--transition);
}

.card-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.card-premium img {
    transition: var(--transition);
}

.card-premium:hover img {
    transform: scale(1.1);
}

/* Micro-animations */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Especial for Matrix Table */
.price-table-container {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.price-table th {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: none;
}

.price-table td {
    color: var(--text-muted);
    border-color: var(--border-subtle);
    background-color: transparent !important;
    /* Force transparent or dark background on load */
}

.price-table tbody tr:hover td,
.price-table tbody tr:hover th {
    background-color: rgba(56, 189, 248, 0.12) !important;
    color: #fff !important;
}

/* Override fixed white background that might come from bootstrap .table classes */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-striped-bg: transparent !important;
    --bs-table-hover-bg: transparent !important;
    color: var(--text-primary) !important;
}

/* Stats Bar Responsiva */
.glass-rounded-pill {
    border-radius: 100px;
}

@media (max-width: 768px) {
    .glass-rounded-pill {
        border-radius: var(--radius-md) !important;
    }
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background: var(--glass-bg);
        backdrop-filter: blur(var(--glass-blur));
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-premium);
        transition: var(--transition);
        /* Suaviza a abertura */
    }

    .nav-link {
        padding: 0.8rem 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }

    .hero-title {
        font-size: 3rem;
    }
}

/* Prevenção de Scroll Horizontal Global */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

/* Alertas de Alta Visibilidade */
.alert {
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15) !important;
    /* Red 500 alpha */
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #fca5a5 !important;
    /* Red 300 - readable light red */
}

.alert-success {
    background: rgba(34, 197, 94, 0.15) !important;
    /* Green 500 alpha */
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    color: #86efac !important;
    /* Green 300 - readable light green */
}

/* Ajuste específico para evitar quebra de containers no mobile extremo */
@media (max-width: 576px) {

    .container,
    .container-fluid {
        padding-left: 20px;
        padding-right: 20px;
    }
}