/*
 * Cumberland Auto Group - Core Stylesheet
 * Premium, bespoke vehicle brokerage design system
 * Features:
 *   - Dark (default) and Light theme styling
 *   - CSS variables for clean thematic scaling
 *   - Elegant typography: Lora/Playfair & Inter
 *   - Smooth transitions and micro-interactions
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Lora:ital,wght@0,400;0,500;0,600;1,400&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
    --nav-height: calc(100px + env(safe-area-inset-top, 0px));

    /* Premium Cumberland Island Forest Dark Theme (Default) */
    --bg-base: #0f1612;        /* Dark moss shadow */
    --bg-surface: #151e19;     /* Deep forest green-gray */
    --bg-card: #1c2721;        /* Rich slate-moss */
    
    --border-subtle: #25332b;  /* Low contrast border */
    --border-focus: #445c4f;   /* Highlight border */

    --text-primary: #f5f7f5;   /* Crisp off-white */
    --text-secondary: #a9b7ad; /* Soft sage text */
    --text-muted: #6e7f74;     /* Lichen green-gray */

    /* Accent & Brand Colors */
    --brand-moss: #2e3d34;     /* Cumberland Muted Moss Green */
    --brand-moss-rgb: 46, 61, 52;
    --brand-gold: #8ca094;     /* Muted Silver-Sage */
    --brand-gold-hover: #a2b5aa;
    --accent-platinum: #e3e8e5; /* Warm silver */
    --accent-text: #0f1612;    /* Dark contrasting text */

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Playfair Display', 'Lora', Georgia, serif;
    --font-mono: Courier, monospace;

    --border-radius-premium: 4px;
    --shadow-premium: 0 15px 35px rgba(0, 0, 0, 0.35);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.2);

    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.15s ease;
}

.light-theme {
    /* Premium Cumberland Alabaster Light Theme */
    --bg-base: #f7f9f6;        /* Light sand/cream */
    --bg-surface: #ffffff;     /* Plain white */
    --bg-card: #eff2ee;        /* Soft lichen cream */

    --border-subtle: #dbe2db;  /* Soft grey-green border */
    --border-focus: #8ba092;   /* Focus green-grey */

    --text-primary: #18221c;   /* Deep charcoal moss */
    --text-secondary: #4d5c52; /* Slate moss */
    --text-muted: #7b8c80;     /* Muted sage */

    --brand-gold: #495e52;     /* Muted Dark Sage for contrast */
    --brand-gold-hover: #394a40;
    --accent-platinum: #24352a; /* Dark green/slate */
    --accent-text: #ffffff;    /* Light text on dark accents */
    
    --shadow-premium: 0 15px 35px rgba(24, 34, 28, 0.08);
    --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Base resets & typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.hidden {
    display: none !important;
}

/* Premium Navigation Bar (DP Listings style) */
#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    padding-top: env(safe-area-inset-top, 0px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
    background-color: rgba(var(--brand-moss-rgb), 0.15);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

body.light-theme #main-nav {
    background-color: rgba(255, 255, 255, 0.8);
}

.nav-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--brand-gold);
    transition: var(--transition-fast);
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--brand-gold);
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2.25rem;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    height: 100px;
    line-height: 100px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--brand-gold);
}

.nav-item.active {
    color: var(--text-primary);
    border-bottom-color: var(--brand-gold);
}

/* Navbar Search */
.nav-search-container {
    position: relative;
    width: 280px;
}

@media (max-width: 1100px) {
    .nav-search-container {
        display: none;
    }
}

.nav-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-input-wrapper svg,
.nav-search-input-wrapper i {
    position: absolute;
    left: 0.85rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: var(--transition-fast);
}

.nav-search-input {
    width: 100%;
    background-color: rgba(var(--brand-moss-rgb), 0.1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    height: 42px;
    padding: 0 1rem 0 2.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    outline: none;
    transition: var(--transition-smooth);
}

.nav-search-input:focus {
    border-color: var(--brand-gold);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 2px rgba(197, 168, 128, 0.15);
}

.nav-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1100;
    box-shadow: var(--shadow-premium);
}

.nav-search-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.nav-search-item:hover {
    background-color: var(--bg-card);
    color: var(--brand-gold);
}

.search-badge {
    background-color: rgba(197, 168, 128, 0.12);
    border: 1px solid rgba(197, 168, 128, 0.3);
    padding: 0.15rem 0.45rem;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--brand-gold);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

.theme-btn:hover {
    background-color: var(--bg-card);
    color: var(--brand-gold);
    transform: rotate(15deg);
}

.theme-icon {
    width: 20px;
    height: 20px;
}

