/* ===== Modern Professional CSS for DOD MWR Campgrounds ===== */

/* CSS Variables & Design Tokens */
:root {
    /* Colors - Professional Military Theme */
    --primary-blue: #1e3a8a;
    --primary-dark: #0f172a;
    --accent-green: #059669;
    --accent-gold: #d97706;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #3b82f6 100%);
    --gradient-accent: linear-gradient(135deg, #059669 0%, #10b981 100%);
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-headings: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Branch-Specific Colors */
    --branch-army: #4a5d23;
    --branch-navy: #002147;
    --branch-airforce: #00308F;
    --branch-marines: #CC0000;
    --branch-coastguard: #FF7A00;
    --branch-multi: #6b7280;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-blue: #60a5fa;
    --primary-dark: #f1f5f9;
    --accent-green: #34d399;
    --accent-gold: #fbbf24;
    
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    
    --gray-50: #0f172a;
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #9ca3af;
    --gray-500: #d1d5db;
    --gray-600: #e5e7eb;
    --gray-700: #f3f4f6;
    --gray-800: #f9fafb;
    --gray-900: #ffffff;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* Dark Mode Component Overrides */
[data-theme="dark"] .state-card-modern,
[data-theme="dark"] .facility-card,
[data-theme="dark"] .quick-stats,
[data-theme="dark"] .section-about,
[data-theme="dark"] .region-tab,
[data-theme="dark"] .view-btn,
[data-theme="dark"] .feedback-modal-content,
[data-theme="dark"] .sort-select {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

[data-theme="dark"] .search-box {
    background: var(--gray-100);
}

[data-theme="dark"] .search-box input {
    background: transparent;
    color: var(--gray-900);
}

[data-theme="dark"] .trust-bar {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
    border-color: #059669;
}

[data-theme="dark"] .trust-text strong {
    color: #34d399;
}

[data-theme="dark"] .stat-item-highlight {
    background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
}

[data-theme="dark"] .facilities-count {
    background: var(--gray-200);
    color: var(--gray-800);
}

[data-theme="dark"] .section-info {
    background: var(--gray-100);
}

[data-theme="dark"] .section-info h2,
[data-theme="dark"] .section-info h3 {
    color: var(--primary-blue);
}

[data-theme="dark"] .section-info p,
[data-theme="dark"] .section-info li {
    color: var(--gray-400);
}

/* Theme Toggle Button */
.theme-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Navigation & Brand */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) 0;
    position: relative;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 800;
    font-size: 1.35rem;
    color: white;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-left: auto;
}

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

.nav-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.nav-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Header & Hero - 2026 Floating Aesthetic */
.main-header {
    position: relative;
    background: linear-gradient(165deg, #0f172a 0%, #1e3a8a 40%, #1e40af 100%);
    color: white;
    padding-bottom: var(--spacing-2xl);
    overflow: hidden;
    box-shadow: inset 0 -100px 100px -100px rgba(0,0,0,0.5);
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(30, 64, 175, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    text-align: center;
    padding: var(--spacing-2xl) 0 var(--spacing-xl);
    position: relative;
    z-index: 10;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.75rem);
    margin-bottom: var(--spacing-2xl);
    opacity: 0.9;
    font-weight: 400;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Floating Search Box */
.search-box-wrapper {
    max-width: 800px;
    margin: 0 auto;
    perspective: 1000px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    margin-bottom: var(--spacing-lg);
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-box:focus-within {
    transform: translateY(-5px) scale(1.02);
    background: #ffffff;
}

.search-icon {
    margin-left: var(--spacing-md);
    color: var(--primary-blue);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    padding: var(--spacing-md);
    font-size: 1.15rem;
    font-weight: 500;
    background: transparent;
    color: var(--gray-900);
}

.search-button {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 20px -5px rgba(30, 58, 138, 0.4);
    position: relative;
    overflow: hidden;
}

.search-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease-out;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(30, 58, 138, 0.5);
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.search-button:hover::after {
    transform: scale(1);
}

.search-button:active {
    transform: translateY(1px);
}

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

.quick-filter {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
}

.quick-filter:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Intro Section */
.section-intro {
    padding: 3rem 0;
    background: #ffffff;
    border-bottom: 1px solid var(--gray-200);
}

.intro-wrapper {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.intro-heading {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.intro-text {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.intro-text:last-child {
    margin-bottom: 0;
}

[data-theme="dark"] .section-intro {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .intro-heading {
    color: #60a5fa;
}

[data-theme="dark"] .intro-text {
    color: #d1d5db;
}

/* Quick Stats - Glassmorphism Upgrade */
.quick-stats {
    background: transparent;
    margin-top: 0;
    position: relative;
    z-index: 20;
    padding: 2rem 0;
    border: none;
    box-shadow: none;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.stat-item {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-blue);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: rgba(30, 58, 138, 0.1);
    color: var(--primary-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dark Mode Support for Glassmorphism */
[data-theme="dark"] .stat-item {
    background: rgba(30, 41, 59, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .stat-number {
    color: white;
}

[data-theme="dark"] .stat-label {
    color: var(--gray-400);
}

/* Trust Bar - Psychological Social Proof */
.trust-bar {
    background: white;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-2xl);
    box-shadow: var(--shadow-sm);
}

.trust-items {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xl);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.95rem;
    color: var(--gray-600);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-full);
    transition: background-color var(--transition-base), transform var(--transition-base);
}

.trust-item:hover {
    background-color: var(--gray-50);
    transform: translateY(-2px);
    color: var(--gray-900);
}

.trust-icon {
    font-size: 1.5rem;
    color: var(--accent-green);
    filter: none;
}

.trust-text strong {
    color: var(--gray-900);
    font-weight: 700;
}

/* Section Styles */
.section-states,
.section-facilities,
.section-about {
    padding: var(--spacing-2xl) 0;
}

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

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-600);
}

/* Region Tabs */
.region-tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.region-tab {
    background: white;
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
}

.region-tab:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.region-tab.active {
    background: var(--gradient-primary);
    border-color: var(--primary-blue);
    color: white;
}

/* States Grid - Modern Cards */
.states-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.state-card-modern {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.state-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-base);
}

.state-card-modern:hover::before {
    transform: scaleX(1);
}

.state-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-blue);
}

.state-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.state-name-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.state-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.state-facilities-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--gray-600);
}

.facilities-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
}

.facilities-count strong {
    color: var(--accent-green);
    font-size: 1.25rem;
}

/* View Controls */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    border: 2px solid var(--gray-200);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition-base);
}

