/* ==========================================
   Tourism Website – Custom Styles
   ========================================== */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --accent: #ff6b35;
    --text-dark: #1f2937;
    --text-muted: #6b7280;
    --bg-light: #f8fafc;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: #fff;
}

/* Navbar */
.navbar-brand { font-size: 1.4rem; }
.navbar .nav-link { font-weight: 500; }
.navbar .nav-link.active { color: var(--primary) !important; }

/* ==================== Hero ==================== */
.hero-section {
    min-height: 480px;
    background:
        linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.6)),
        url('https://images.unsplash.com/photo-1480796927426-f609979314bd?w=1600&auto=format') center/cover;
    padding: 60px 20px;
}
.hero-section h1 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
@media (max-width: 768px) {
    .hero-section { min-height: 360px; }
    .hero-section h1 { font-size: 2rem; }
}

/* ==================== Tour Cards ==================== */
.tour-card {
    border: none;
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.tour-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.tour-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #eef2f7;
}
.tour-card-body { padding: 1.25rem; }
.tour-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    /* Truncate to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}
.tour-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}
.tour-card-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}
.tour-card-duration {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==================== Feature Icons ==================== */
.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    background: rgba(13, 110, 253, 0.1);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ==================== Tour Detail Page ==================== */
.section-title {
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Carousel */
#tourCarousel { max-height: 540px; overflow: hidden; background: #000; }
#tourCarousel .carousel-item img {
    width: 100%;
    height: 540px;
    object-fit: cover;
}
@media (max-width: 768px) {
    #tourCarousel .carousel-item img { height: 280px; }
}

/* Lists */
#highlightsList li,
#includesList li,
#notIncludesList li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px dashed #eee;
}
#highlightsList li:last-child,
#includesList li:last-child,
#notIncludesList li:last-child { border-bottom: none; }

#highlightsList li::before {
    content: "★";
    color: var(--accent);
    flex-shrink: 0;
}
#includesList li::before {
    content: "✓";
    color: #198754;
    font-weight: bold;
    flex-shrink: 0;
}
#notIncludesList li::before {
    content: "✕";
    color: #dc3545;
    font-weight: bold;
    flex-shrink: 0;
}

/* Itinerary timeline */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #e5e7eb;
}
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--primary);
}
.timeline-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}
.timeline-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Booking card */
.booking-card .card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

/* Mobile fixes */
@media (max-width: 991px) {
    .booking-card { position: static !important; margin-top: 2rem; }
}

/* ==================== Admin Panel ==================== */
.admin-wrapper {
    background: #f1f5f9;
    min-height: 100vh;
}
.admin-sidebar {
    background: #1e293b;
    color: #cbd5e1;
    min-height: 100vh;
    padding: 1.5rem 0;
}
.admin-sidebar h4 { color: #fff; padding: 0 1.5rem; margin-bottom: 1.5rem; }
.admin-sidebar a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
    background: #334155;
    color: #fff;
    border-left: 4px solid var(--primary);
}
.admin-content { padding: 2rem; }

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Image preview thumbnails in admin */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f1f5f9;
}
.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.image-preview-item .delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(220, 53, 69, 0.9);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
}

/* Repeatable list inputs (for highlights, includes, etc.) */
.list-input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.list-input-group input { flex: 1; }
.list-input-group .btn-remove {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
}
.list-input-group .btn-remove:hover { background: #fee2e2; color: #dc2626; }
