/* /css/style.css - "Slate & Blue" Frontend Theme */

/* --- CSS Variables & Reset --- */
:root {
    /* Updated Palette to Match Admin (Slate/Blue) */
    --bg-deep: #0f172a;       /* Deep Slate Blue */
    --bg-surface: #1e293b;    /* Lighter Slate */
    --bg-surface-hover: #334155; /* Hover State */
    
    --accent-primary: #3b82f6;   /* Bright Blue (Was Purple) */
    --accent-secondary: #0ea5e9; /* Sky Blue (Was Cyan) */
    
    --text-primary: #f8fafc;     /* White-ish */
    --text-secondary: #cbd5e1;   /* Light Slate Grey */
    --text-muted: #64748b;       /* Muted Grey */
    
    --danger: #ef4444;
    --success: #10b981;
    
    --container-width: 1200px;
    --header-height: 70px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3); /* Blue Glow */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul { list-style: none; }

/* --- Typography Helpers --- */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.02em; color: var(--text-primary); }
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
.text-accent { color: var(--accent-primary); }
.text-secondary { color: var(--text-secondary); }

/* --- Layout & Containers --- */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

main {
    flex: 1; /* Pushes footer down */
    padding: 40px 0;
}

/* --- Buttons & Inputs --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
    background: var(--accent-primary); /* Solid blue on hover */
}

.btn-outline {
    border: 2px solid var(--accent-primary);
    color: var(--accent-primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--accent-primary);
    color: white;
}

.form-control {
    width: 100%;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    background-color: var(--bg-surface);
    color: var(--text-primary);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-glow);
}

/* --- Header & Nav --- */
.main-header {
    height: var(--header-height);
    background-color: var(--bg-surface);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    /* Blue Gradient Logo */
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 20px; }
.nav-links a { font-weight: 600; font-size: 0.9rem; }
.nav-links a:hover { color: var(--accent-primary); }
.admin-link { color: var(--accent-secondary); }

/* --- Hero Section (Homepage) --- */
.hero-section {
    text-align: center;
    padding: 80px 20px 40px;
    background: radial-gradient(circle at top center, #1e293b 0%, var(--bg-deep) 60%);
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Search Box Styling --- */
.search-container {
    max-width: 700px;
    margin: 0 auto 60px;
    position: relative;
}

.search-box-wrapper {
    display: flex;
    gap: 10px;
    background: var(--bg-surface);
    padding: 10px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: var(--shadow-sm);
}

.search-box-wrapper input {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    flex-grow: 2;
    color: var(--text-primary);
}

/* FIX: Dropdown Color Issue */
.search-box-wrapper select {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    border-left: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 0 !important;
    padding-left: 15px;
    color: var(--text-secondary);
    width: 200px;
    cursor: pointer;
}

/* IMPORTANT: Ensure dropdown options have dark background */
.search-box-wrapper select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    padding: 10px;
}

.search-box-wrapper select:focus, 
.search-box-wrapper input:focus {
    outline: none;
}

/* --- Homepage Suggestions Grid --- */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
    text-align: left;
}

.suggestion-card {
    background: var(--bg-surface);
    padding: 20px;
    border-radius: var(--radius-md);
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.suggestion-card:hover {
    transform: translateY(-5px);
    background: var(--bg-surface-hover);
    border-color: var(--accent-primary);
}

.suggestion-icon {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* --- Search Results Grid --- */
.results-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.place-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
}

.place-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-sm), var(--shadow-glow);
    border-color: var(--accent-primary);
}

.place-image-container {
    height: 180px;
    background-color: #2a2a3d;
    position: relative;
}

.place-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.place-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-secondary); /* Sky Blue */
    margin-bottom: 10px;
    font-weight: 700;
}

.place-title {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.place-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1; 
}

.place-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price-tag {
    color: var(--text-muted);
    font-weight: 600;
}

/* --- Single Place Details --- */
.breadcrumb-nav { margin-bottom: 30px; }

.back-link {
    color: var(--text-secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.back-link:hover { color: var(--accent-primary); }

.place-details-container {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.place-header-hero {
    padding: 40px;
    background: linear-gradient(to bottom right, var(--bg-surface), #1e293b);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.place-meta-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Blue Badge Background */
.badge-category { 
    background: rgba(59, 130, 246, 0.2); 
    color: var(--accent-primary); 
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-price { background: rgba(255, 255, 255, 0.1); color: var(--text-secondary); }

.place-details-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding: 40px;
}

.info-box {
    background: var(--bg-deep);
    padding: 25px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.05);
}

.info-box h3 { margin-bottom: 15px; font-size: 1.1rem; }

.info-list li {
    margin-bottom: 12px;
    display: flex;
    gap: 10px;
    color: var(--text-secondary);
}

.info-icon { color: var(--accent-secondary); }

/* --- Footer --- */
.main-footer {
    background-color: var(--bg-surface);
    padding: 30px 0;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .main-header .container { flex-direction: column; gap: 15px; padding: 15px 0; }
    .main-header { height: auto; position: relative; }
    
    .search-box-wrapper { flex-direction: column; }
    .search-box-wrapper select { 
        width: 100%; 
        border-left: none !important; 
        border-top: 1px solid rgba(255,255,255,0.1) !important;
        padding-left: 10px;
        padding-top: 10px;
    }
    
    .place-details-grid { grid-template-columns: 1fr; }
    .place-header-hero { padding: 25px; }
    .place-details-grid { padding: 25px; }
}

/* --- Favorites / Saved Places --- */
.btn-favorite {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-favorite:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.btn-favorite.active {
    background: rgba(239, 68, 68, 0.2); /* Red tint */
    color: #ef4444; /* Red Heart */
}

/* Positioning for the card */
.place-card { position: relative; }
.card-heart-container {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 20; /* Above the link */
}