@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

:root {
    --navy: #0a2e41;
    --navy-light: #134b66; 
    --cyan: #00b4d8;
    --cyan-hover: #0096c7;
    --white: #ffffff;
    
    --action: #f97316;       /* Burnt Orange */
    --action-hover: #ea580c;
    --success: #16a34a;      /* Green */
    --danger: #ef4444;       /* Red */

    --bg-body: #f8fafc;      /* Light Grey/Blue Tint */
    --text-main: #1e293b;    /* Dark Slate */
    --text-muted: #64748b;   /* Soft Grey */
    --border: #cbd5e1;
    --input-bg: #ffffff;

    --radius: 12px;
    --card-padding: 35px;
    
    --shadow-soft: 0 4px 20px -2px rgba(10, 46, 65, 0.08); 
    --shadow-hover: 0 20px 40px -5px rgba(10, 46, 65, 0.12);
    --shadow-inset: inset 0 2px 4px rgba(0,0,0,0.06);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html { 
    scroll-behavior: smooth; 
    font-size: 16px; 
}

body {
    width: 100%; 
    overflow-x: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--navy);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.5rem; }

p { 
    margin-bottom: 1.5rem; 
    font-weight: 400; 
    color: var(--text-muted); 
}

a { 
    text-decoration: none; 
    transition: all 0.2s ease-in-out; 
    color: inherit;
}

img, svg { 
    display: block; 
    max-width: 100%; 
    height: auto; 
}

ul { list-style: none; }

.container { 
    max-width: 1240px; 
    margin: 0 auto; 
    padding: 0 25px; 
    width: 100%; 
}

nav {
    height: 90px;
    background: rgba(10, 46, 65, 0.98); 
    backdrop-filter: blur(12px);        
    -webkit-backdrop-filter: blur(12px);
    width: 100%;
    position: sticky; 
    top: 0; 
    z-index: 9999;
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    box-shadow: 0 4px 30px rgba(0,0,0,0.2); 
}

.nav-container {
    max-width: 1240px; 
    margin: 0 auto; 
    padding: 0 25px;
    height: 100%; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

.logo img { 
    max-height: 55px; 
    width: auto; 
    object-fit: contain; 
}

/* Desktop Menu Links */
.desktop-menu { 
    display: flex; 
    gap: 35px; 
    align-items: center; 
}

.desktop-menu a {
    color: rgba(255,255,255,0.85) !important; 
    font-size: 0.9rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    padding: 10px 0;
    position: relative;
}

.desktop-menu a:not(.btn):hover { 
    color: var(--cyan) !important; 
}

.desktop-menu a.active { 
    color: white !important; 
}

/* Active underline animation */
.desktop-menu a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cyan);
}

.btn {
    display: inline-flex; 
    justify-content: center; 
    align-items: center;
    background: linear-gradient(135deg, var(--cyan) 0%, #0096c7 100%);
    color: white !important;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700; 
    font-size: 0.95rem; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none; 
    cursor: pointer;
    position: relative;
    overflow: hidden; /* Essential for sheen effect */
}

/* Button Hover State */
.btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 25px rgba(0, 180, 216, 0.5); 
}

/* Button Sheen Animation (The Premium Shine) */
.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.4) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
}

.btn:hover::after {
    left: 200%;
    transition: all 0.6s ease;
}

/* Orange Action Variant */
.btn.action {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.4) !important;
}
.btn.action:hover {
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.6) !important;
}

/* Transparent Outline Variant */
.btn.outline {
    background: transparent !important;
    border: 2px solid white !important;
    box-shadow: none !important;
    color: white !important;
}
.btn.outline:hover {
    background: white !important;
    color: var(--navy) !important;
}

.hero {
    background-color: var(--navy);
    /* Complex Gradient Stack for Water Depth Effect */
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 180, 216, 0.25) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(0, 180, 216, 0.15) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(10, 46, 65, 1) 0px, transparent 80%);
    padding: 140px 0 180px; 
    text-align: center; 
    color: white !important;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

