/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Colors */
    --primary-dark: #2a0b12;
    --primary-light: #fff5f6;
    --accent: #e30613;
    --accent-hover: #b90410;
    --brand-blue: #064f9e;
    --brand-blue-hover: #033b78;
    --brand-red-soft: #ffe4e7;
    --text-main: #2a0b12;
    --text-muted: #6f4d55;
    --white: #ffffff;
    --card-shadow: 0 10px 30px -10px rgba(42, 11, 18, 0.12);
    --hover-shadow: 0 20px 40px -15px rgba(42, 11, 18, 0.22);
    --border-color: #f0c9cf;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --header-height: 92px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: clip;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

section {
    position: relative;
    scroll-margin-top: calc(var(--header-height) + 24px);
}

.section-padding {
    padding: 100px 0;
}

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

/* Typography styles */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    font-weight: 700;
}

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

a {
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   BUTTONS & UI ELEMENTS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--brand-blue) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(227, 6, 19, 0.28);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--brand-blue-hover) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(227, 6, 19, 0.36);
}

.btn-secondary {
    background-color: var(--brand-blue);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--brand-blue-hover);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-sm {
    padding: 9px 16px;
    font-size: 0.82rem;
}

.btn-full {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 245, 246, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(240, 201, 207, 0.85);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    white-space: nowrap;
}

.logo-icon {
    color: var(--accent);
    font-size: 1.6rem;
}

.highlight {
    color: var(--accent);
}

.logo-img {
    height: 56px;
    width: auto;
    object-fit: contain;
    display: block;
    border-radius: 6px;
}

.header-logo-img {
    height: 64px;
}

.footer-logo-img {
    height: 72px;
    background-color: var(--white);
    border-radius: 8px;
    padding: 6px;
}

.logo-fallback {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.nav-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    white-space: nowrap;
}

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

.header-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle .bar {
    width: 100%;
    height: 2px;
    background-color: var(--primary-dark);
    transition: all 0.3s ease;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    padding-top: calc(var(--header-height) + 60px);
    padding-bottom: 80px;
    background:
        radial-gradient(circle at 82% 18%, rgba(6, 79, 158, 0.14) 0%, transparent 34%),
        radial-gradient(circle at 18% 15%, rgba(227, 6, 19, 0.12) 0%, transparent 32%),
        linear-gradient(180deg, #fff5f6 0%, #ffffff 100%);
    overflow: hidden;
}

.hero-container {
    display: flex;
    justify-content: center;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    max-width: 860px;
}

.hero-logo-img {
    width: min(280px, 70vw);
    height: auto;
    border-radius: 12px;
    box-shadow: 0 14px 35px -18px rgba(42, 11, 18, 0.55);
}

.hero-tagline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--brand-red-soft);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    align-self: center;
}

.hero-title {
    font-size: 3.2rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.hero-description {
    font-size: 1.15rem;
    max-width: 680px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.hero-badges {
    display: flex;
    gap: 24px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
}

.badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-dark);
}

.badge-icon {
    color: var(--accent);
    font-size: 1.2rem;
}

/* ==========================================================================
   SECTIONS: HEADERS & LAYOUTS
   ========================================================================== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 56px auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.section-subtitle {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.1em;
}

.section-title {
    font-size: 2.25rem;
    line-height: 1.25;
}

/* ==========================================================================
   DIFERENCIAIS SECTION
   ========================================================================== */
.diferenciais-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.diferencial-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 40px 32px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.diferencial-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    border-color: rgba(227, 6, 19, 0.35);
}

.card-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(227, 6, 19, 0.12) 0%, rgba(6, 79, 158, 0.12) 100%);
    color: var(--brand-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.diferencial-card h3 {
    font-size: 1.35rem;
}

/* ==========================================================================
   SERVIÇOS SECTION
   ========================================================================== */
.servicos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.servico-card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.servico-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    border-color: var(--border-color);
}

.servico-image-fallback {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--white);
}

.residential-bg {
    background: linear-gradient(135deg, var(--brand-blue-hover) 0%, var(--brand-blue) 100%);
}

