/* ============================================================================
   CNSLT — Styles custom
   Palette : Primary #1a3c5e | Accent #c0392b | Success #27ae60 | Warning #f39c12
   ============================================================================ */

:root {
    --primary: #1a3c5e;
    --primary-light: #2458a0;
    --accent: #c0392b;
    --accent-light: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --light-bg: #f4f6f9;
    --text-dark: #2c3e50;
    --text-muted: #7f8c8d;
    --border: #dde1e7;
}

/* ─── Reset / Base ─── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text-dark); background: var(--light-bg); }
a { color: var(--primary); }
img { max-width: 100%; }

/* ─── Primary button ─── */
.btn-primary-cnslt { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary-cnslt:hover, .btn-primary-cnslt:focus { background: var(--primary-light); border-color: var(--primary-light); color: #fff; }

/* ─── Purple utility (CA card) ─── */
.text-purple { color: #8e44ad !important; }
.bg-purple { background-color: #8e44ad !important; }

/* ============================================================================
   FRONT-OFFICE
   ============================================================================ */

/* ─── Header ─── */
.front-header { background: var(--primary); z-index: 1030; box-shadow: 0 2px 12px rgba(0,0,0,0.15); }
.front-header a { color: #fff; }

/* ─── Hero ─── */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(26,60,94,0.7) 0%, rgba(26,60,94,0.5) 50%, rgba(192,57,43,0.3) 100%),
                url('https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1920&h=1080&fit=crop') center/cover no-repeat;
    background-attachment: fixed;
    padding-top: 80px;
}
.hero-overlay { background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.15) 100%); }
.hero-title { font-size: clamp(1.8rem, 5vw, 3.2rem); text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero-subtitle { font-size: clamp(1rem, 2vw, 1.25rem); max-width: 700px; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }

/* ─── Search bar ─── */
.search-bar { backdrop-filter: blur(4px); }
.search-bar .form-control, .search-bar .form-select { border: 1px solid var(--border); }

/* ─── Section title ─── */
.section-title { font-size: 2rem; font-weight: 700; }
.title-underline { width: 60px; height: 4px; background: var(--accent); border-radius: 2px; }

/* ─── Offers grid (asymmetric) ─── */
.offers-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.offer-card-large { min-height: 500px; }
.offers-side-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.offer-card-small { min-height: 240px; }

.offer-card { transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; }
.offer-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.2); }
.offer-card img { transition: transform 0.5s ease; }
.offer-card:hover img { transform: scale(1.05); }

.offer-overlay-gradient {
    background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    padding-top: 40%;
}

/* ─── Modal ─── */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
    z-index: 1050; display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.25s ease;
}
.modal-overlay.d-none { display: none !important; }
.modal-box { animation: slideUp 0.3s ease; }
.btn-close-modal { z-index: 10; width: 36px; height: 36px; }
.slider-dots .dot {
    width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5);
    display: inline-block; cursor: pointer; transition: background 0.2s;
}
.slider-dots .dot.active { background: #fff; }

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

/* ─── Footer ─── */
.front-footer { background: var(--primary); color: #fff; }
.front-footer a { color: #fff; }
.front-footer a:hover { opacity: 1; color: #f0f0f0; }

/* ─── Reservation page ─── */
.reservation-page { padding-top: 80px; }
.reservation-page .card { border: 1px solid var(--border); }

/* ============================================================================
   BACK-OFFICE
   ============================================================================ */

/* ─── Admin navbar ─── */
.admin-navbar { box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.admin-nav-link { transition: background 0.2s; border-radius: 6px; }
.admin-nav-link:hover { background: rgba(255,255,255,0.1); }
.admin-nav-link.active { background: rgba(255,255,255,0.15); border-bottom: 2px solid #fff; }

/* ─── Admin body ─── */
.admin-body { padding-top: 0; }

/* ─── Stat cards ─── */
.stat-card { transition: transform 0.2s; }
.stat-card:hover { transform: translateY(-2px); }

/* ─── Admin table ─── */
.admin-table thead th { font-size: 0.75rem; letter-spacing: 0.5px; }
.admin-table tbody tr:hover { background: rgba(26,60,94,0.03); }
.admin-table tbody tr:nth-child(even) { background: #fafbfc; }
.admin-table tbody tr:nth-child(even):hover { background: rgba(26,60,94,0.05); }

/* ─── Badges ─── */
.badge { font-weight: 500; }

/* ─── Form focus ─── */
.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(26,60,94,0.2);
    border-color: var(--primary);
}

/* ─── Drop zone ─── */
.drop-zone {
    border: 2px dashed var(--border);
    background: #fafbfc;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.drop-zone:hover, .drop-zone.drag-over {
    border-color: var(--primary);
    background: rgba(26,60,94,0.04);
}

/* ─── Offer admin card ─── */
.offer-admin-card { transition: transform 0.2s, box-shadow 0.2s; }
.offer-admin-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }

/* ─── User card ─── */
.user-card { transition: transform 0.2s, box-shadow 0.2s; }
.user-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }

/* ─── Object-fit cover helper ─── */
.object-fit-cover { object-fit: cover; }

/* ─── Flash messages auto-hide ─── */
.alert { animation: fadeIn 0.3s ease; }

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 767.98px) {
    .offers-grid { grid-template-columns: 1fr; }
    .offer-card-large { min-height: 300px; }
    .offer-card-small { min-height: 200px; }
    .offers-side-grid { grid-template-columns: 1fr; }
    .hero-section { padding-top: 70px; min-height: auto; padding-bottom: 40px; }
    .search-bar { margin-top: 20px; }
}

@media (min-width: 768px) and (max-width: 1023.98px) {
    .offers-grid { grid-template-columns: 1fr 1fr; }
    .offer-card-large { min-height: 400px; }
    .offer-card-small { min-height: 190px; }
}

@media (max-width: 575.98px) {
    .stat-card .d-flex { flex-direction: column; text-align: center; }
    .stat-icon { margin: 0 auto 12px !important; }
}