.view-btn:hover {
    border-color: var(--primary-blue);
}

.view-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

.sort-select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-weight: 500;
    cursor: pointer;
}

/* Facilities Grid */
.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.facility-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    border: 2px solid transparent;
}

.facility-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-blue);
}

.facility-header {
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-md);
    transition: var(--transition-base);
}

.facility-card:hover .facility-header {
    padding-bottom: calc(var(--spacing-md) + 4px);
}

.facility-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.facility-location {
    opacity: 0.9;
    font-size: 0.875rem;
}

.facility-body {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.facility-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.facility-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.facility-link:hover {
    background: var(--primary-dark);
    gap: 0.75rem;
}

.intel-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f0f2f5;
    color: #1877f2;
    text-decoration: none;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    transition: var(--transition-base);
    border: 1px solid #ccd0d5;
}

.intel-btn:hover {
    background: #e4e6eb;
    border-color: #bec3c9;
}

[data-theme="dark"] .intel-btn {
    background: #334155;
    color: #60a5fa;
    border-color: #475569;
}

[data-theme="dark"] .intel-btn:hover {
    background: #475569;
}

/* Load More Button */
.load-more-btn {
    display: block;
    margin: 0 auto;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: var(--spacing-md) var(--spacing-2xl);
    border-radius: var(--radius-full);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* About Section */
.section-about {
    background: white;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.lead {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: var(--spacing-xl);
}

.about-features {
    display: grid;
    gap: var(--spacing-xl);
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--gray-900);
}

.feature ul {
    list-style: none;
    display: grid;
    gap: var(--spacing-sm);
}

.feature li {
    padding-left: var(--spacing-lg);
    position: relative;
    color: var(--gray-700);
}

.feature li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-green);
    font-weight: 700;
}

/* Footer */
.main-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

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

.footer-col h4 {
    color: white;
    margin-bottom: var(--spacing-md);
    font-size: 1.125rem;
}

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

.footer-col li {
    margin-bottom: var(--spacing-sm);
}

.footer-col a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition-base);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: var(--spacing-lg);
    text-align: center;
    color: var(--gray-500);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all var(--transition-base);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-2xl);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

/* Feedback Floating Button */
.feedback-floating-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: var(--accent-green);
    color: white;
    border: none;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-base);
    z-index: 998;
}

.feedback-floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-2xl);
    background: #047857;
}

.feedback-floating-btn svg {
    flex-shrink: 0;
}

/* Feedback Modal */
.feedback-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
    animation: fadeIn 0.2s ease-out;
}

