
:root {
    /* Light theme (default) */
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --accent-color: #0dcaf0;
    --dark-color: #212529;
    --light-color: #f8f9fa;

    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #ffffff;

    /* Text colors */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-muted: #6c757d;

    /* Border colors */
    --border-color: #dee2e6;
    --border-focus: #0d6efd;

    /* Shadow colors */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.15);
    --shadow-card: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    /* Dark theme */
    --primary-color: #0d6efd;
    --secondary-color: #adb5bd;
    --accent-color: #0dcaf0;
    --dark-color: #f8f9fa;
    --light-color: #212529;

    /* Background colors */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #333333;

    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #b0b0b0;

    /* Border colors */
    --border-color: #404040;
    --border-focus: #0d6efd;

    /* Shadow colors */
    --shadow-color: rgba(0, 0, 0, 0.3);
    --shadow-hover: rgba(0, 0, 0, 0.4);
    --shadow-card: rgba(0, 0, 0, 0.3);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Ensure text readability across all elements */
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
}

.svg-icon {
  color: var(--text-primary);
}




/* Adaptive text color for better readability */
.white-text {
    color: #212529 !important;
    /* Dark text for light theme */
}

[data-theme="dark"] .white-text {
    color: #ffffff !important;
    /* White text for dark theme */
}

/* Hero text - always white */
.hero-text {
    color: #ffffff !important;
    /* Always white */
}

/* Override Bootstrap text utilities for dark theme */
[data-theme="dark"] .text-dark {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

/* Navbar styling */
.navbar {
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: all 0.3s ease;
    background-color: var(--bg-primary) !important;
}

.navbar-light {
    background-color: var(--bg-primary) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    color: var(--text-secondary) !important;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.theme-toggle:hover {
    background-color: var(--bg-secondary);
    color: var(--accent-color);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

/* Hero section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)),
        url('https://images.unsplash.com/photo-1557804506-669a67965ba0?ixlib=rb-4.0.3&auto=format&fit=crop&w=2074&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: white;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.btn-hero {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Section styling */
.section {
    padding: 80px 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Specific section backgrounds */
.section.bg-light {
    background-color: var(--bg-secondary) !important;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 4rem;
}

/* About section */
.about-img {
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-card);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.about-text h3,
.about-text h4 {
    color: var(--text-primary);
}

.about-text p {
    color: var(--text-secondary);
}

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

.about-text .text-center h4 {
    color: var(--primary-color);
}

.about-text .text-center p {
    color: var(--text-secondary);
}

/* Services section */
.service-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-card);
    transition: all 0.3s ease;
    height: 100%;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.service-card .card-body {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.service-card .card-title {
    color: var(--text-primary);
}

.service-card .card-text {
    color: var(--text-secondary);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Portfolio section */
.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-card);
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: var(--bg-tertiary);
}

.portfolio-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.portfolio-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 110, 253, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
}

/* Contact section */
.contact-form {
    background: var(--bg-tertiary);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px var(--shadow-card);
    color: var(--text-primary);
    box-sizing: border-box;
}

.form-control {
    border-radius: 10px;
    border: 2px solid var(--border-color);
    padding: 12px 15px;
    transition: all 0.3s ease;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-primary);
}

.btn-contact {
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    margin-top: auto;
}

.contact-info {
    padding: 2rem;
    color: var(--text-primary);
    box-sizing: border-box;
}

.contact-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 3rem 0 1rem;
}

.footer h5,
.footer h6 {
    color: var(--text-primary);
}

.footer p {
    color: var(--text-secondary);
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

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

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

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

    .section-title {
        font-size: 2rem;
    }

    .hero {
        background-attachment: scroll;
    }
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}
/* Brand logo (horizontal) - swaps variant by theme */
.brand-logo {
    height: 40px;
    width: auto;
}

.footer .brand-logo {
    height: 48px;
}

.brand-logo-dark {
    display: none;
}

[data-theme="dark"] .brand-logo-light {
    display: none;
}

[data-theme="dark"] .brand-logo-dark {
    display: inline-block;
}

/* Portfolio device mockups (desktop + tablet + phone) */
.device-mockup {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--border-color));
    overflow: hidden;
}

.device {
    position: absolute;
    bottom: 0;
    background: #111;
    border: 4px solid #111;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.device img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.device-desktop {
    left: 50%;
    width: 62%;
    aspect-ratio: 16 / 10;
    transform: translateX(-50%);
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
    z-index: 1;
}