/* Premium Sourcing Trigger Button */
.nav-cta-btn {
    background-color: var(--brand-gold);
    color: var(--accent-text) !important;
    border: 1px solid var(--brand-gold);
    padding: 0.65rem 1.5rem;
    border-radius: var(--border-radius-premium);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.nav-cta-btn:hover {
    background-color: var(--brand-gold-hover);
    border-color: var(--brand-gold-hover);
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.25);
    transform: translateY(-1px);
}

.light-theme .nav-cta-btn {
    background-color: #24352a !important;
    color: #ffffff !important;
    border-color: #24352a;
}

.light-theme .nav-cta-btn:hover {
    background-color: #31493a !important;
    box-shadow: 0 4px 15px rgba(36, 53, 42, 0.2);
}

/* Mobile Menu Hamburger Trigger */
.mobile-nav-trigger {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.mobile-nav-trigger:hover {
    color: var(--brand-gold);
}

.mobile-menu-dropdown {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1001;
    padding: 1.5rem 2rem;
    box-shadow: var(--shadow-premium);
    animation: slideDown 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mobile-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
    transition: var(--transition-fast);
}

.mobile-link:hover, .mobile-link.active {
    color: var(--brand-gold);
    border-bottom-color: var(--border-subtle);
}

/* Page Layout Spacer */
main {
    margin-top: var(--nav-height);
    flex-grow: 1;
}

/* Hero Section (Plain Background) */
.hero-section {
    position: relative;
    padding: 8rem 0;
    display: flex;
    align-items: center;
    background-color: var(--bg-card);
    min-height: 50vh;
    border-bottom: 1px solid var(--border-subtle);
    overflow: hidden;
}

body.light-theme .hero-section {
    background-color: var(--bg-card);
    background-image: none;
}

.hero-content {
    max-width: 650px;
    z-index: 10;
}

.hero-subtitle {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--brand-gold);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    margin-bottom: 1.5rem;
    display: block;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.15;
}

.hero-title span {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--brand-gold);
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.hero-ctas {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.btn-primary {
    background-color: var(--brand-gold);
    color: var(--accent-text);
    padding: 1rem 2.25rem;
    border-radius: var(--border-radius-premium);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1px solid var(--brand-gold);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.15);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    background-color: var(--brand-gold-hover);
    border-color: var(--brand-gold-hover);
    box-shadow: 0 8px 25px rgba(197, 168, 128, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    padding: 1rem 2.25rem;
    border-radius: var(--border-radius-premium);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background-color: var(--bg-card);
    border-color: var(--border-focus);
}

/* Feature/Services section */
.services-section {
    padding: 8rem 0;
    border-bottom: 1px solid var(--border-subtle);
    background-color: var(--bg-surface);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 5rem auto;
}

.section-subtitle {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-gold);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    display: block;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-primary);
}

.section-title em {
    font-family: var(--font-serif);
    font-style: italic;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.service-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    padding: 3rem 2.5rem;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-gold);
    box-shadow: var(--shadow-premium);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--brand-gold);
    margin-bottom: 1.75rem;
}

.service-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Listings Showcase on Home Page */
.showcase-section {
    padding: 8rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

@media (max-width: 1024px) {
    .vehicles-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

@media (max-width: 650px) {
    .vehicles-grid {
        grid-template-columns: 1fr;
    }
}

.vehicle-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    overflow: hidden;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.vehicle-card:hover {
    transform: translateY(-6px);
    border-color: var(--brand-gold);
    box-shadow: var(--shadow-premium);
}

.vehicle-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 5:3 Aspect Ratio */
    overflow: hidden;
}

.vehicle-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vehicle-card:hover .vehicle-img {
    transform: scale(1.05);
}

.vehicle-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--brand-moss);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.75rem;
    border-radius: 2px;
}

.vehicle-status.available {
    background-color: var(--brand-moss);
}

.vehicle-status.on-the-way {
    background-color: #8fa095;
}

.vehicle-status.sourced {
    background-color: #4a5750;
}

/* Japanese JDM Import Highlights */
.vehicle-card.jdm-highlight {
    border: 2px solid var(--accent-sage, #8ca094);
    box-shadow: 0 4px 20px rgba(140, 160, 148, 0.15);
    background: linear-gradient(180deg, rgba(140, 160, 148, 0.08) 0%, var(--bg-card) 100%);
    position: relative;
}

.vehicle-card.jdm-highlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #bc002d 0%, #ffffff 50%, #bc002d 100%);
}

.jdm-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.35rem 0.75rem;
    border-radius: var(--border-radius-premium);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-premium);
    z-index: 5;
}

.japan-flag-icon {
    width: 16px;
    height: 11px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 1px;
    display: inline-block;
    vertical-align: middle;
    object-fit: cover;
}

.japan-flag-icon.title-flag {
    width: 20px;
    height: 14px;
    margin-left: 0.5rem;
}


