/* ==========================================================================
   Cardona's Pool Service - Modern Design System & CSS Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-dark: #070d18;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-card-hover: rgba(24, 37, 66, 0.85);
    --primary-cyan: #00f2fe;
    --primary-blue: #4facfe;
    --accent-teal: #00d2ff;
    --accent-blue: #0072ff;
    --text-white: #ffffff;
    --text-muted: #94a3b8;
    --text-dark: #0f172a;
    --border-glow: rgba(0, 242, 254, 0.25);
    --border-light: rgba(255, 255, 255, 0.1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --shadow-glow: 0 0 25px rgba(0, 242, 254, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: 'Inter', sans-serif;
    color: var(--text-white);
    background-color: var(--bg-dark);
}

body {
    overflow-x: hidden;
    line-height: 1.6;
    background: radial-gradient(circle at 50% 0%, #0c1e38 0%, #070d18 70%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Containers & Buttons */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-cyan) 0%, var(--accent-blue) 100%);
    color: #070d18;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(0, 242, 254, 0.6);
    filter: brightness(1.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-cyan);
    color: var(--primary-cyan);
}

.btn-outline:hover {
    background: rgba(0, 242, 254, 0.15);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.875rem;
}

/* Glassmorphism Card Utility */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Navbar */
.top-bar {
    background: rgba(7, 13, 24, 0.9);
    border-bottom: 1px solid var(--border-light);
    padding: 8px 0;
    font-size: 0.875rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-info {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
}

.top-bar-info a:hover {
    color: var(--primary-cyan);
}

/* Language Switcher Control */
.lang-switcher {
    display: inline-flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 3px;
}

.lang-btn {
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--primary-cyan);
    color: var(--text-dark);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.4);
}

.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(7, 13, 24, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-glow);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
}

.logo-brand img {
    height: 48px;
    width: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary-cyan);
}

.logo-highlight {
    color: var(--primary-cyan);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 1rem;
    color: #cbd5e1;
    position: relative;
    padding: 4px 0;
}

.nav-links a.active, .nav-links a:hover {
    color: var(--primary-cyan);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary-cyan);
    transition: var(--transition);
}

.nav-links a.active::after, .nav-links a:hover::after {
    width: 100%;
}

.nav-mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-white);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 100px 0 80px;
    background: linear-gradient(180deg, rgba(7, 13, 24, 0.4) 0%, rgba(7, 13, 24, 0.95) 100%),
                url('/static/images/hero.jpg') center/cover no-repeat;
    border-bottom: 1px solid var(--border-glow);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid var(--primary-cyan);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    color: var(--primary-cyan);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.text-gradient {
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Interactive Before & After Slider Component */
.ba-comparison-card {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 2px solid var(--border-glow);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.ba-slider-container {
    position: relative;
    width: 100%;
    height: 380px;
    overflow: hidden;
    user-select: none;
}

.ba-img-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ba-img-before {
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: left;
    border-right: 3px solid var(--primary-cyan);
}

.ba-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--primary-cyan);
    cursor: ew-resize;
    z-index: 10;
    transform: translateX(-50%);
}

.ba-handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: var(--primary-cyan);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px var(--primary-cyan);
    font-size: 1.1rem;
}

.ba-label {
    position: absolute;
    bottom: 16px;
    padding: 4px 14px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 5;
}

.ba-label-before {
    left: 16px;
    color: #ff6b6b;
    border-left: 3px solid #ff6b6b;
}

.ba-label-after {
    right: 16px;
    color: var(--primary-cyan);
    border-right: 3px solid var(--primary-cyan);
}

/* Sections Global */
.section {
    padding: 90px 0;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 50px;
}

.section-subtitle {
    color: var(--primary-cyan);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.875rem;
    margin-bottom: 8px;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-description {
    color: var(--text-muted);
    font-size: 1.05rem;
}

/* About Us Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    padding: 20px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--primary-cyan);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 35px 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-glow);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 24px;
    border: 1px solid var(--border-glow);
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.service-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.service-list li i {
    color: var(--primary-cyan);
}

/* Weekly Pool Checklist Section */
.checklist-section {
    background: linear-gradient(180deg, rgba(7,13,24,0.8) 0%, rgba(15,23,42,0.95) 100%);
    border-top: 1px solid var(--border-glow);
    border-bottom: 1px solid var(--border-glow);
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.check-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.check-item:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--primary-cyan);
}

.check-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-cyan);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    font-weight: 800;
}

.check-content h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.check-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Gallery Section */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 22px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:hover {
    background: var(--primary-cyan);
    color: var(--text-dark);
    border-color: var(--primary-cyan);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(7,13,24,0.95) 0%, rgba(7,13,24,0.2) 60%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    font-size: 1.25rem;
    color: #ffffff;
}

.gallery-overlay p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.category-tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--primary-cyan);
    color: var(--text-dark);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    width: fit-content;
}

/* Contact & Quote Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-card-info {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary-cyan);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #cbd5e1;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.3);
}

/* Turnstile Center Wrapper */
.turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Admin Dashboard & Auth */
.auth-container {
    max-width: 480px;
    margin: 80px auto;
    padding: 40px;
    text-align: center;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
}

.otp-digit {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-cyan);
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-sm);
}

.dev-otp-banner {
    background: rgba(0, 242, 254, 0.15);
    border: 1px dashed var(--primary-cyan);
    padding: 12px;
    border-radius: var(--radius-sm);
    color: var(--primary-cyan);
    margin: 15px 0;
    font-weight: 600;
}

/* Footer */
.footer {
    background: #040811;
    border-top: 1px solid var(--border-light);
    padding: 60px 0 30px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

.footer-brand p {
    margin-top: 15px;
    max-width: 360px;
}

.footer-title {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--primary-cyan);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Lightbox Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(4, 8, 17, 0.92);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-body {
    position: relative;
    max-width: 900px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-glow);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .hero-grid, .about-grid, .contact-grid {
        grid-template-columns: 1fr;
    }
    .hero-title {
        font-size: 2.75rem;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .nav-mobile-toggle {
        display: block;
    }
    .ba-slider-container {
        height: 280px;
    }
    .hero {
        padding: 60px 0;
    }
    .hero-title {
        font-size: 2.2rem;
    }
}
