:root {
    /* Brand Colors from styleguide.png */
    --primary: #1E4E66;
    --accent: #E58E26;
    --background: #FFFFFF;
    --text-primary: #1E4E66;
    --link-color: #1E4E66;

    /* Typography */
    --font-body: 'Roboto', 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    --font-heading: 'Roboto', 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;

    /* Font Sizes */
    --font-size-h1: 64px;
    --font-size-h2: 55px;
    --font-size-body: 16px;

    /* Spacing - Base Unit: 4 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-2xl: 64px;
    --spacing-3xl: 96px;

    /* Border Radius */
    --radius: 3px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

    /* Grid Background */
    --grid-color: rgba(30, 78, 102, 0.03);
}

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

body {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(40px, 5vw, 64px);
}

h2 {
    font-size: clamp(32px, 4vw, 55px);
}

h3 {
    font-size: clamp(24px, 3vw, 32px);
}

p {
    margin-bottom: var(--spacing-sm);
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent);
}

/* ============================================
   Grid Background Pattern (minimal style)
   ============================================ */
.grid-background {
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

/* ============================================
   Navigation Bar (minimal-inspired)
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #FFFFFF;

    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    list-style: none;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    position: relative;
    padding: var(--spacing-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-phone {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-phone:hover {
    background: #163d52;
    transform: translateY(-1px);
    color: #FFFFFF;
}

.nav-phone svg {
    flex-shrink: 0;
}

.nav-phone-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: var(--radius);
    text-decoration: none;
    margin-bottom: var(--spacing-md);
    transition: all 0.3s ease;
}

.nav-phone-mobile:hover {
    background: #163d52;
    color: #FFFFFF;
}

.nav-phone-mobile svg {
    flex-shrink: 0;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #d07d1f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 142, 38, 0.3);
    color: #FFFFFF;
}

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

.btn-secondary:hover {
    background: var(--text-primary);
    color: #FFFFFF;
}

.btn-white {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid #FFFFFF;
}

.btn-white:hover {
    background: #FFFFFF;
    color: var(--text-primary);
}

.btn-large {
    padding: 18px 40px;
    font-size: 16px;
}

.cta-button {
    display: inline-block;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: var(--accent);
    color: #FFFFFF;
    text-decoration: none;
}

.cta-button:hover {
    background: #d07d1f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 142, 38, 0.3);
    color: #FFFFFF;
}

/* ============================================
   Hero Section (minimal-style)
   ============================================ */
.hero {
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
    background: var(--background);
    position: relative;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(30, 78, 102, 0.45),
        rgba(30, 78, 102, 0.65)
    );
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(48px, 6vw, 72px);
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    color: #FFFFFF;
}

.hero-subtitle {
    font-size: clamp(18px, 2vw, 24px);
    color: #E5E7EB;
    margin-bottom: var(--spacing-xl);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

/* Mobile optimizations for video */
@media (max-width: 768px) {
    .hero {
        min-height: 500px;
    }
    
    .hero-video {
        /* On mobile, prioritize width coverage */
        min-width: 100%;
        width: 100%;
        height: auto;
    }
}

/* ============================================
   Services Hero Section with Background Image
   ============================================ */
.services-hero {
    position: relative;
    overflow: hidden;
}

.services-hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.services-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(30, 78, 102, 0.6),
        rgba(30, 78, 102, 0.7)
    );
    z-index: 1;
}

/* Mobile optimizations for services hero */
@media (max-width: 768px) {
    .services-hero-background {
        background-position: center center;
    }
}

/* ============================================
   Card Components (Grid-based, minimal style)
   ============================================ */
.card {
    background: #FFFFFF;
    border: 1px solid rgba(30, 78, 102, 0.1);
    border-radius: var(--radius);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: rgba(229, 142, 38, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
}

.card-description {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
}

/* ============================================
   Grid Layouts
   ============================================ */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 100%;
}

@media (min-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Container & Sections
   ============================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-3xl) 0;
}

