/* ==========================================================================
   1. CORE VARIABLES, RESET & ACCESSIBLE ARCHITECTURE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:root {
    --primary: #1D3557;       /* Brand Navy */
    --secondary: #3F888F;     /* Brand Teal */
    --accent: #EBC473;        /* Brand Gold */
    --dark: #0f172a;          /* Charcoal text contrast */
    --light: #f8fafc;         /* Soft ambient background */
    --white: #ffffff;
    --gray: #64748b;
    --transition: all 0.25s ease-in-out;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

/* ==========================================================================
   2. REUSABLE CONTAINER FRAMES & BUTTON MODULES
   ========================================================================== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.section-padding { padding: 80px 0; }

.btn { display: inline-block; padding: 14px 28px; border-radius: 4px; font-weight: 700; text-decoration: none; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px; transition: var(--transition); border: none; cursor: pointer; text-align: center; }
.btn-accent { background-color: var(--accent) !important; color: var(--primary) !important; }
.btn-accent:hover { background-color: #dfb55c !important; transform: translateY(-1px); }
.btn-primary { background-color: var(--primary); color: var(--white); }
.btn-primary:hover { background-color: var(--secondary); transform: translateY(-1px); }

/* ==========================================================================
   3. NAVIGATION & UTILITY
   ========================================================================== */
.top-banner { background-color: var(--primary); color: var(--white); font-size: 0.85rem; padding: 10px 0; border-bottom: 3px solid var(--accent); }
.top-banner .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.top-banner a { color: var(--accent); text-decoration: none; font-weight: 600; }
.main-header { background-color: var(--white); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); position: sticky; top: 0; z-index: 1000; }
.nav-wrapper { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; }
.logo img { height: 100px; width: auto; display: block; }
.nav-menu { display: flex; align-items: center; list-style: none; gap: 25px; }
.nav-menu a { text-decoration: none; color: var(--primary); font-weight: 700; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.5px; transition: var(--transition); }
.nav-menu a:hover { color: var(--secondary); }

/* ==========================================================================
   4. IMAGE LAYOUT ENGINE & SERVICES
   ========================================================================== */
.hero-image-overlay { background: linear-gradient(rgba(15, 23, 42, 0.65), rgba(29, 53, 87, 0.75)), url('../images/hero-pool.jpg') no-repeat center center; background-size: cover; color: var(--white); }
.residential-hero { min-height: 400px; display: flex; align-items: center; justify-content: center; background-size: cover !important; background-position: center !important; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.service-card { background: var(--white); padding: 35px; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.02); border-top: 4px solid var(--secondary); transition: var(--transition); overflow: hidden; }
.card-img-wrapper { width: 100%; height: 220px; overflow: hidden; margin: -35px -35px 25px -35px; width: calc(100% + 70px); border-bottom: 1px solid #e2e8f0; }
.card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.service-card:hover .card-img-wrapper img { transform: scale(1.04); }
.split-row { display: flex; align-items: center; gap: 50px; }
.split-col { flex: 1; }
.split-img-frame { width: 100%; height: 380px; border-radius: 4px; overflow: hidden; }
.split-img-frame img { width: 100%; height: 100%; object-fit: cover; }
.disclaimer-box { max-width: 650px; margin: 0 auto; background: var(--white); padding: 25px; border-radius: 6px; border-left: 5px solid #dc2626; }

/* ==========================================================================
   5. FOOTER (Fixed Link States)
   ========================================================================== */
.site-footer { background-color: #0f172a; color: #94a3b8; padding: 60px 0 20px 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 25px; font-size: 0.85rem; display: flex; justify-content: space-between; }
.site-footer a { text-decoration: none !important; color: #94a3b8 !important; }
.site-footer a:hover { color: var(--accent) !important; }

/* ==========================================================================
   6. MOBILE RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .nav-wrapper { display: flex !important; justify-content: space-between !important; }
    nav { display: contents !important; }
    
    /* Fixed Hamburger logic */
    .menu-toggle { display: flex !important; flex-direction: column; justify-content: space-between; width: 30px; height: 20px; background: transparent; border: none; cursor: pointer; padding: 0; }
    .menu-toggle span { display: block; width: 100%; height: 3px; background-color: var(--primary); border-radius: 2px; }
    
    .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--white); box-shadow: 0 12px 24px rgba(0,0,0,0.1); padding: 25px 20px; gap: 15px; z-index: 999; }
    .nav-menu.mobile-active { display: flex !important; }
    .nav-menu .btn-accent { width: 90% !important; margin: 10px auto; }
    .split-row { flex-direction: column; }

    /* New: Mobile Header Optimization */
    .top-banner { padding: 16px 0 !important; font-size: 0.75rem !important; }
    /* Hide Marketing Text */
    .top-banner .container > div:first-child { display: none !important; }
    /* Hide Address line, keep Phone */
    .top-banner span:first-child { display: center !important; }
    /* Ensure only Phone remains centered */
    .top-banner .container { justify-content: center !important; }
}