/*
Theme Name: Clarity Housekeeping Custom
Author: Gemini
Description: A fully responsive custom theme with a working mobile menu.
Version: 2.3 (Emergency Fix)
*/

/* ============================
   1. Variables & Reset
   ============================ */
:root {
    --primary: #0a1f33;    /* Deep Navy */
    --accent: #2c3e50;     /* Dark Slate */
    --highlight: #00b4d8;  /* Clean Cyan */
    --light: #f4f7f6;      /* Clinical Grey */
    --text: #333333;       /* Standard Text */
    --white: #ffffff;
    --spacing-section: 90px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--white);
}

/* ============================
   2. Typography & Utilities
   ============================ */
h1, h2, h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: 1.5rem;
    max-width: 700px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--highlight);
    color: var(--white);
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: 2px solid var(--highlight);
    cursor: pointer;
}

.btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

/* ============================
   3. Header & Navigation (CRITICAL FIXES)
   ============================ */

/* Sticky Header Container */
.site-header {
    background: rgba(255, 255, 255, 0.98);
    padding: 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    width: 100%; /* Force full width */
}

/* Flexbox wrapper */
.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    position: relative; /* Establish context */
}

/* Logo Sizing */
.logo img {
    height: 120px;
    width: auto;
    transition: transform 0.3s ease;
    display: block; /* Removes weird image spacing */
}

.logo:hover img {
    transform: scale(1.05);
}

/* --- THE CHECKBOX FIX --- */
/* We use !important to guarantee it is hidden on all screens */
#nav-toggle, 
.nav-toggle { 
    display: none !important; 
}

/* Desktop Navigation (Default State) */
.nav-menu {
    display: flex; /* Horizontal on desktop */
    align-items: center;
    margin-left: auto; /* Push to the right */
    margin-right: 20px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
    padding: 0;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    position: relative;
    padding: 5px 0;
}

/* Animated Underline Effect */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--highlight);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Button in Header */
.btn-nav {
    padding: 10px 25px;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

/* --- VISIBILITY CONTROLS --- */
/* By default (Desktop), hide mobile elements */
.mobile-only { display: none !important; }
.desktop-only { display: block !important; }
.nav-toggle-label { display: none !important; } 

/* ============================
   4. Mobile Logic (Max-Width 768px)
   ============================ */
@media screen and (max-width: 768px) {
    
    .header-wrapper {
        height: 70px;
    }

    /* 1. Swap Visibility */
    .desktop-only { display: none !important; }
    
    .mobile-only { 
        display: block !important; 
        margin-top: 20px;
        width: 100%;
    }
    
    .mobile-only .btn {
        width: 100%;
        text-align: center;
    }

    /* 2. Show Hamburger Icon */
    .nav-toggle-label {
        display: flex !important; /* Force visible */
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 1002;
    }

    .nav-toggle-label span {
        display: block;
        width: 30px;
        height: 3px;
        background-color: var(--primary);
        border-radius: 3px;
        transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    }

    /* 3. The Mobile Menu Overlay */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 30px 20px;
        border-top: 1px solid rgba(0,0,0,0.05);
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        
        /* Reset flex direction for mobile */
        flex-direction: column;
        align-items: stretch; /* Stretch full width */
        margin: 0; /* Remove desktop margins */
        
        /* Animation: Hidden by default */
        transform: translateY(-20px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        pointer-events: none;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 25px;
        width: 100%;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 10px 0;
    }

    /* 4. Opening Logic */
    /* Note: We target the ID or Class of the checkbox */
    .nav-toggle:checked ~ .nav-menu {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

    /* Hamburger Animation to 'X' */
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 8px);
        background-color: var(--highlight);
    }
    
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }
    
    .nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -8px);
        background-color: var(--highlight);
    }
}

/* ============================
   5. Hero Section (Parallax)
   ============================ */
.hero {
    background: linear-gradient(rgba(10, 31, 51, 0.8), rgba(10, 31, 51, 0.7)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=1600');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: 180px 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

.hero p {
    margin: 0 auto 2rem auto;
    font-size: 1.2rem;
    color: #e0e0e0;
    max-width: 800px;
}

/* ============================
   6. Sections & Layouts
   ============================ */
section {
    padding: var(--spacing-section) 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* About Section */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.stats-box {
    background: var(--primary);
    color: var(--white);
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.stats-box h2 {
    color: var(--highlight);
    margin-bottom: 0.2rem;
    font-size: 3rem;
}

.stats-box p {
    color: #ccc;
    margin-bottom: 0;
}

/* Services Grid */
.bg-light {
    background-color: var(--light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 4px solid var(--highlight);
    height: 100%;
}

.service-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 15px;
}

/* Careers (Parallax) */
.parallax-section {
    position: relative;
    background: url('https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&q=80&w=1600');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
}

.overlay {
    background: rgba(10, 31, 51, 0.85);
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 { color: var(--white); font-size: 2.5rem; }
.cta-content p { margin: 0 auto 2rem; color: #ddd; }

/* Footer */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 70px 0 20px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer h3 { color: var(--white); margin-bottom: 20px; font-size: 1.2rem; }
.footer p, .footer li { color: #aab7c4; margin-bottom: 10px; font-size: 0.95rem; }
.footer a:hover { color: var(--highlight); }

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    font-size: 0.85rem;
    color: #6c7a89;
}

/* ============================
   7. General Layout Adjustments (Mobile)
   ============================ */

/* Tablet & Mobile (Max Width 768px) */
@media screen and (max-width: 768px) {
    /* Layout Adjustments */
    .split-layout { grid-template-columns: 1fr; gap: 40px; }
    .hero { padding: 100px 0; background-attachment: scroll; }
    .parallax-section { background-attachment: scroll; }
    .stats-box { text-align: center; padding: 30px; }
    .hero h1 { font-size: 2.2rem; }
    section { padding: 50px 0; }
}

/* Small Mobile (Max Width 480px) */
@media screen and (max-width: 480px) {
    .container { padding: 0 15px; }
    .hero h1 { font-size: 1.8rem; }
    .services-grid { grid-template-columns: 1fr; }
    .btn { width: 100%; text-align: center; }
}