.vehicle-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.vehicle-meta {
    font-size: 0.75rem;
    color: var(--brand-gold);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.vehicle-title {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.vehicle-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
    margin-bottom: 1.75rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.spec-item svg {
    color: var(--text-muted);
}

.vehicle-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.vehicle-price {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    color: var(--text-primary);
    font-weight: 600;
}

.vehicle-btn {
    background-color: transparent;
    color: var(--brand-gold);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-premium);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.vehicle-btn:hover {
    background-color: var(--brand-gold);
    color: var(--accent-text);
    border-color: var(--brand-gold);
}

/* Listings Page Layout */
.listings-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    padding: 5rem 0 8rem 0;
}

@media (max-width: 1024px) {
    .listings-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* Filters Panel */
.filters-panel {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    padding: 2rem;
    height: fit-content;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.filters-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}

.filters-clear {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-fast);
}

.filters-clear:hover {
    color: var(--brand-gold);
}

.filter-group {
    margin-bottom: 1.75rem;
}

.filter-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.filter-select {
    width: 100%;
    background-color: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    padding: 0.65rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.filter-select:focus {
    border-color: var(--brand-gold);
}

.filter-price-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* Listings Content */
.listings-content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.listings-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.listings-count span {
    font-weight: 600;
    color: var(--text-primary);
}

.listings-sort select {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

/* Elegant Sourcing Form Panel in Listings Flow */
.sourcing-cta-card {
    grid-column: 1 / -1;
    background-image: linear-gradient(135deg, rgba(43, 69, 54, 0.45) 0%, rgba(21, 30, 25, 0.9) 100%), 
                      url('public/images/luxury_suv.png');
    background-size: cover;
    background-position: center;
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    padding: 4rem;
    margin-top: 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
    position: relative;
    overflow: hidden;
}

body.light-theme .sourcing-cta-card {
    background-image: linear-gradient(135deg, rgba(239, 242, 238, 0.95) 0%, rgba(219, 226, 219, 0.95) 100%),
                      url('public/images/luxury_suv.png');
}

.sourcing-cta-info {
    max-width: 60%;
    z-index: 10;
}

.sourcing-cta-title {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.sourcing-cta-title em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--brand-gold);
}

.sourcing-cta-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
}

.sourcing-cta-action {
    z-index: 10;
    flex-shrink: 0;
}

@media (max-width: 850px) {
    .sourcing-cta-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 3rem 2rem;
        gap: 2rem;
    }
    .sourcing-cta-info {
        max-width: 100%;
    }
}

/* Modal Form styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 22, 18, 0.85);
    backdrop-filter: blur(10px);
    z-index: 2000;
    padding: 3rem 1rem;
    overflow-y: auto;
}

.modal-container {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    box-shadow: var(--shadow-premium);
    position: relative;
    animation: modalSlideUp 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 50;
}

.modal-close:hover {
    background-color: var(--border-subtle);
    color: var(--brand-gold);
    transform: rotate(90deg);
}

.modal-body {
    padding: 3.5rem 3rem;
}

.modal-header {
    margin-bottom: 2.5rem;
}

.modal-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.modal-title em {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--brand-gold);
}

.modal-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Sourcing Wizard / General Form styling */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 550px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group-full {
    grid-column: span 2;
}

@media (max-width: 550px) {
    .form-group-full {
        grid-column: span 1;
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.form-field input, .form-field select, .form-field textarea {
    background-color: var(--bg-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius-premium);
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 2px rgba(197, 168, 128, 0.12);
}

.form-field textarea {
    resize: vertical;
    min-height: 100px;
}

/* Sourcing Succeeded Screen */
.success-screen {
    text-align: center;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon {
    font-size: 4rem;
    color: var(--brand-gold);
    margin-bottom: 2rem;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(197, 168, 128, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.success-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 420px;
    margin-bottom: 2.5rem;
}

/* Unified Footer */
.app-footer {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border-top: 1px solid var(--border-subtle);
    padding: 6rem 0 3rem 0;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    font-family: var(--font-sans);
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

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

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 550px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.footer-logo-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.footer-logo-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 320px;
    line-height: 1.7;
}

.footer-col-title {
    color: var(--brand-gold);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.75rem;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--brand-gold);
    padding-left: 3px;
}

.footer-contact-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.contact-item svg {
    color: var(--brand-gold);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.footer-divider {
    border: none;
    border-top: 1px solid var(--border-subtle);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-copyright-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.footer-copyright-links a:hover {
    color: var(--brand-gold);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--text-secondary);
    background-color: var(--bg-base);
    border: 1px solid var(--border-subtle);
    transition: var(--transition-smooth);
}

.footer-social-btn:hover {
    color: var(--accent-text);
    border-color: var(--brand-gold);
    background-color: var(--brand-gold);
    transform: translateY(-3px);
}
