body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

:root {
    /* Midnight Blue with exactly 78% transparency: rgba(25, 25, 112, 0.78) */
    --midnight-blue-78: rgba(25, 25, 112, 0.78);
    --midnight-dark: #000048;
    --accent-blue: #3b82f6;
}

.bg-midnight-trans { background-color: var(--midnight-blue-78); }
.backdrop-midnight { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }

/* Hero Video Background */
.hero-container {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 72, 0.5), rgba(25, 25, 112, 0.82));
    z-index: 2;
}

/* Segment Cards */
.segment-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    background: white;
}

.segment-card.active {
    border-color: var(--accent-blue);
    background-color: var(--midnight-blue-78);
    color: white !important;
    transform: translateY(-12px);
    box-shadow: 0 30px 60px -12px rgba(25, 25, 112, 0.4);
}

.segment-card.active p, .segment-card.active h3, .segment-card.active .material-symbols-outlined {
    color: white !important;
}

.segment-card.active .icon-box {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Results Display - allow tooltips to show */
.calc-display-box {
    min-width: 0;
    flex: 1 1 auto;
    overflow: visible;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calc-value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.calc-display-box h3 {
    color: var(--midnight-dark);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

#map {
    height: 500px;
    width: 100%;
    border-radius: 2.5rem;
    filter: grayscale(0.1) contrast(1.1);
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce-low {
    0%, 100% {
        transform: translateY(-18%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce-low {
    animation: bounce-low 1s infinite;
}

/* Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 2px; /* Narrower track */
    background: rgba(25, 25, 112, 0.15);
    border-radius: 1px;
    outline: none;
    margin: 0.5rem 0;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--accent-blue);
    cursor: pointer;
    border-radius: 50% 50% 0 50%;
    transform: rotate(45deg);
    box-shadow: 0 0 0 4px white, 2px 2px 4px rgba(0,0,0,0.2); /* Pin effect */
    margin-top: -9px;
    transition: transform 0.1s;
}

.stat-glow {
    text-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
}

/* Service List Styling */
.service-list li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.75rem;
}
.service-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: 800;
}

/* Google Places Autocomplete Styling */
.pac-container {
    background-color: rgba(25, 25, 112, 0.95) !important;
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 1rem !important;
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.4) !important;
    margin-top: 0.5rem !important;
    overflow: hidden;
}

.pac-item {
    background-color: transparent !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    padding: 1rem 1.25rem !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.pac-item:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.pac-item-selected {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

.pac-icon {
    background-image: none !important;
    width: 15px;
    height: 20px;
    margin-right: 0.75rem;
}

.pac-icon:before {
    content: "📍";
    font-size: 1rem;
}

.pac-matched {
    color: #60a5fa !important;
    font-weight: 600;
}

.pac-item-query {
    color: white !important;
    font-size: 1rem;
}

#address-input.pac-target-input {
    background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Hide number input spinners */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
  -webkit-appearance: none; 
  margin: 0; 
}
input[type=number] {
  -moz-appearance: textfield;
}

/* --- Common Components Optimization --- */

/* Navigation */
.nav-main {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.nav-default {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    border-color: #f1f5f9; /* slate-100 */
}

.nav-scrolled {
    background-color: var(--midnight-blue-78);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Nav Children (Descendant Selectors to avoid JS toggling) */
.nav-logo-text { transition: color 0.3s; }
.nav-default .nav-logo-text { color: #191970; }
.nav-scrolled .nav-logo-text { color: white; }

.nav-link { transition: color 0.3s; font-weight: 700; }
.nav-default .nav-link { color: #475569; } /* slate-600 */
.nav-default .nav-link:hover { color: #191970; }
.nav-scrolled .nav-link { color: #dbeafe; } /* blue-100 */
.nav-scrolled .nav-link:hover { color: white; }

.nav-btn { transition: all 0.3s; }
.nav-default .nav-btn { background-color: var(--midnight-blue-78); color: white; }
.nav-default .nav-btn:hover { background-color: #000048; }
.nav-scrolled .nav-btn { background-color: white; color: #191970; }
.nav-scrolled .nav-btn:hover { background-color: #eff6ff; } /* blue-50 */

.nav-mobile-btn { transition: color 0.3s; }
.nav-default .nav-mobile-btn { color: #191970; }
.nav-scrolled .nav-mobile-btn { color: white; }

/* Hero Section Standard */
.hero-section {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 5rem;
    overflow: hidden;
}
@media (min-width: 1024px) {
    .hero-section { padding-top: 12rem; padding-bottom: 8rem; }
}

/* Language Switcher Component */
.lang-switcher {
    display: flex;
    align-items: center;
    column-gap: 0.75rem;
    border-left: 1px solid #e2e8f0;
    padding-left: 1rem;
}

.lang-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    transition: color 0.3s ease;
    color: #94a3b8; /* slate-400 */
    cursor: pointer;
}

.lang-btn:hover {
    color: #3b82f6; /* blue-500 */
}

.lang-btn.active {
    color: #2563eb; /* blue-600 */
}

.lang-btn span {
    font-weight: 700;
    font-size: 0.875rem;
}

.lang-btn img {
    width: 1.5rem; /* w-6 */
    margin-top: 0.125rem;
    transition: all 0.3s ease;
}

.lang-btn[data-lang="en"] img {
    width: 1.75rem;
}

.lang-separator {
    color: #cbd5e1; /* slate-300 */
}

/* --- Common Utility Classes (Simplification) --- */

.btn-primary {
    background-color: #2563eb; /* blue-600 */
    color: white;
    padding: 1rem 2rem;
    border-radius: 1rem;
    font-weight: 900;
    transition: all 0.3s;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    background-color: #1d4ed8; /* blue-700 */
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.95);
}
