/* ==========================================================================
   DESIGN SYSTEM & VARIABLES
   ========================================================================== */
:root {
    /* Color Palette */
    --color-primary: #0f172a;       /* Deep navy blue */
    --color-secondary: #1e293b;     /* Dark slate */
    --color-accent: #f59e0b;        /* Gold/yellow for emergency highlights */
    --color-accent-hover: #d97706;  /* Darker gold */
    --color-success: #22c55e;       /* WhatsApp green */
    --color-success-hover: #16a34a; /* WhatsApp green hover */
    --color-text-dark: #0f172a;     /* Main text */
    --color-text-muted: #475569;    /* Secondary text */
    --color-light-bg: #f8fafc;      /* Soft background */
    --color-white: #ffffff;
    --color-border: #e2e8f0;

    /* Fonts */
    --font-headings: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Shadows & Border Radii */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.15), 0 8px 10px -6px rgb(0 0 0 / 0.15);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Max Widths */
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

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

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

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

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

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 44px;
    width: auto;
    display: block;
}

@media (max-width: 480px) {
    .logo-img {
        height: 36px;
    }
}

.header-nav {
    display: none;
    gap: 1.5rem;
}

.header-nav a {
    color: var(--color-text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s;
}

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

@media (min-width: 768px) {
    .header-nav {
        display: flex;
        align-items: center;
    }
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.15);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    color: var(--color-success-hover);
    font-size: 0.8rem;
    font-weight: 600;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-success);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    position: relative;
    background: radial-gradient(circle at 70% 30%, #1e293b 0%, #0f172a 100%);
    color: var(--color-white);
    padding: 4rem 0 3.5rem;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(rgba(245, 158, 11, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
}

.hero-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.hero-badge {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--color-accent);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.25rem;
    line-height: 1.15;
}

.hero-title .highlight {
    color: var(--color-accent);
    background: linear-gradient(120deg, var(--color-accent) 0%, #fbbf24 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-lead {
    font-size: 1.1rem;
    color: #cbd5e1;
    margin-bottom: 2.25rem;
    font-weight: 400;
    line-height: 1.6;
}

/* Call to action buttons in Hero */
.cta-buttons-hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto 3rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-icon-svg {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-svg img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-text {
    text-align: left;
    display: flex;
    flex-direction: column;
}

.btn-sub {
    font-size: 0.7rem;
    letter-spacing: 1px;
    opacity: 0.9;
}

.btn-main {
    font-size: 1.15rem;
    line-height: 1.2;
}

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

.btn-call:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-whatsapp {
    background-color: var(--color-success);
    color: var(--color-white);
    animation: gentle-pulse 2.5s infinite;
}

.btn-whatsapp:hover {
    background-color: var(--color-success-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

@keyframes gentle-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Hero Features */
.hero-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
}

.feature-icon {
    font-size: 1.75rem;
}

.feature-content {
    line-height: 1.2;
}

.feature-content strong {
    display: block;
    color: var(--color-white);
    font-size: 0.95rem;
}

.feature-content span {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* ==========================================================================
   NEIGHBORHOODS (100% FOCUS ON TARGET AREAS)
   ========================================================================== */
.neighborhoods {
    padding: 4rem 0;
    background-color: var(--color-light-bg);
}

.section-title {
    text-align: center;
    font-size: 1.85rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-dark);
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    padding: 0 1rem;
}

.bairros-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.bairro-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
}

.bairro-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    cursor: pointer;
}

.bairro-card:hover .bairro-pin {
    color: var(--color-accent);
}

.bairro-card:hover .bairro-eta {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.bairro-card h3 {
    font-size: 1rem;
    color: var(--color-text-dark);
    margin-top: 0.25rem;
}

.bairro-pin {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

.bairro-eta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-top: 0.25rem;
    background-color: var(--color-light-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    align-self: flex-start;
}

/* Highlight style for match dynamic neighbourhood */
.bairro-card.highlight-bairro {
    border-color: var(--color-accent);
    background-color: rgba(245, 158, 11, 0.02);
    box-shadow: 0 0 0 1px var(--color-accent);
}

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

.bairro-card.highlight-bairro .bairro-eta {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.local-assurance {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    max-width: 600px;
    margin: 2.5rem auto 0;
}

.assurance-badge {
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.local-assurance p {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services {
    padding: 4rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease-in-out;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-icon-box {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    background-color: var(--color-light-bg);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--color-text-dark);
}

.service-card ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-card li {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    position: relative;
    padding-left: 1.25rem;
}

.service-card li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

/* ==========================================================================
   FAQ SECTION (ACCORDION)
   ========================================================================== */
.faq {
    padding: 4rem 0;
    background-color: var(--color-light-bg);
}

.faq-accordion {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.accordion-item {
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 1.25rem;
    text-align: left;
    font-family: var(--font-headings);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    gap: 1rem;
    transition: background-color 0.2s ease-in-out;
}

.accordion-header:hover {
    background-color: rgba(15, 23, 42, 0.01);
}

.accordion-arrow {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    transition: transform 0.2s ease-in-out;
}

.accordion-item.active .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out;
}

.accordion-content p {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* ==========================================================================
   CTA BANNER
   ========================================================================== */
.cta-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1e293b 100%);
    color: var(--color-white);
    padding: 4.5rem 0;
    text-align: center;
}

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

.cta-banner h2 {
    font-size: 1.85rem;
    margin-bottom: 1rem;
}

.cta-banner p {
    color: #cbd5e1;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.cta-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.banner-btn {
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.banner-icon-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.banner-btn-call {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.banner-btn-call:hover {
    background-color: var(--color-accent-hover);
    transform: scale(1.02);
}

.banner-btn-wa {
    background-color: var(--color-success);
    color: var(--color-white);
}

.banner-btn-wa:hover {
    background-color: var(--color-success-hover);
    transform: scale(1.02);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background-color: #0b0f19;
    color: #64748b;
    padding: 3rem 0 7rem; /* Added padding-bottom to avoid overlaps with sticky mobile bar */
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #64748b;
    font-size: 0.85rem;
    transition: color 0.2s;
}

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

.footer p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.footer-locality {
    color: #94a3b8;
    font-weight: 500;
}

.footer-legal {
    font-size: 0.7rem !important;
    margin-top: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* ==========================================================================
   STICKY MOBILE FOOTER CTA BAR
   ========================================================================== */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    display: flex;
    padding: 0.65rem 1rem;
    gap: 0.75rem;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.sticky-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem;
    border-radius: var(--radius-md);
    color: var(--color-white);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.1s ease-in-out;
}

.sticky-btn:active {
    transform: scale(0.97);
}

.sticky-btn-call {
    background-color: var(--color-primary);
}

.sticky-btn-wa {
    background-color: var(--color-success);
}

.sticky-icon {
    font-size: 1.15rem;
}

.sticky-icon-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */

/* Medium Devices (Tablets, 600px and up) */
@media (min-width: 600px) {
    .bairros-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Devices (Desktops, 768px and up) */
@media (min-width: 768px) {
    .hero {
        padding: 6rem 0 5rem;
    }

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

    .hero-lead {
        font-size: 1.25rem;
    }

    .cta-buttons-hero {
        flex-direction: row;
        max-width: 580px;
    }

    .btn {
        flex: 1;
    }

    .hero-features {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .bairros-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cta-banner-buttons {
        flex-direction: row;
        max-width: 480px;
    }

    .banner-btn {
        flex: 1;
    }

    /* Hide sticky footer on desktop as it's meant for quick mobile call/WhatsApp actions */
    .sticky-cta {
        display: none;
    }

    .footer {
        padding-bottom: 3rem;
    }
}

/* Extra Large Devices (1024px and up) */
@media (min-width: 1024px) {
    .bairros-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .section-title {
        font-size: 2.25rem;
    }
}

/* ==========================================================================
   ROUTE MODAL LIGHTBOX
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.75);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--color-white);
    width: 100%;
    max-width: 550px;
    border-radius: var(--radius-md);
    padding: 2rem 1.75rem;
    position: relative;
    box-shadow: var(--shadow-xl);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

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

.modal-header h3 {
    font-size: 1.35rem;
    color: var(--color-text-dark);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-sub {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

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

.input-inline {
    display: flex;
    gap: 0.5rem;
}

.input-inline input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.input-inline input:focus {
    border-color: var(--color-accent);
}

.btn-calc {
    background-color: var(--color-accent);
    color: var(--color-primary);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-headings);
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}

.btn-calc:hover {
    background-color: var(--color-accent-hover);
}

.route-results {
    border-top: 1px dashed var(--color-border);
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.route-eta-badge {
    background-color: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.route-eta-badge strong {
    color: var(--color-accent-hover);
    font-size: 1.15rem;
}

.iframe-map-container {
    width: 100%;
    height: 220px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border);
    margin-bottom: 1.25rem;
}

.iframe-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-cta-box {
    display: flex;
    justify-content: center;
}

.btn-gps {
    width: 100%;
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    text-align: center;
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 0.95rem;
    transition: background-color 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-gps:hover {
    background-color: var(--color-secondary);
}