/* Central Glow */
.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, transparent 60%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* High Contrast Text Enforcers (FIXED) */
.hero h1, .hero h2, .hero h3 { 
    color: #ffffff !important; 
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hero p { 
    color: #e0f2fe !important; 
    font-size: 1.25rem; 
    max-width: 700px; 
    margin: 0 auto 35px; 
}

.grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px; 
    margin: 60px 0 100px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: var(--card-padding);
    box-shadow: var(--shadow-soft);
    display: flex; 
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
}

/* Hover Lift Effect */
.card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 180, 216, 0.3);
}

.card i { 
    font-size: 2.8rem; 
    margin-bottom: 25px; 
    display: block; 
    /* Gradient Icon */
    background: -webkit-linear-gradient(45deg, var(--cyan), var(--navy));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--navy); /* Fallback */
}

.card h3 { 
    font-size: 1.5rem; 
    margin-bottom: 15px; 
    color: var(--navy); 
}

/* Horizontal Card Override (e.g., Meet Josh) */
.card-horizontal {
    flex-direction: row !important;
    align-items: center;
    flex-wrap: wrap;
    background: linear-gradient(to right, #ffffff, #f8fafc);
}

/* Emergency Card Override */
.card.emergency {
    border-top: 5px solid var(--danger);
}
.card.emergency h3 { color: var(--danger); }

.filter-bar {
    display: flex; 
    flex-wrap: wrap; 
    gap: 20px;
    background: white; 
    padding: 30px; 
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft); 
    margin-bottom: 50px;
    border: 1px solid var(--border);
}

.filter-group { 
    display: flex; 
    flex-direction: column; 
    min-width: 200px; 
}

.filter-group label { 
    font-weight: 700; 
    font-size: 0.8rem; 
    margin-bottom: 8px; 
    color: var(--navy); 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}

.product-stack { 
    display: flex; 
    flex-direction: column; 
    gap: 25px; 
    padding-bottom: 80px; 
}

/* The Horizontal Product Card */
.product-row, .product-card {
    display: grid;
    grid-template-columns: 220px 1fr 180px; /* Logo | Info | Button */
    gap: 0;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    border-left: 6px solid var(--navy); /* Navy Accent Line */
}

.product-row:hover, .product-card:hover {
    transform: translateX(8px); 
    box-shadow: var(--shadow-hover);
    border-left-color: var(--cyan);
}

/* Left: Visual Column */
.prod-visual, .brand-pill {
    background: #f8fafc;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center;
    padding: 35px;
    border-right: 1px solid var(--border);
}

/* Overrides for Script.js generated .brand-pill */
.product-card .brand-pill {
    width: 100%; 
    height: 100%; 
    border-right: 1px solid var(--border); 
    margin: 0;
    grid-column: 1; 
    grid-row: 1 / span 3;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 1.3rem; 
    font-weight: 800; 
    color: var(--navy);
    background: #f8fafc;
}

