/* === CSS Variables for Easy Theming === */
:root {
    --bg-color: #f8fafc; /* Pristine off-white/light gray */
    --text-heading: #0d1435; /* Dark navy brand blue */
    --text-sub: #64748b; /* Sleek slate gray for readability */
    --accent-blue: #1e3a8a; /* Slate blue accent */
    --accent-light-blue: #3b82f6; /* Modern interactive blue */
    --btn-dark-bg: #0d1435;
    --btn-glow: rgba(13, 20, 53, 0.35);
    --btn-ghost-border: #0d1435;
    --accent-light: #e2e8f0;
    --accent-white: #ffffff;
    
    /* Footer Variables */
    --footer-bg: #1e293b; /* Slate 800 */
    --footer-text: #ffffff;
    --footer-text-muted: #d1d5db; /* Gray 300 for better contrast */
    
    /* Global Transitions & Styling */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --card-shadow: 0 10px 30px rgba(13, 20, 53, 0.04);
    --card-shadow-hover: 0 20px 40px rgba(13, 20, 53, 0.08);

    /* Typographic & Section Spacers */
    --spacer-lg: 7.5rem; /* 120px */
    --spacer-md: 6rem;   /* 96px */
    --spacer-sm: 4rem;   /* 64px */
}

/* === Base Reset === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-heading);
    overflow-x: hidden;
    line-height: 1.5;
}

/* === General Section Utilities === */
section {
    padding: var(--spacer-md) 5%;
    position: relative;
    width: 100%;
}

@media (max-width: 768px) {
    section {
        padding: var(--spacer-sm) 5%;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-heading);
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-sub);
    text-align: center;
    max-width: 750px;
    margin: 0 auto 4rem auto;
    line-height: 1.6;
}

/* === Navigation Bar === */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 100;
    transition: var(--transition-smooth);
}

/* Scrolled/Subpage state */
.navbar.scrolled, 
.navbar.subpage {
    position: fixed;
    background: rgba(248, 250, 252, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(13, 20, 53, 0.06);
    padding: 1rem 5%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-heading);
    font-weight: 800;
    font-size: 1.25rem;
    gap: 10px;
}

.nav-logo img {
    height: 35px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--accent-light); /* Lighter shade for visibility over video */
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    opacity: 0.85;
    position: relative;
    padding-bottom: 4px;
    text-transform: lowercase;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-light-blue);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-links a:hover, 
.nav-links a.active {
    color: #ffffff; /* Bright white on hover over video */
    opacity: 1;
}

/* Revert colors when scrolled or on subpages */
.navbar.scrolled .nav-links a,
.navbar.subpage .nav-links a {
    color: var(--text-heading);
}

.navbar.scrolled .nav-links a:hover, 
.navbar.scrolled .nav-links a.active,
.navbar.subpage .nav-links a:hover, 
.navbar.subpage .nav-links a.active {
    color: var(--accent-light-blue);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
}

.nav-links .nav-phone {
    margin-left: 1rem;
}

.nav-links .nav-phone a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 1;
    text-transform: none;
}

.nav-links .nav-phone a::after {
    display: none;
}

/* Hamburger button styling */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 110;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-heading);
    margin: 5px 0;
    transition: var(--transition-smooth);
}

/* Hamburger animation when active */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-color);
        box-shadow: -10px 0 30px rgba(13, 20, 53, 0.1);
        padding: 2rem;
        gap: 2rem;
        transition: var(--transition-smooth);
        z-index: 105;
    }
    
    .nav-links a {
        color: var(--text-heading);
    }
    
    .nav-links a:hover,
    .nav-links a.active {
        color: var(--accent-light-blue);
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
}

/* === Button Group === */
.btn-group {
    display: flex;
    gap: 1.25rem;
    justify-content: flex-start;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    .btn {
        width: 100%;
        display: block;
    }
}

.btn {
    display: inline-block;
    padding: 0.875rem 2.25rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition-smooth);
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--btn-dark-bg);
    color: #ffffff;
    border: 2px solid var(--btn-dark-bg);
    box-shadow: 0 4px 14px var(--btn-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 20, 53, 0.55);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-heading);
    border: 2px solid var(--btn-ghost-border);
}

.btn-ghost:hover {
    background-color: rgba(13, 20, 53, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 20, 53, 0.25);
}

/* === Common Subpage Banner (Standardized to match Hero) === */
.subpage-banner {
    position: relative;
    padding: 12rem 5% 7rem 10%; /* 10% left padding to match home page hero */
    background-color: var(--bg-color); /* Matches front page bg-color */
    color: var(--text-heading);
    text-align: left;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 45vh;
    border-bottom: 1px solid rgba(13, 20, 53, 0.04);
}

.subpage-banner-img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.subpage-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        var(--bg-color) 0%, 
        var(--bg-color) 22%, 
        rgba(248, 250, 252, 0) 48%, 
        rgba(248, 250, 252, 0) 55%, 
        var(--bg-color) 100%
    );
    z-index: 2;
    pointer-events: none;
}

.subpage-banner .container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 100%; /* Spans full width to align text to 10% padding */
}

.subpage-banner-content {
    max-width: 600px;
}

.subpage-banner h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--text-heading);
    line-height: 1.1;
}

.subpage-banner p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-sub);
    margin: 0;
    line-height: 1.6;
    text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.95), 0 1px 1px rgba(255, 255, 255, 0.95);
}

/* Responsive styles for banner */
@media (max-width: 991px) {
    .subpage-banner {
        padding: 10rem 5% 5rem 5%;
        min-height: auto;
    }
    .subpage-banner-img {
        width: 100%;
        opacity: 0.2; /* Fade image behind text on mobile */
    }
    .subpage-banner-overlay {
        background: linear-gradient(to top, var(--bg-color) 20%, rgba(248, 250, 252, 0.8) 100%);
    }
    .subpage-banner-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .subpage-banner {
        padding: 8rem 5% 4rem 5%;
    }
}

/* === Grid Layout System === */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 3rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 2rem;
}

/* === Unified Footer === */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 6rem 5% 2rem 5%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 3.5rem;
    max-width: 1200px;
    margin: 0 auto 4rem auto;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .footer-col:not(.footer-logo-col) {
        display: none;
    }
    footer {
        padding: 4rem 5% 2rem 5%;
    }
}

.footer-col h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
    font-size: 0.875rem;
}

.footer-col ul li a:hover {
    color: #ffffff;
    padding-left: 2px;
}

.footer-logo-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.footer-logo-col img {
    height: 38px;
    width: auto;
    align-self: flex-start;
}

.footer-logo-col p {
    color: var(--footer-text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-logo-col .contact-info {
    font-size: 0.875rem;
    color: var(--footer-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo-col .contact-info strong {
    color: #ffffff;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

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

.footer-bottom .footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom .footer-links a {
    color: var(--footer-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.footer-bottom .footer-links a:hover {
    color: #ffffff;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: var(--footer-text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: var(--accent-light-blue);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Scroll target offset for sticky navbar */
html {
    scroll-behavior: smooth;
}
.scroll-target {
    scroll-margin-top: 120px;
}
