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

:root {
    --primary: #02073f;
    --primary-light: #0a1166;
    --secondary: #dbbb72;
    --secondary-light: #e6cf99;
    --accent: #dbbb72;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-dark: #333333;
    --text-muted: #666666;
    --border: #e2e8f0;
    --radius: 0.75rem;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Jost', sans-serif;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background: var(--primary);
    /* Blue background matching button palette */
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo span {
    color: var(--secondary);
}

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

.nav-links a {
    text-decoration: none;
    color: #f8fafc;
    /* Very light color for contrast on dark background */
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-light);
    /* Golden-ish or teal accent */
}

/* Dropdown */
.nav-links .has-dropdown {
    position: relative;
}

.nav-links .has-dropdown>span,
.nav-links .has-dropdown>a {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
}

.nav-links .has-dropdown>span {
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    user-select: none;
}

.nav-links .has-dropdown:hover>span {
    color: var(--secondary-light);
}

.nav-links .has-dropdown>span::after,
.nav-links .has-dropdown>a::after {
    content: '▾';
    font-size: 0.75rem;
    transition: transform 0.25s ease;
    display: inline-block;
}

.nav-links .has-dropdown:hover>span::after,
.nav-links .has-dropdown:hover>a::after {
    transform: rotate(180deg);
}

.nav-links .dropdown {
    position: absolute;
    top: 100%;
    /* flush against the parent — no gap */
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    min-width: 160px;
    list-style: none;
    padding: 0.5rem 0;
    z-index: 2000;
    /* Use visibility + opacity instead of display (allows transition AND keeps hover area) */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    /* padding-top bridges the visual gap between trigger and box */
    margin-top: 0.5rem;
}

/* Invisible bridge fills the space above the dropdown so hover never breaks */
.nav-links .dropdown::before {
    content: '';
    position: absolute;
    top: -0.6rem;
    left: 0;
    right: 0;
    height: 0.6rem;
}

.nav-links .has-dropdown:hover .dropdown {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.nav-links .dropdown li a {
    display: block;
    padding: 0.6rem 1.25rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: var(--transition);
    text-decoration: none;
}

.nav-links .dropdown li a:hover {
    background: #eff6ff;
    color: var(--primary);
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
    padding: 5rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

/* Hero2 */
.hero2 {
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdfa 100%);
    padding: 1rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero2 h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero2 p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
}


/* Main Grid Layout */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-bottom: 5rem;
}

/* Sidebar Menu */
.sidebar {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #eff6ff;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 0.5rem;
}

.sidebar ul li a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    background: #eff6ff;
    color: var(--primary);
}

/* Form Container */
.content-area {
    background: #ffffff;
    padding: 3rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-header {
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1.5rem;
}

.form-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.form-section {
    margin-bottom: 3rem;
}

.form-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    background: #f8fafc;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    transition: var(--transition);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Pricing Card (Floating/Sidebar) */
.order-summary {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 320px;
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    z-index: 900;
}

.order-summary h4 {
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.total-price {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Checkboxes & Extra Services */
.extra-services {
    display: grid;
    gap: 1rem;
}

.service-option {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border: 1.5px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.service-option:hover {
    border-color: var(--secondary-light);
    background: #f0fdfa;
}

.service-option input {
    width: auto;
    margin-top: 0.3rem;
}

.service-info strong {
    display: block;
    color: var(--text-dark);
}

.service-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.service-price {
    margin-left: auto;
    font-weight: 700;
    color: var(--secondary);
}

/* Legal Text */
.legal-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--accent);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
}

.btn-submit {
    width: 100%;
    background: var(--accent);
    color: var(--text-dark);
    font-size: 1.1rem;
}

.btn-submit:hover {
    background: #d97706;
}

/* Responsive */
/* --- Responsive & Utilities (Already handled above) --- */

/* --- Root Styles Compatibility (Merged from root styles.css) --- */
.section-title {
    text-align: center;
    margin: 4rem 0 3rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

.card .icon {
    width: 50px;
    height: 50px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-size: 1.5rem;
}

.form-container {
    max-width: 800px;
    margin: 4rem auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

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

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .main-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
        width: 100%;
        margin-top: 2rem;
    }
}

/* ============================================================
   CHECKBOX & RADIO ALIGNMENT FIX
   ============================================================ */

/* All inline label+input combos (radio/checkbox inside a label) */
label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Reset width override only for inline controls */
label input[type="checkbox"],
label input[type="radio"] {
    width: auto !important;
    min-width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
    vertical-align: middle;
}

/* Radio/checkbox group containers */
.radio-group,
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.radio-group label,
.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    cursor: pointer;
}

/* Officers/Directors inline checkbox grid */
.titles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.titles-grid label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    font-size: 0.85rem;
}

/* ============================================================
   STICKY HEADER — SCROLL OFFSET (prevents errors being hidden)
   ============================================================ */
html {
    scroll-padding-top: 90px;
    /* matches header height */
}

/* Scroll anchor offset for form sections */
.form-section,
.form-group {
    scroll-margin-top: 90px;
}

/* ============================================================
   REAL-TIME VALIDATION STYLES
   ============================================================ */

/* Error state */
input.field-error,
select.field-error,
textarea.field-error {
    border-color: #dc2626 !important;
    background-color: #fff5f5;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Success / valid state */
input.field-valid,
select.field-valid,
textarea.field-valid {
    border-color: #16a34a !important;
    background-color: #f0fdf4;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1);
}

/* Error message text */
.field-error-msg {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: #dc2626;
    animation: errorFadeIn 0.2s ease-out;
}

@keyframes errorFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation icon inside the input (right side padding when icon present) */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    padding-right: 2.5rem;
}

.input-wrapper .validation-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    transition: var(--transition);
}

/* Submit button disabled state */
.btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

/* Disclaimer / Terms checkbox wrapper */
.terms-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
}

.terms-checkbox-wrapper input[type="checkbox"] {
    width: auto !important;
    min-width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
    accent-color: var(--primary);
}