/* Middle: Info Column */
.prod-info, .product-name {
    padding: 35px;
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

/* Overrides for Script.js generated .product-name */
.product-card .product-name {
    grid-column: 2; 
    grid-row: 1;
    font-size: 1.4rem; 
    font-weight: 800; 
    color: var(--navy); 
    margin-bottom: 5px;
    padding: 30px 30px 5px 30px;
}

.prod-info h3 { margin-bottom: 8px; font-size: 1.5rem; }
.prod-info p { margin-bottom: 0; color: #475569; }

/* Specs List (Generated by JS) */
.specs-list {
    grid-column: 2; 
    grid-row: 2;
    padding: 0 30px 30px 30px;
    display: flex; 
    gap: 10px; 
    flex-wrap: wrap; 
    list-style: none;
}

.specs-list li {
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--navy);
    background: #e0f2fe; 
    padding: 6px 12px; 
    border-radius: 6px;
}

/* Right: Action Column */
.prod-action {
    padding: 20px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-left: 1px solid var(--border);
    background: #ffffff;
}

/* FIXED: Button Styling specific to Product Card */
.product-card .btn {
    grid-column: 3; 
    grid-row: 1 / span 3;
    width: auto; 
    height: 50px; 
    margin: auto;
    /* Re-apply gradient explicitly to avoid inheritance issues */
    background: linear-gradient(135deg, var(--cyan) 0%, #0096c7 100%) !important;
    color: white !important;
    opacity: 1 !important;
}

.price:empty { display: none; }

/* --- HARD CODED LOGOS --- */
.svg-logo { height: 35px; width: auto; margin-bottom: 15px; }
.logo-davey { font-family: sans-serif; font-weight: 900; font-style: italic; font-size: 2rem; color: #000; margin-bottom: 15px; letter-spacing: -1px; }
.logo-reltech { font-family: sans-serif; font-weight: 800; font-size: 1.8rem; letter-spacing: 3px; color: #333; margin-bottom: 15px; }

.review-bubble {
    background: white;
    padding: 40px;
    border-radius: 20px;
    border-bottom-left-radius: 2px; /* The "Speech" tail anchor */
    box-shadow: var(--shadow-soft);
    position: relative;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.review-bubble:hover { transform: translateY(-5px); }

/* The Giant Quote Mark */
.review-bubble::after {
    content: '“';
    position: absolute;
    top: 10px; 
    right: 30px;
    font-size: 6rem;
    color: #f1f5f9;
    font-family: serif;
    line-height: 0;
}

.review-stars { color: #fbbf24; margin-bottom: 15px; font-size: 1.1rem; }
.review-text { font-style: italic; font-size: 1.1rem; color: var(--text-dark); position: relative; z-index: 2; }
.review-author { 
    margin-top: 25px; 
    font-weight: 700; 
    color: var(--navy); 
    display: flex; 
    align-items: center; 
    gap: 12px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.verified-badge {
    background: #dcfce7; 
    color: #16a34a; 
    font-size: 0.7rem; 
    padding: 4px 8px; 
    border-radius: 50px; 
    text-transform: uppercase;
    font-weight: 800;
}

.calc-wrapper { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px; 
    margin-top: 50px; 
}

.calc-card { 
    background: white; 
    padding: 30px; 
    border-radius: var(--radius); 
    box-shadow: var(--shadow-soft); 
    border: 1px solid var(--border); 
}

.calc-card h4 { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
    color: var(--navy); 
    font-size: 1.1rem; 
    margin-bottom: 20px; 
}

input, select, textarea {
    width: 100%; 
    padding: 16px;
    background: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px; 
    font-size: 1rem; 
    color: var(--navy); 
    font-weight: 600;
    margin-bottom: 15px;
    transition: 0.2s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none; 
    border-color: var(--cyan); 
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 180, 216, 0.15);
}

/* RESULT BOX - FORCE NAVY & WHITE TEXT */
.result-box {
    margin-top: 15px; 
    padding: 20px;
    background-color: var(--navy) !important;
    color: #ffffff !important;
    border-radius: 8px; 
    font-weight: 700; 
    text-align: center;
    min-height: 70px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-direction: column;
}

/* Override any inline styles for text inside results */
.result-box * { color: #ffffff !important; }

.contact-wrapper {
    display: flex; 
    flex-wrap: wrap; 
    background: white; 
    border-radius: var(--radius); 
    overflow: hidden; 
    box-shadow: var(--shadow-soft); 
    margin-top: 50px; 
    border: 1px solid var(--border);
}

.contact-info { 
    background: var(--navy); 
    padding: 60px; 
    color: white; 
    flex: 1; 
    min-width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info h3 { color: var(--cyan); margin-bottom: 25px; }
.contact-info p { color: rgba(255,255,255,0.85); font-size: 1.05rem; }

.contact-form { 
    padding: 60px; 
    flex: 1.5; 
    min-width: 350px; 
    background: white; 
}

.contact-form h3 { color: var(--navy); font-size: 1.8rem; margin-bottom: 30px; }

label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 700; 
    color: var(--navy); 
    font-size: 0.85rem; 
    text-transform: uppercase; 
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for grid items */
.product-row:nth-child(2), .card:nth-child(2), .calc-card:nth-child(2) { transition-delay: 0.1s; }
.product-row:nth-child(3), .card:nth-child(3), .calc-card:nth-child(3) { transition-delay: 0.2s; }
.product-row:nth-child(4), .card:nth-child(4), .calc-card:nth-child(4) { transition-delay: 0.3s; }

footer {
    background-color: var(--navy); 
    color: rgba(255,255,255,0.6);
    padding: 80px 0 100px; 
    text-align: center; 
    border-top: 4px solid var(--cyan);
}

.footer-links a { 
    color: white; 
    margin: 0 15px; 
    font-weight: 600; 
    font-size: 0.9rem; 
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--cyan); }

.mobile-action-bar {
    position: fixed; bottom: 0; left: 0; width: 100%;
    background: white; padding: 15px; display: flex; gap: 15px;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1); z-index: 9999;
}

.action-btn { 
    flex: 1; text-align: center; padding: 14px; border-radius: 8px; 
    font-weight: 800; text-decoration: none; text-transform: uppercase; font-size: 0.9rem;
}
.action-call { background: var(--navy); color: white; }
.action-quote { background: var(--cyan); color: white; }

.menu-toggle { display: none; font-size: 1.8rem; color: white; cursor: pointer; }
.mobile-menu { display: none; }

@media (max-width: 900px) {
    /* --- 1. PRODUCT CARDS STACK --- */
    .product-row, .product-card { 
        grid-template-columns: 1fr; 
        text-align: left; 
    }
    
    .prod-visual, .brand-pill { 
        border-bottom: 1px solid var(--border); 
        border-right: none; 
    }
    
    .product-card .brand-pill { grid-column: 1; grid-row: 1; margin-bottom: 0; }
    .product-card .product-name { grid-column: 1; grid-row: 2; padding: 25px; }
    .specs-list { grid-column: 1; grid-row: 3; margin: 0; padding: 0 25px 25px; }
    .product-card .btn { grid-column: 1; grid-row: 4; margin: 0 25px 25px; width: calc(100% - 50px); }
    
    .card-horizontal { flex-direction: column !important; }
    .contact-wrapper { flex-direction: column; }
    .contact-info, .contact-form { padding: 40px 25px; }
    
    .desktop-menu { display: none; }
    
    /* Bigger Touch Target for Open Button */
    .menu-toggle { 
        display: block; 
        padding: 10px; /* Makes the click area bigger */
        margin-right: -10px;
    }
    
    .mobile-menu {
        position: absolute; 
        top: 90px; 
        left: 0; 
        width: 100%;
        background: var(--navy); 
        flex-direction: column; 
        border-bottom: 4px solid var(--cyan);
        display: none; 
        box-shadow: 0 15px 40px rgba(0,0,0,0.4);
        z-index: 10000; /* Force on top of everything */
    }
    
    .mobile-menu.active { display: flex; }
    
    /* Massive clickable rows for pages */
    .mobile-menu a { 
        display: block; /* Makes the whole row clickable */
        width: 100%;
        padding: 20px 25px; /* Large tap area */
        color: white; 
        border-bottom: 1px solid rgba(255,255,255,0.1); 
        font-weight: 700; 
        font-size: 1.2rem; /* Slightly larger text */
        text-align: center; /* Easier to read on mobile */
    }
    
    /* Active state for mobile links */
    .mobile-menu a:active {
        background-color: var(--cyan);
        color: white;
    }
}

@media (min-width: 901px) { 
    .mobile-action-bar { display: none; } 
    footer { padding-bottom: 60px; } 
}