.commercial-bg {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--brand-blue-hover) 100%);
}

.quick-bg {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
}

.servico-content {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.servico-content h3 {
    font-size: 1.35rem;
}

.servico-link {
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.servico-link:hover {
    color: var(--accent-hover);
    gap: 12px;
}

/* ==========================================================================
   COMO FUNCIONA SECTION
   ========================================================================== */
.passos-timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    position: relative;
}

.passos-timeline::before {
    content: '';
    position: absolute;
    top: 35px;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.passo-item {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
}

.passo-number {
    width: 70px;
    height: 70px;
    background-color: var(--white);
    border: 3px solid var(--accent);
    color: var(--primary-dark);
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
}

.passo-item h3 {
    font-size: 1.25rem;
    margin-top: 8px;
}

/* ==========================================================================
   DEPOIMENTOS SECTION
   ========================================================================== */
.depoimentos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.depoimento-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stars {
    color: var(--accent);
    display: flex;
    gap: 4px;
}

.depoimento-text {
    font-size: 1.05rem;
    font-style: italic;
    color: var(--primary-dark);
}

.depoimento-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background-color: var(--brand-red-soft);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.author-name {
    font-size: 1rem;
    font-weight: 700;
}

.author-service {
    font-size: 0.85rem;
}

/* ==========================================================================
   FAQ SECTION (ACCORDION)
   ========================================================================== */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-trigger {
    width: 100%;
    padding: 24px;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    cursor: pointer;
}

.faq-icon {
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-content p {
    padding: 0 24px 24px 24px;
    font-size: 0.95rem;
}

/* Accordion open state classes via JS */
.faq-item.active {
    border-color: rgba(227, 6, 19, 0.35);
    box-shadow: var(--card-shadow);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: var(--accent);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--primary-dark);
    color: #e9c9ce;
    padding-top: 80px;
}

.main-footer h4 {
    color: var(--white);
    margin-bottom: 24px;
    font-size: 1.1rem;
}

.main-footer a {
    color: #e9c9ce;
}

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

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.5fr;
    gap: 64px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(227, 6, 19, 0.24);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-brand .logo {
    color: var(--white);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e9c9ce;
}

.footer-contact i {
    color: var(--accent);
}

.footer-bottom {
    padding: 24px 0;
    font-size: 0.85rem;
}

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

/* ==========================================================================
   RESPONSIVENESS (MOBILE-FIRST PRINCIPLE ADAPTATIONS)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
}

@media (max-width: 768px) {
    :root {
        --header-height: 80px;
    }

    .section-padding {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 1.85rem;
    }
    
    /* Nav Menu Mobile */
    .mobile-menu-toggle {
        display: flex;
    }

    .header-logo-img {
        height: 52px;
    }

    .hero-logo-img {
        width: min(220px, 74vw);
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        flex-direction: column;
        padding: 40px 24px;
        gap: 24px;
        align-items: flex-start;
        border-top: 1px solid var(--border-color);
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .btn-header-whatsapp {
        display: none; /* Em telas muito pequenas oculta do header se o menu estiver ativo */
    }
    
    /* Grid Columns */
    .diferenciais-grid,
    .servicos-grid,
    .passos-timeline,
    .depoimentos-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .passos-timeline::before {
        display: none;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .bottom-container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

/* ==========================================================================
   GALERIA SECTION
   ========================================================================== */
.galeria-section {
    background-color: var(--white);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.galeria-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 280px;
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.galeria-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(42, 11, 18, 0.84) 0%, rgba(42, 11, 18, 0) 60%);
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.galeria-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.galeria-item:hover::before {
    opacity: 1;
}

.galeria-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.5s ease;
}

.galeria-item:hover .galeria-img {
    transform: scale(1.05);
}

.galeria-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    color: var(--white);
    z-index: 3;
}

.galeria-caption h4 {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.galeria-caption p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
}

@media (max-width: 1024px) {
    .galeria-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 568px) {
    .galeria-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
