/* --- ROOT VARIABLES --- */
:root {
    --primary-navy: #0a2540;
    --pool-blue: #00a3e0;
    --action-gold: #ffb400;
    --text-dark: #333333;
}

/* --- GLOBAL STYLES --- */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background-image: url('pictures/water-bg.png');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

.site-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background-color: white;
    box-shadow: 0 0 50px rgba(0,0,0,0.3);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- HEADER & NAVIGATION (FIXED FOR OVERLAP) --- */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4%; /* Slightly reduced side padding */
    background: white;
    border-bottom: 2px solid #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-img { 
    height: 110px; /* Base height */
    width: auto; 
    transition: all 0.3s ease; 
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-tabs {
    display: flex;
    list-style: none;
    gap: 20px; /* Balanced spacing */
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-tabs a {
    text-decoration: none;
    color: var(--primary-navy);
    font-weight: bold;
    transition: 0.3s;
    white-space: nowrap; /* Forces text to stay on one line */
    font-size: 0.95rem;
}

.nav-tabs a:hover { color: var(--pool-blue); }
.nav-tabs a.active { color: var(--pool-blue); border-bottom: 2px solid var(--pool-blue); }

.quote-tab {
    background-color: var(--action-gold) !important;
    padding: 10px 18px !important;
    border-radius: 5px;
    color: var(--primary-navy) !important;
    white-space: nowrap; /* Prevents the gold box from breaking */
}

/* --- HERO & SECTIONS --- */
.hero {
    padding: 60px 5%;
    background: #0a2540; 
    color: white;
    text-align: center;
}

.hero h1 { font-size: 2.5rem; margin: 0; color: white; }
.hero p { font-size: 1.1rem; opacity: 0.9; }

.section-padding { padding: 60px 5%; text-align: center; }

/* --- GRID & CARDS --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.card {
    padding: 40px;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: 0.3s;
    background-color: white;
}

.card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
}

/* --- HOME PAGE SERVICE CARDS --- */
.pools-card {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('pictures/pool-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white !important;
}

.hottub-card {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('pictures/hottub-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white !important;
}

.card h3 { color: var(--pool-blue); }
.pools-card h3, .hottub-card h3 { color: white !important; }

/* --- SLIDER (POOLS PAGE) --- */
.slider-container {
    position: relative;
    overflow: hidden;
    padding: 0 !important; 
    background-color: #000; 
}

.slider-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-img {
    min-width: 100%;
    height: 350px; 
    object-fit: cover; 
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(10, 37, 64, 0.5); 
    color: white;
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 1.5rem;
    transition: 0.3s;
    z-index: 10;
}

.slider-arrow:hover { background: rgba(0, 163, 224, 0.8); }
.prev { left: 0; border-radius: 0 5px 5px 0; }
.next { right: 0; border-radius: 5px 0 0 5px; }

/* --- FORMS & QUOTE PAGE --- */
form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 10px;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    margin: 10px 0 20px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

.custom-captcha {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f9f9f9;
    border: 1px solid #d3d3d3;
    border-radius: 3px;
    padding: 15px 12px;
    margin-bottom: 25px;
    max-width: 300px; 
}

/* --- BIOGUARD IMAGE SIZING --- */
.bioguard-image {
    flex: 0 0 200px !important; 
    text-align: center;
}

.bioguard-image img {
    width: 200px !important;
    max-width: 200px !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

/* --- VIRTUAL TOUR (ABOUT PAGE) --- */
.virtual-tour-container {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 5px solid white;
}

/* --- FOOTER --- */
footer {
    background: #0a2540;
    color: white;
    padding: 60px 5% 40px;
    margin-top: auto;
}

.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    text-align: left;
}

.footer-col h4 {
    color: var(--pool-blue);
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-col p { margin: 10px 0; font-size: 0.95rem; line-height: 1.6; }
.footer-col i { width: 25px; color: var(--action-gold); }
.footer-link { color: white; text-decoration: none; transition: 0.3s; }
.footer-link:hover { color: var(--pool-blue); text-decoration: underline; }

.social-links { display: flex; gap: 15px; margin-top: 15px; }
.social-icon { color: white; font-size: 1.5rem; transition: 0.3s; }
.social-icon:hover { color: var(--pool-blue); }

/* --- RESPONSIVE MEDIA QUERIES (REVISED) --- */

/* 1. TABLET FIX: Shrink logo and text size before it overlaps */
@media (max-width: 1150px) {
    .logo-img { height: 70px; }
    .nav-tabs { gap: 12px; }
    .nav-tabs a { font-size: 0.85rem; }
}

/* 2. MOBILE FIX: Switch to stacked layout */
@media (max-width: 920px) {
    .header-container { flex-direction: column; padding: 15px; }
    .logo-img { height: 80px; margin-bottom: 10px; } 
    .nav-tabs { flex-wrap: wrap; justify-content: center; gap: 10px 15px; }
}

/* 3. SMALL MOBILE: Adjust footer and hero */
@media (max-width: 768px) {
    .hero h1 { font-size: 1.8rem; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-col { border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 30px; }
    .bioguard-flex { flex-direction: column; }
    .bioguard-image img { width: 150px !important; }
}