/* Mobile-First Reset & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f4f6f8;
    color: #333;
}

.app-header {
    background-color: #1e293b;
    color: #ffffff;
    padding: 12px 16px;
    text-align: center;
}

.app-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.app-header p {
    font-size: 0.8rem;
    color: #94a3b8;
}

/* Search & Filter Bar */
.search-section {
    padding: 12px;
    background: #ffffff;
    display: flex;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.search-section input {
    flex: 1;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
}

.secondary-btn {
    background-color: #f59e0b;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.secondary-btn:active {
    background-color: #d97706;
}

/* Featured Spotlight Banner */
.featured-banner {
    background: #fffbeb;
    border-bottom: 1px solid #fde68a;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.featured-banner h3 {
    font-size: 0.8rem;
    color: #b45309;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Map Container - Explicit Height */
#map {
    width: 100%;
    height: 65vh;
    display: block;
}

/* --- MOBILE APP UI UPGRADES --- */

/* 1. Fixed Bottom Navigation */
body {
    margin-bottom: 75px; /* Ensures the map isn't hidden behind the nav bar */
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 0 20px 0; /* Extra padding at the bottom for modern phones */
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
    z-index: 9999;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    gap: 4px;
}

.bottom-nav-item.active {
    color: #f59e0b; /* Brand color */
}

/* 2. Slide-Up Bottom Sheets */
.bottom-sheet {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000; /* Sits above everything */
    justify-content: flex-end;
    flex-direction: column;
}

.bottom-sheet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6); /* Dark tint */
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

.bottom-sheet-content {
    position: relative;
    background: #f8fafc;
    width: 100%;
    max-height: 85vh; /* Prevents it from covering the very top of the screen */
    padding: 20px;
    box-sizing: border-box;
    border-top-left-radius: 25px;
    border-top-right-radius: 25px;
    transform: translateY(100%);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; /* Smooth app-like curve */
    overflow-y: auto;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.2);
}

.sheet-drag-handle {
    width: 40px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 10px;
    margin: 0 auto 20px auto;
}

/* Animations */
@keyframes fadeIn { to { opacity: 1; } }
@keyframes slideUp { to { transform: translateY(0); } }

/* --- SPLASH SCREEN --- */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #9fd0e1; /* Updated to Secondary Light Blue */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; 
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-logo {
    width: 80vw; /* Scales with the screen width */
    max-width: 250px; /* Ensures it doesn't get too massive on desktop */
    height: auto; /* Maintains perfect proportions */
    border-radius: 50%; /* Helps blend the edges if the jpeg has a background */
    animation: pulseLogo 1.5s infinite ease-in-out;
}

/* The fade-out class triggered by JavaScript */
.splash-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Subtle loading pulse animation */
@keyframes pulseLogo {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Fixed Bottom Navigation Active State */
.bottom-nav-item.active {
    color: #f37c28; /* Updated to Primary Orange */
}

/* --- CUSTOM MODALS --- */
.custom-modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    align-items: center;
    justify-content: center;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    animation: fadeIn 0.2s forwards;
}

.custom-modal-content {
    position: relative;
    background: white;
    width: 85%;
    max-width: 320px;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: scale(0.9);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.star-rating {
    cursor: pointer;
    transition: transform 0.1s;
}

.star-rating:active {
    transform: scale(0.8); /* Slight click effect on stars */
}

@keyframes popIn {
    to { transform: scale(1); }
}

/* --- UNIVERSAL APP PAGE STRUCTURE --- */

/* The solid colored top half of the screen */
.app-page-header {
    padding: 3rem 1.5rem 5rem 1.5rem; /* Extra bottom padding for the card overlap */
    color: white;
    text-align: center;
}

.app-page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
}

/* The white card that slides up over the header */
.app-page-card {
    background: #ffffff;
    margin: -40px 0 0 0; /* Pulls the card up over the header */
    border-radius: 30px 30px 0 0; /* Heavy rounding on top only */
    padding: 30px 20px;
    min-height: 70vh;
    box-shadow: 0 -10px 20px rgba(0,0,0,0.05);
    position: relative;
    z-index: 10;
}

/* High-contrast dark panel for dashboards */
.dark-panel {
    background-color: #1e293b;
    color: #ffffff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Clean, modern form inputs */
.app-input {
    width: 100%;
    padding: 12px 5px;
    border: none;
    border-bottom: 2px solid #cbd5e1;
    background: transparent;
    font-size: 1rem;
    outline: none;
    margin-bottom: 20px;
    transition: border-color 0.3s;
}

.app-input:focus {
    border-bottom: 2px solid #0f83ac; /* Highlights Primary Blue when typing */
}