.section-small {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: clamp(36px, 4vw, 48px);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: clamp(16px, 2vw, 20px);
    color: #6B7280;
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   Feature Boxes (minimal-style)
   ============================================ */
.feature-box {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: #FFFFFF;
    border: 1px solid rgba(30, 78, 102, 0.1);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.feature-box:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(30, 78, 102, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-content h3 {
    font-size: 18px;
    margin-bottom: var(--spacing-xs);
}

.feature-content p {
    font-size: 14px;
    color: #6B7280;
    margin: 0;
}

/* ============================================
   Footer (Light background as requested)
   ============================================ */
.footer {
    background: #F9FAFB;
    border-top: 1px solid rgba(30, 78, 102, 0.1);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-column h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: #6B7280;
    font-size: 14px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(30, 78, 102, 0.1);
    padding-top: var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    color: #6B7280;
    font-size: 14px;
}

.footer-bottom p {
    margin: 0;
}

.footer-logo {
    height: 60px;
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   FAQs Section (minimal-style)
   ============================================ */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(30, 78, 102, 0.1);
    padding: var(--spacing-lg) 0;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-answer {
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    color: #6B7280;
    line-height: 1.7;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-icon {
    font-size: 24px;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* ============================================
   Banner/Highlight Section
   ============================================ */
.banner {
    background: var(--primary);
    color: #FFFFFF;
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: center;
    font-size: 16px;
}

.banner a {
    color: var(--accent);
    text-decoration: underline;
}

/* ============================================
   Input Fields & Forms
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 10px 10px !important;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius);
    font-size: 16px !important;
    font-family: var(--font-body);
    transition: all 0.3s ease;
}

select {
    padding: 10px 10px !important;
    font-size: 16px !important;
}

textarea {
    padding: 10px !important;
    font-size: 16px !important;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(229, 142, 38, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    color: var(--text-primary);
}

.mobile-menu-button svg {
    stroke: var(--text-primary);
    width: 24px;
    height: 24px;
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 82px;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-bottom: 1px solid rgba(30, 78, 102, 0.1);
    padding: var(--spacing-md);
    padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom, 24px) + 24px);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    max-height: calc(100dvh - 82px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    display: block !important;
}

.mobile-menu .nav-links {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu .nav-link {
    padding: 8px 0;
    display: block;
    width: 100%;
}

@media (max-width: 1024px) {
    .mobile-menu-button {
        display: block;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }
}

/* ============================================
   Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #FFFFFF;
    padding: var(--spacing-xl);
    border-radius: var(--radius);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.modal-logo {
    height: 60px;
    margin-right: 20px;
}

/* Mobile modal optimizations */
@media (max-width: 480px) {
    .modal-content {
        padding: 24px 16px;
        width: 95%;
    }

    .modal-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .modal-logo {
        height: 40px;
        margin-right: 0;
        margin-bottom: 8px;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-modal {
    color: #9CA3AF;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--text-primary);
}

/* ============================================
   SVG Icons - Fix for Tailwind icon sizing
   ============================================ */
svg.w-6 {
    width: 24px !important;
}

svg.h-6 {
    height: 24px !important;
}

/* Ensure icons in lists/cards maintain proper size */
ul svg,
li svg,
.flex svg {
    flex-shrink: 0;
}

/* Contact page icon containers - fix oversized icons */
.w-12 {
    width: 3rem !important;
}

.h-12 {
    height: 3rem !important;
}

/* Make sure icons inside containers are properly centered and sized */
.flex-shrink-0 svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Specific fix for checkmark icons in lists */
ul li svg,
.space-y-3 svg,
.space-y-6 svg {
    width: 1.25rem !important;
    height: 1.25rem !important;
    min-width: 1.25rem;
    min-height: 1.25rem;
}

/* Additional Tailwind compatibility classes */
.rounded-lg {
    border-radius: 0.5rem;
}

.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Grid system compatibility */
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gap-8 {
    gap: 2rem;
}

.gap-12 {
    gap: 3rem;
}

.gap-16 {
    gap: 4rem;
}

/* Border and color utilities */
.border-t-4 {
    border-top-width: 4px;
}

.border-accent {
    border-color: var(--accent) !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

.bg-accent {
    background-color: var(--accent) !important;
}

/* Overflow utilities */
.overflow-hidden {
    overflow: hidden;
}

/* Flexbox utilities */
.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.justify-center {
    justify-content: center;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

/* Margin and padding utilities */
.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mr-4 {
    margin-right: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-8 {
    margin-top: 2rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

/* Font utilities */
.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* Text size utilities */
.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

/* Hover utilities */
.hover\:underline:hover {
    text-decoration: underline;
}

.hover\:bg-primary:hover {
    background-color: var(--primary) !important;
}

.hover\:text-white:hover {
    color: #FFFFFF !important;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.p-xl { padding: var(--spacing-xl); }

.text-accent {
    color: var(--accent);
}

.text-primary {
    color: var(--text-primary);
}

.text-muted {
    color: #6B7280;
}

.bg-light {
    background: #F9FAFB;
}

.bg-white {
    background: #FFFFFF;
}

/* ============================================
   Responsive Typography and Grid
   ============================================ */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 40px;
        --font-size-h2: 32px;
    }

    .section {
        padding: var(--spacing-2xl) 0;
    }

    /* Mobile grid overrides */
    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .lg\:grid-cols-2,
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .nav,
    .footer,
    .btn,
    .modal {
        display: none;
    }
}
