/* --- MASTER STYLE: Crisp Water Theme + App Nav + Footer --- */

/* 1. VARIABLES & RESET */
:root {
    /* Brand Colors */
    --brand-pool: #40E0D0;       /* Bright Turquoise (Accents) */
    --cta-solid: #0F172A;        /* Deep Navy (Buttons/Text) */
    --cta-hover: #1E293B;        /* Lighter Navy (Interaction) */
    
    /* UI Colors */
    --text-main: #1E293B;
    --text-sub: #64748B;
    --bg-body: #FFFFFF;
    --bg-surface: #F8FAFC;
    
    /* Layout */
    --nav-height: 80px;
    --radius: 12px;
    --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* CTA gradient colors */
    --cta-gradient-start: #0F172A; /* navy */
    --cta-gradient-end: #40E0D0; /* turquoise */
    --cta-gradient: linear-gradient(90deg, var(--cta-gradient-start) 0%, var(--cta-gradient-end) 100%);
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding-top: var(--nav-height); /* Push content down below fixed nav */
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    color: var(--cta-solid);
    margin-top: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-weight: 800;
}

a { text-decoration: none; color: inherit; transition: all 0.2s; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; display: block; }

.container {
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* --- 2. APP-STYLE NAVIGATION --- */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #F1F5F9;
    z-index: 1000;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    position: relative;
}

/* LEFT: Hamburger Button */
.menu-toggle {
    display: flex; flex-direction: column; justify-content: space-between;
    width: 30px; height: 20px; background: transparent; border: none; cursor: pointer;
    z-index: 1002; padding: 0;
}
.menu-toggle span { display: block; width: 26px; height: 2.5px; background-color: var(--cta-solid); border-radius: 2px; transition: all 0.3s ease; }
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* CENTER: Logo */
.logo {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    height: 70px; display: flex; align-items: center; z-index: 1001;
}
.logo img { height: 100%; width: auto; }

/* RIGHT: Client Login Button */
.client-login-btn {
    background-image: var(--cta-gradient); color: white !important;
    padding: 10px 24px; border-radius: 50px; font-weight: 600; font-size: 0.9rem;
    transition: transform 0.2s, background-position 0.3s; white-space: nowrap; border: 2px solid transparent; background-size: 200% 100%; background-position: 0% 50%;
}
.client-login-btn:hover { background-position: 100% 50%; transform: translateY(-1px); }