.device-tablet {
    right: 4%;
    width: 22%;
    aspect-ratio: 3 / 4;
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
    z-index: 2;
}

.device-phone {
    left: 5%;
    width: 13%;
    aspect-ratio: 9 / 19;
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
    z-index: 2;
}

.device-mockup-compact .device-desktop {
    left: auto;
    right: 5%;
    width: 66%;
    transform: none;
}

.device-mockup-compact .device-phone {
    left: 6%;
    width: 25%;
}

.device-mockup-modal {
    height: 320px;
    border-radius: 12px;
}

.portfolio-caption {
    padding: 1.25rem 1.5rem 1.5rem;
}

.portfolio-caption h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.portfolio-caption p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.portfolio-more {
    color: var(--primary-color);
    font-weight: 600;
}

.portfolio-item:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 3px;
}

.project-highlights {
    padding-left: 1.25rem;
}

.project-tags .badge {
    margin: 0 0.35rem 0.35rem 0;
    font-weight: 500;
}

@media (max-width: 576px) {
    .device-mockup {
        height: 220px;
    }

    .device-mockup-modal {
        height: 240px;
    }
}

.portfolio-item {
    height: 100%;
}

/* WhatsApp */
.whatsapp-float {
    position: fixed; right: 20px; bottom: 20px; z-index: 1030;
    width: 56px; height: 56px; border-radius: 50%;
    background: #25d366; color: #fff; font-size: 1.9rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.3); text-decoration: none;
    transition: transform .2s;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }
.nav-whatsapp {
    margin: 0 .5rem;
    padding: .35rem 1rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: .95rem;
    border-width: 2px;
    transition: all .3s ease;
}
.nav-whatsapp:hover { transform: translateY(-1px); }
@media (max-width: 991px) { .nav-whatsapp { margin: .5rem 0; } }

/* Processo */
.process-step {
    width: 56px; height: 56px; margin: 0 auto 1rem; border-radius: 50%;
    background: var(--primary-color, #2563eb); color: #fff;
    font-weight: 700; font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
}

/* FAQ (acompanha o tema) */
.accordion-item { background: var(--bg-tertiary); border-color: var(--border-color); color: var(--text-primary); }
.accordion-button { background: var(--bg-tertiary); color: var(--text-primary); font-weight: 600; }
.accordion-button:not(.collapsed) { background: var(--bg-tertiary); color: var(--primary-color); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(13,110,253,.25); }
[data-theme="dark"] .accordion-button::after { filter: invert(1); }
.accordion-body { color: var(--text-secondary); }

/* Artigos / blog */
.blog-hero { padding: 8rem 0 3rem; background: var(--bg-secondary); }
.blog-hero h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: .75rem; }
.blog-hero p { color: var(--text-secondary); max-width: 560px; margin: 0 auto; }
.post-card {
    display: flex; flex-direction: column; height: 100%;
    padding: 1.5rem; border-radius: 12px; text-decoration: none;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 2px 10px var(--shadow-card);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px var(--shadow-hover); border-color: var(--primary-color); color: var(--text-primary); }
.post-icon {
    width: 48px; height: 48px; border-radius: 12px; margin-bottom: 1rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(13,110,253,.12); color: var(--primary-color); font-size: 1.5rem;
}
.post-card .badge { align-self: flex-start; }
.post-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: .5rem; }
.post-card p { color: var(--text-secondary); flex-grow: 1; margin-bottom: 1rem; font-size: .95rem; }
.post-more { color: var(--primary-color); font-weight: 600; font-size: .9rem; }
.post-meta { display: flex; align-items: center; gap: .75rem; font-size: .9rem; color: var(--text-muted) !important; margin-bottom: .5rem; }
.cta-box { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 12px; padding: 1.5rem; margin-top: 2rem; }
.navbar .nav-link.active { color: var(--primary-color) !important; }

/* Menu hambúrguer legível no tema escuro */
[data-theme="dark"] .navbar-toggler { border-color: rgba(255,255,255,.45); }
[data-theme="dark"] .navbar-toggler-icon { filter: invert(1); }
@media (max-width: 575px) {
    .whatsapp-float { width: 48px; height: 48px; font-size: 1.6rem; right: 14px; bottom: 14px; }
}

.post-cover { display: block; width: 100%; height: auto; border-radius: 12px; margin: 1rem 0 1.5rem; }
.article h2 + p, .article p { margin-bottom: 1rem; }
.article ul { margin-bottom: 1rem; }
