﻿/* ==========================================================================
   1. CSS Variables & Reset
   ========================================================================== */
:root {
    /* Color Palette */
    --primary: #1e40af;       /* Deep Trust Blue */
    --primary-hover: #1e3a8a;
    --secondary: #3b82f6;     /* Bright Action Blue */
    --accent: #f59e0b;        /* Warm Amber for highlights */
    
    /* Backgrounds & Text */
    --bg-page: #f8fafc;       /* Very light grey/blue for main background */
    --bg-surface: #ffffff;    /* Pure white for cards/forms */
    --text-main: #0f172a;     /* Dark slate for high contrast */
    --text-muted: #475569;    /* Medium slate for secondary text */
    --border-color: #e2e8f0;
    
    /* Shadows & 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);
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-page);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary);
}

/* ==========================================================================
   2. Utility Classes & Layout Grids
   ========================================================================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-highlight { color: var(--accent); }
.bg-light { background-color: var(--bg-surface); }
.bg-secondary { background-color: #eff6ff; } /* Light blue background for sections */

/* The Main Two-Column Layout */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start; /* Crucial for sticky sidebar */
    padding-top: 30px;
    padding-bottom: 60px;
}

/* ==========================================================================
   3. Buttons & Interactive Elements
   ========================================================================== */
button, .btn-primary, .btn-secondary, .btn-highlight {
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
}

.btn-secondary:hover {
    background-color: var(--bg-page);
    border-color: var(--text-muted);
}

.btn-full { width: 100%; }

.btn-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ==========================================================================
   4. Header & Navigation
   ========================================================================== */
.site-header {
    background-color: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.site-nav .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav a {
    color: var(--text-main);
    font-weight: 500;
}

.site-nav a:hover {
    color: var(--primary);
}

.site-nav .btn-highlight {
    background-color: var(--secondary);
    color: white;
    padding: 8px 16px;
}

.site-nav .btn-highlight:hover {
    background-color: var(--primary);
}

.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
}

/* ==========================================================================
   5. Main Content Sections
   ========================================================================== */
.section {
    padding: 60px 0;
    border-radius: var(--radius-xl);
    margin-bottom: 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Hero Panel */
.hero-panel {
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(30, 64, 175, 0.8)), url('IMAGES/House Cleaning.png') center/cover;
    border-radius: var(--radius-xl);
    padding: 80px 40px;
    text-align: center;
    color: white;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.hero-panel h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 15px;
}

.hero-tagline {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Feature Steps */
.feature-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.step-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.step-icon {
    width: 40px;
    height: 40px;
    background: #e0e7ff;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 15px;
}

/* Service Cards */
.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content { padding: 20px; }
.card-content h3 { color: var(--primary); margin-bottom: 10px; }
.card-content p { color: var(--text-muted); font-size: 0.95rem; }

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

.gallery-grid img:hover { transform: scale(1.03); }

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.testimonial-item {
    background: var(--bg-surface);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary);
    font-style: italic;
    color: var(--text-muted);
}

.testimonial-item footer {
    margin-top: 15px;
    font-weight: 600;
    color: var(--text-main);
    font-style: normal;
}

/* ==========================================================================
   6. Booking Form
   ========================================================================== */
.form-holder {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.standard-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.form-group input, 
.form-group select, 
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    background-color: var(--bg-page);
    transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

/* ==========================================================================
   7. Sidebar
   ========================================================================== */
.sidebar-sticky {
    position: sticky;
    top: calc(var(--header-height) + 30px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.widget {
    background: var(--bg-surface);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.widget h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--bg-page);
    padding-bottom: 10px;
}

.toc-widget ul {
    list-style: none;
}

.toc-widget li { margin-bottom: 10px; }
.toc-widget a { color: var(--text-muted); font-weight: 500; }
.toc-widget a:hover { color: var(--secondary); padding-left: 5px; }

.cta-widget p { margin-bottom: 15px; font-size: 0.95rem; color: var(--text-muted); }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer {
    background-color: #0f172a;
    color: white;
    padding-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo { color: white; margin-bottom: 15px; display: block; }
.footer-brand p { color: #94a3b8; max-width: 400px; }

.footer-contact-info h4 { margin-bottom: 20px; font-size: 1.2rem; }
.footer-contact-info ul { list-style: none; display: flex; flex-direction: column; gap: 15px; }
.footer-contact-info li { display: flex; align-items: center; gap: 10px; color: #cbd5e1; }
.footer-contact-info a { color: #cbd5e1; }
.footer-contact-info a:hover { color: white; }

.footer-bottom {
    background-color: #020617;
    padding: 20px 0;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

/* ==========================================================================
   9. Chatbot / Floating Help
   ========================================================================== */
.floating-help {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.floating-help:hover { background-color: var(--primary-hover); transform: scale(1.05); }

.faq-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.faq-overlay.active { display: block; opacity: 1; }

.faq-panel {
    position: fixed;
    bottom: 90px;
    right: 30px;
    width: 350px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1002;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.faq-panel.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.faq-header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-close { background: none; color: white; border: none; font-size: 1.2rem; padding: 5px; }
.faq-body { padding: 20px; max-height: 400px; overflow-y: auto; background: var(--bg-page); }
.faq-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 15px; }
.faq-chat { margin-top: 15px; padding: 10px; background: white; border-radius: var(--radius-md); font-size: 0.9rem; min-height: 100px;}

.faq-input-group {
    display: flex;
    padding: 15px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.faq-input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    outline: none;
}

.faq-input-group button {
    padding: 10px 15px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
}

/* ==========================================================================
   10. Responsive Media Queries (Mobile View)
   ========================================================================== */
@media (max-width: 992px) {
    .layout-grid {
        grid-template-columns: 1fr; /* Stack main content and sidebar */
    }
    
    .sidebar-sticky { position: static; }
    
    .form-row-group { grid-template-columns: 1fr; }
    .form-actions { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero-panel h1 { font-size: 2.2rem; }
    .hero-panel { padding: 40px 20px; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    
    /* Mobile Menu Logic */
    .menu-toggle { display: block; }
    
    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-surface);
        padding: 20px;
        box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        border-top: 1px solid var(--border-color);
    }

    .site-nav.nav-active { display: block; }
    
    .site-nav .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .site-nav .btn-highlight { width: 100%; text-align: center; }
    
    .faq-panel { width: calc(100% - 40px); right: 20px; bottom: 80px; }
}

/* ==========================================================================
   11. Interactive Components (Before/After Slider & Map)
   ========================================================================== */
.ba-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: #e2e8f0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ba-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ba-after {
    /* Starts showing 50% of the image from the left */
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
}

.ba-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Invisible but clickable */
    cursor: ew-resize;
    z-index: 10;
    margin: 0;
}

.ba-line {
    position: absolute;
    inset: 0;
    width: 4px;
    height: 100%;
    background: white;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.ba-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 6;
}