/* DRAWER MENU */
.nav-links {
    position: fixed; top: var(--nav-height); left: -100%; width: 300px;
    height: calc(100vh - var(--nav-height)); background: white; border-right: 1px solid #E2E8F0;
    padding: 40px 0; transition: left 0.3s ease-in-out; display: flex;
    flex-direction: column; box-shadow: 5px 0 15px rgba(0,0,0,0.05); overflow-y: auto;
}
.nav-links.active { left: 0; }
.nav-links li { width: 100%; border-bottom: 1px solid #f9f9f9; }
.nav-links a { display: block; padding: 20px 30px; text-align: center; font-size: 1.1rem; }
.nav-links a:hover { background-color: #F0F4F8; color: var(--brand-pool); }

/* Dropdown in Drawer */
.dropdown-content { display: none; background-color: #F1F5F9; }
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { font-size: 0.95rem; padding: 15px 30px; color: var(--text-sub); }


/* --- 3. CORE LAYOUT STYLING --- */

/* Hero Section (Image & Overlay) */
#hero {
    position: relative;
    text-align: center;
    padding: 180px 20px 220px; 
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%),
        url('pool-hero-placeholder.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}

#hero h1 { color: var(--cta-solid); position: relative; z-index: 2; }
#hero h1 span { color: var(--brand-pool-dark); } /* Simplified color for safety */
#hero p { color: var(--text-sub); position: relative; z-index: 2; }
#hero .cta-button { z-index: 2; box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.2); }

/* Wave Graphic */
.custom-shape-divider-bottom { position: absolute; bottom: 0; left: 0; width: 100%; overflow: hidden; line-height: 0; z-index: 1; }
.custom-shape-divider-bottom svg { display: block; width: calc(100% + 1.3px); height: 80px; }
.custom-shape-divider-bottom .shape-fill { fill: var(--bg-body); }

/* Calculator Wrapper */
.calculator-wrapper { max-width: 1100px; margin: -80px auto 80px; position: relative; z-index: 10; padding: 0 20px; }
.controls-container { background: white; padding: 20px 30px; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); display: flex; justify-content: center; gap: 20px; margin-bottom: 50px; border: 1px solid #E2E8F0; flex-wrap: wrap; }
select { padding: 12px 20px; border: 1px solid #CBD5E1; border-radius: 50px; font-size: 1rem; }

/* Service Cards */
.service-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; align-items: stretch; }
.service-card { background: white; border-radius: var(--radius); padding: 35px 30px; text-align: center; box-shadow: var(--shadow-card); border: 1px solid #F1F5F9; transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative; display: flex; flex-direction: column; height: 100%; }
.service-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-float); border-color: var(--brand-pool); }

.recommended { border: 2px solid var(--brand-pool); transform: scale(1.02); z-index: 5; }
.recommended::before { content: 'BEST VALUE'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand-pool); color: white; padding: 4px 12px; font-size: 0.75rem; font-weight: 700; border-radius: 20px; }

.price-display { font-size: 3rem; font-weight: 800; color: var(--cta-solid); line-height: 1; margin: 10px 0; }
.features-list { list-style: none; padding: 0; margin: 0 0 30px; text-align: left; flex-grow: 1; }
.features-list li { padding: 10px 0; border-bottom: 1px solid #F1F5F9; font-size: 0.95rem; display: flex; align-items: center; }
.features-list li::before { content: '✔'; color: var(--brand-pool); font-weight: 900; margin-right: 12px; font-size: 1rem; }
.features-list li.excluded { color: #CBD5E1; text-decoration: line-through; opacity: 0.7; }

/* Buttons */
.cta-button { display: block; width: 100%; background-image: var(--cta-gradient); color: white !important; padding: 16px; border-radius: 8px; font-weight: 600; transition: background-position 0.3s ease, transform 0.2s, box-shadow 0.2s; border: 2px solid transparent; cursor: pointer; background-size: 200% 100%; background-position: 0% 50%; }
.cta-button:hover { background-position: 100% 50%; transform: translateY(-2px); box-shadow: 0 6px 18px rgba(15, 23, 42, 0.24); }
.cta-button.outline { background-color: white; color: var(--cta-solid) !important; border: 2px solid #E2E8F0; }
.cta-button.outline:hover { border-color: var(--cta-solid); background-color: white; color: var(--cta-solid) !important; }


/* --- 6. ADVANCED FOOTER STYLES --- */
footer {
    background-color: var(--cta-solid);
    color: #E2E8F0;
    padding: 60px 0 30px;
    margin-top: 100px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    padding: 0 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--brand-pool);
    display: inline-block;
    padding-bottom: 5px;
}

.footer-links a { color: #94A3B8; display: block; margin-bottom: 10px; transition: color 0.2s; }
.footer-links a:hover { color: var(--brand-pool); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    text-align: center;
    color: #64748B;
}

/* --- 7. RESPONSIVE --- */
@media (max-width: 900px) {
    .nav-wrapper { padding: 0 15px; }
    .nav-links { width: 85%; }
    .controls-container { flex-direction: column; border-radius: 20px; padding: 25px; }
    select { width: 100%; }
}

/* --- Utility classes added for page-specific layout fixes --- */
.main-header { text-align: center; max-width: 800px; margin: 40px auto; }
.main-header p { font-size: 1.2em; color: var(--text-sub); }

.service-grid-2 { grid-template-columns: 2fr 1fr; max-width: 1000px; margin: 0 auto; align-items: start; }
/* Center the content block while keeping list text left-aligned */
.content-column { padding-right: 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.content-column .left-list { max-width: 640px; text-align: left; }

/* Centered features list variant */
.features-list.centered { text-align: center; padding-left: 0; max-width: 640px; }
.features-list.centered li { display: block; padding: 8px 0; border-bottom: none; }
.features-list.centered li::before { margin-right: 8px; }

/* Section title hover animation (matches .service-card hover feel) */
.section-title { color: var(--brand-pool); display: block; margin-bottom: 12px; transition: transform 0.25s ease, color 0.25s ease; }
.section-title:hover,
.content-column:hover .section-title { transform: translateY(-6px); color: var(--cta-solid); }

.left-list { margin-top: 0; padding-left: 20px; }

.highlight-card { box-shadow: 0 10px 20px rgba(0,0,0,0.1); border: 2px solid var(--brand-pool); }
.highlight-card .card-title { color: var(--cta-solid); }

.cta-margin { margin-top: 15px; }

.contact-link { color: white; }
.footer-cta { text-align: center; padding: 10px; }

.nav-dropdown-link { cursor: pointer; }
.nav-quote { margin-top: 20px; text-align: center; }
.nav-quote-link { color: var(--cta-solid); font-weight: bold; }

/* --- Reviews page styles moved from inline in reviews.html --- */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.review-card { background: white; padding: 35px; border-radius: 16px; box-shadow: var(--shadow-card); border: 1px solid #F1F5F9; }
.stars { color: #F59E0B; font-size: 1.2em; letter-spacing: 2px; margin-bottom: 15px; }
.review-text { font-style: italic; color: var(--text-main); line-height: 1.6; font-size: 1.05em; }
.review-author { font-weight: 700; color: var(--cta-solid); display: block; margin-top: 20px; }
.review-location { font-size: 0.85em; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.5px; }

/* Promo CTA section on reviews page */
.promo-cta { text-align: center; margin-top: 60px; background-color: #F0FDFA; padding: 40px; border-radius: 16px; border: 1px solid #CCFBF1; }
.promo-cta p { margin-bottom: 20px; }
.promo-cta .cta-button { max-width: 250px; margin: 0 auto; }

/* --- Google Reviews Widget --- */
.reviews-widget-section {
    background: linear-gradient(135deg, #F0FDFA 0%, #ECFEFF 100%);
    padding: 60px 0;
    margin-top: 60px;
}

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

.reviews-widget-header h2 {
    color: var(--cta-solid);
    margin-bottom: 20px;
    font-size: 2.2rem;
}

.reviews-widget-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.rating-stars {
    color: #F59E0B;
    font-size: 1.8rem;
    letter-spacing: 4px;
}

.rating-text {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.rating-score {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--cta-solid);
}

.rating-count {
    color: var(--text-sub);
    font-size: 1rem;
}

.google-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.google-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.reviews-widget-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.review-widget-card {
    background: white;
    padding: 25px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    border: 1px solid #E2E8F0;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.review-widget-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-float);
}

.review-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

.reviewer-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cta-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.reviewer-name {
    font-weight: 700;
    color: var(--cta-solid);
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.review-widget-stars {
    color: #F59E0B;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.review-date {
    color: var(--text-sub);
    font-size: 0.85rem;
}

.review-widget-text {
    color: var(--text-main);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

.reviews-widget-footer {
    text-align: center;
}

.reviews-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--cta-solid);
    font-weight: 600;
    font-size: 1.05rem;
    padding: 12px 24px;
    background: white;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.reviews-view-all:hover {
    background: var(--cta-solid);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Placeholder shimmer effect for loading state */
.placeholder-shimmer::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(64, 224, 208, 0.1), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Responsive adjustments for reviews widget */
@media (max-width: 768px) {
    .reviews-widget-section {
        padding: 40px 0;
    }
    
    .reviews-widget-header h2 {
        font-size: 1.8rem;
    }
    
    .reviews-widget-rating {
        flex-direction: column;
        gap: 10px;
    }
    
    .reviews-widget-carousel {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