.feedback-modal.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.feedback-modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: slideUp 0.3s ease-out;
}

.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 2px solid var(--gray-100);
}

.feedback-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--gray-900);
}

.feedback-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--gray-400);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-base);
}

.feedback-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.feedback-modal-body {
    padding: var(--spacing-lg);
}

.feedback-modal-body > p {
    color: var(--gray-600);
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: var(--gray-500);
    font-size: 0.75rem;
}

.feedback-actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-base);
    border: none;
    font-family: var(--font-primary);
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.feedback-success {
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto var(--spacing-md);
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.feedback-success h4 {
    color: var(--gray-900);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feedback-success p {
    color: var(--gray-600);
}

/* Utility Classes */
.mt-2 { margin-top: var(--spacing-sm); }
.hidden { display: none !important; }

/* Custom Map Markers */
.custom-map-marker {
    width: 28px;
    height: 28px;
    border-radius: 50% 50% 50% 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-45deg);
    border: 2px solid white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.custom-map-marker svg {
    transform: rotate(45deg);
}

.marker-pulse {
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid;
    border-radius: 50%;
    animation: marker-pulse-anim 2s infinite;
    opacity: 0;
}

@keyframes marker-pulse-anim {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

.map-popup-custom {
    text-align: center;
    font-family: var(--font-primary);
    padding: 5px;
}

.popup-branch {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.popup-btn {
    display: inline-block;
    margin-top: 10px;
    background: var(--primary-blue);
    color: white !important;
    padding: 5px 15px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Sponsored & Ad Cards */
.sponsored-facility {
    border: 2px solid var(--accent-gold) !important;
    position: relative;
    box-shadow: 0 0 25px rgba(217, 119, 6, 0.2) !important;
}

.sponsored-facility::after {
    content: '★ FEATURED';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-gold);
    color: white;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    z-index: 2;
}

.ad-card-sponsored {
    border: 1px dashed var(--gray-300) !important;
    background: var(--gray-50) !important;
}

/* Mobile Sticky Ad */
.mobile-sticky-ad {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid var(--gray-200);
    z-index: 997; /* Below feedback and scroll to top */
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .mobile-sticky-ad {
        display: flex;
    }
    
    /* Adjust floating buttons to not overlap the sticky ad */
    .scroll-to-top {
        bottom: 75px;
    }
    
    .feedback-floating-btn {
        bottom: 75px;
    }
    
    .main-footer {
        padding-bottom: 80px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .logo-text {
        display: block; /* Show text on tablets */
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-content {
        padding: var(--spacing-lg) 0;
    }
    
    .nav-actions {
        margin-right: 0.5rem;
    }
}

/* ===== Veteran-Owned / Off-Post Facilities ===== */

/* Distinctive filter button */
.veteran-owned-btn {
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%) !important;
    color: white !important;
    border: 2px solid #92400e !important;
    font-weight: 600;
}

.veteran-owned-btn:hover {
    background: linear-gradient(135deg, #92400e 0%, #b45309 100%) !important;
    transform: translateY(-2px);
}

.veteran-owned-btn.active {
    background: linear-gradient(135deg, #78350f 0%, #92400e 100%) !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.3);
}

/* Civilian facility card styling */
.facility-card.civilian-facility {
    border: 2px solid #d97706;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    position: relative;
}

[data-theme="dark"] .facility-card.civilian-facility {
    background: linear-gradient(135deg, #451a03 0%, #78350f 50%);
    border-color: #b45309;
}

.civilian-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #b45309, #d97706);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-base-access-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #059669;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.civilian-disclaimer {
    margin-top: 12px;
    padding: 10px;
    background: rgba(217, 119, 6, 0.1);
    border-left: 3px solid #d97706;
    border-radius: 0 6px 6px 0;
    font-size: 11px;
    color: #92400e;
    line-height: 1.4;
}

[data-theme="dark"] .civilian-disclaimer {
    background: rgba(217, 119, 6, 0.2);
    color: #fbbf24;
}

/* ===== TWO-TONE CARD ENFORCEMENT ===== */
.facility-header {
    background-color: #f1f5f9 !important; /* Clearly defined light gray/slate header */
    border-bottom: 1px solid #cbd5e1 !important; /* Visible separation line */
}

.facility-body {
    background-color: #ffffff !important; /* Pure white body */
}

/* Ensure the card border matches the two-tone logic */
.facility-card {
    border: 1px solid #cbd5e1 !important;
    overflow: hidden; /* Essential for the header background to clip correctly */
}

/* Dark Mode Two-Tone */
[data-theme="dark"] .facility-header {
    background-color: #1e293b !important; /* Lighter dark */
    border-bottom: 1px solid #334155 !important;
}

[data-theme="dark"] .facility-body {
    background-color: #0f172a !important; /* Darker dark body */
}

/* ===== DYNAMIC BRANCH VISUALS (Stunning Update) ===== */

/* Base Card Enhancements */
.facility-card {
    border-top-width: 4px !important; /* Thick colored top border */
    border-top-style: solid;
    /* Default color (Multi-Branch) */
    border-top-color: #64748b; 
}

.facility-header {
    background: linear-gradient(to bottom, #f8fafc, #f1f5f9) !important; /* Subtle gradient */
}

/* Branch Specific Colors (Border & Badge) */

/* Army (Green) */
.branch-card-army { border-top-color: #166534 !important; }
.branch-badge.army {
    background-color: #f0fdf4 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

/* Navy (Navy Blue) */
.branch-card-navy { border-top-color: #1e40af !important; }
.branch-badge.navy {
    background-color: #eff6ff !important;
    color: #1e40af !important;
    border: 1px solid #bfdbfe !important;
}

/* Air Force (Sky Blue) */
.branch-card-air-force { border-top-color: #0369a1 !important; }
.branch-badge.air-force {
    background-color: #f0f9ff !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
}

/* Marine Corps (Red) */
.branch-card-marine-corps { border-top-color: #b91c1c !important; }
.branch-badge.marine-corps {
    background-color: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
}

/* Space Force (Black/Dark) */
.branch-card-space-force { border-top-color: #111827 !important; }
.branch-badge.space-force {
    background-color: #f9fafb !important;
    color: #111827 !important;
    border: 1px solid #e5e7eb !important;
}

/* Coast Guard (Orange) */
.branch-card-coast-guard { border-top-color: #c2410c !important; }
.branch-badge.coast-guard {
    background-color: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #fed7aa !important;
}

/* Veteran/Partner (Gold) */
.branch-card-veteran-owned-partner { border-top-color: #b45309 !important; }
.branch-badge.veteran-owned-partner {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

/* Typography Polish */
.facility-name {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em; /* Tighter, more modern heading */
    color: #0f172a;
}

.facility-location {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

/* ===== READABILITY UPGRADE (Text Polish) ===== */

/* Description Text - Clean & Readable */
.facility-description {
    font-size: 0.95rem !important; /* Larger text (was 0.85rem) */
    line-height: 1.6 !important;   /* More breathing room */
    color: #334155 !important;     /* Darker slate for contrast */
    margin-bottom: 1.25rem !important;
    font-weight: 400;
    /* Prevent awkward wrapping */
    text-wrap: pretty; /* Modern CSS for better wrapping */
    max-width: 100%;
}

/* Details Row (Sites & Rates) */
.facility-details {
    display: flex;
    gap: 1.25rem; /* Wider gap */
    margin: 0.75rem 0 1rem 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: #475569;
    align-items: center;
}

/* Amenities Text Fix */
.card-amenities span {
    font-size: 0.75rem !important; /* Slightly larger */
    padding: 0.5rem 0.75rem !important; /* More padding */
    color: #334155 !important; /* Darker text */
    white-space: normal !important; /* Allow natural wrapping if needed */
}

/* Location Text */
.facility-location {
    font-size: 0.9rem !important;
    color: #475569 !important;
    margin-bottom: 0.5rem;
}

/* Dark Mode Readability */
[data-theme="dark"] .facility-description {
    color: #cbd5e1 !important;
}

[data-theme="dark"] .facility-details,
[data-theme="dark"] .facility-location {
    color: #94a3b8 !important;
}

[data-theme="dark"] .card-amenities span {
    color: #cbd5e1 !important;
}

/* ===== FINAL VISUAL RESTORATION (Blue Two-Tone & Bouncy) ===== */

/* 1. Blue & White Two-Tone Look */
.facility-header {
    background: #eff6ff !important; /* Brand Blue Light */
    border-bottom: 1px solid #dbeafe !important; /* Blue separator */
}

.facility-body {
    background: #ffffff !important; /* Pure White Bottom */
}

/* 2. Dynamic "Bouncy" Cards */
.facility-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease !important; /* Bouncy Spring Effect */
    border: 1px solid #bfdbfe !important; /* Subtle Blue Border */
}

.facility-card:hover {
    transform: translateY(-8px) !important; /* Significant Lift */
    box-shadow: 0 20px 30px -10px rgba(30, 58, 138, 0.2) !important; /* Blue-tinted shadow */
    border-color: #3b82f6 !important; /* Bright Blue Border on Hover */
}

/* 3. Text Matching */
.facility-name {
    color: #1e3a8a !important; /* Dark Blue Text */
}

/* 4. Branch Styling Override (Keep the top border color dynamic) */
/* This ensures we keep the specific branch colors (Green for Army) on the top border 
   while keeping the Blue background for the "Two-Tone" consistency. */
.facility-card {
    border-top-width: 4px !important;
    border-top-style: solid;
}

/* Dark Mode Adjustments */
[data-theme="dark"] .facility-header {
    background: #172554 !important; /* Dark Blue Header */
    border-bottom-color: #1e3a8a !important;
}
[data-theme="dark"] .facility-body {
    background: #0f172a !important; /* Slate Body */
}
[data-theme="dark"] .facility-name {
    color: #eff6ff !important;
}

/* ===== HIGH-END MILITARY AESTHETIC (Two-Tone Glass) ===== */

/* Card Container */
.facility-card {
    border-radius: 16px !important;
    overflow: hidden !important;
    background: white !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.facility-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

/* ZONE A: Header (Gradient) */
.card-header-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%) !important;
    padding: 1.25rem 1.5rem !important;
    color: white !important;
    position: relative;
}

.header-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

/* Glass Badges */
.glass-badge {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    backdrop-filter: blur(4px);
    color: white !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px !important;
    border-radius: 50px !important;
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.header-title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 8px 0 !important;
    color: white !important;
}

.header-location {
    font-size: 0.85rem !important;
    color: rgba(255, 255, 255, 0.9) !important;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ZONE B: Body (White) */
.card-body-white {
    padding: 1.5rem !important;
    background: white !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.body-info-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.info-tag {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.rate-tag {
    color: #059669; /* Green for money */
    background: #ecfdf5;
}

.body-description {
    font-size: 0.9rem !important;
    color: #4b5563 !important;
    line-height: 1.6 !important;
    margin-bottom: 1rem !important;
    flex-grow: 1; /* Pushes button down */
}

/* Amenities Pills */
.amenities-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.amenity-pill {
    font-size: 0.7rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 12px;
}

/* Action Button */
.body-actions {
    margin-top: auto;
}

.action-btn-wide {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #f3f4f6 !important; /* Light gray button */
    color: #1e3a8a !important; /* Dark blue text */
    font-weight: 700 !important;
    padding: 12px !important;
    border-radius: 50px !important; /* Pill shape */
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.action-btn-wide:hover {
    background: #e5e7eb !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.civilian-note {
    font-size: 0.75rem;
    color: #d97706;
    background: #fffbeb;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: center;
}

/* Branch Badge Specific Colors (Matching Map Markers) */
.branch-badge-army { background-color: #166534 !important; border-color: #14532d !important; }
.branch-badge-navy { background-color: #1e40af !important; border-color: #1e3a8a !important; }
.branch-badge-air-force { background-color: #0ea5e9 !important; border-color: #0284c7 !important; }
.branch-badge-space-force { background-color: #111827 !important; border-color: #030712 !important; }
.branch-badge-marine-corps { background-color: #b91c1c !important; border-color: #991b1b !important; }
.branch-badge-coast-guard { background-color: #ea580c !important; border-color: #c2410c !important; }
.branch-badge-multi-branch { background-color: #475569 !important; border-color: #334155 !important; }
.branch-badge-veteran-owned-partner { background-color: #ca8a04 !important; border-color: #a16207 !important; }

/* Branch-Specific Header Gradients */
.branch-header-army { background: linear-gradient(135deg, #2d3a1a 0%, #4a5d23 100%) !important; }
.branch-header-navy { background: linear-gradient(135deg, #002147 0%, #1e3a8a 100%) !important; }
.branch-header-air-force { background: linear-gradient(135deg, #00308F 0%, #0056b3 100%) !important; }
.branch-header-space-force { background: linear-gradient(135deg, #000000 0%, #111827 100%) !important; }
.branch-header-marine-corps { background: linear-gradient(135deg, #8B0000 0%, #b91c1c 100%) !important; }
.branch-header-coast-guard { background: linear-gradient(135deg, #D35400 0%, #ea580c 100%) !important; }
.branch-header-multi-branch { background: linear-gradient(135deg, #475569 0%, #64748b 100%) !important; }
.branch-header-veteran-owned-partner { background: linear-gradient(135deg, #B45309 0%, #ca8a04 100%) !important; }
