:root {
    --primary-color: #1a5f7a;
    --secondary-color: #159895;
    --accent-color: #57c5b6;
    --dark-color: #002b5b;
    --light-bg: #f8fafc;
    --gold-color: #d4a853;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: #333;
}

/* Dashboard stat-card - modern, lightweight */
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.06);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15,23,42,0.09);
}
.stat-card .stat-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(11,22,33,0.04) inset;
}
.stat-card .stat-icon i { font-size: 26px; }
.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
    margin-top: 4px;
}
.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.95rem;
}
.stat-card .stat-meta {
    display: flex;
    flex-direction: column;
}

/* Pastel icon backgrounds per variant */
.bg-primary-gradient .stat-icon { background: linear-gradient(135deg, #fff7ec, #fffaf6); color: #d4a853; }
.bg-success-gradient .stat-icon { background: linear-gradient(135deg, #ecfff6, #f7fffb); color: #16a34a; }
.bg-info-gradient .stat-icon    { background: linear-gradient(135deg, #eef7ff, #fbfdff); color: #2563eb; }
.bg-warning-gradient .stat-icon { background: linear-gradient(135deg, #fff9ec, #fffdf5); color: #d97706; }

@media (max-width: 576px) {
    .stat-card { padding: 14px; }
    .stat-card .stat-icon { width: 56px; height:56px; }
    .stat-card .stat-value { font-size: 22px; }
}

.bg-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color)) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(26, 95, 122, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.hero-section {
    background: linear-gradient(135deg, rgba(0, 43, 91, 0.9), rgba(26, 95, 122, 0.85)), 
                url('https://images.unsplash.com/photo-1566073771259-6a8506099945?w=1920') center/cover;
    min-height: 85vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to top, var(--light-bg), transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
}

.search-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

.search-box .form-control, .search-box .form-select {
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    border-radius: 10px;
    transition: all 0.3s;
}

.search-box .form-control:focus, .search-box .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.search-box .btn {
    padding: 12px 30px;
    border-radius: 10px;
    font-weight: 600;
}

.section-title {
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.hotel-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    height: 100%;
}

.hotel-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.hotel-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hotel-card:hover .card-img-top {
    transform: scale(1.05);
}

/* flatpickr disabled/blocked date styling to make unavailable dates obvious */
.flatpickr-day.flatpickr-disabled {
    background: #f8d7da !important; /* light red/pink */
    color: #721c24 !important; /* dark red text */
    border-radius: 6px;
}
.flatpickr-day.in-range {
    background: rgba(220,53,69,0.12) !important; /* light tint for ranges */
    color: #721c24 !important;
}

.calendar-legend {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
    font-size: 0.9rem;
    color: #495057;
}
.calendar-legend .box { width: 14px; height: 14px; border-radius: 3px; display:inline-block; }
.calendar-legend .box.unavailable { background: #f8d7da; border: 1px solid #f5c6cb; }
.calendar-legend .box.range { background: rgba(220,53,69,0.12); border: 1px solid rgba(220,53,69,0.15); }

.hotel-card .card-img-wrapper {
    overflow: hidden;
    position: relative;
}

.hotel-card .badge-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.hotel-card .card-body {
    padding: 25px;
}

.hotel-card .hotel-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.hotel-card .hotel-location {
    color: #6c757d;
    font-size: 0.9rem;
}

.hotel-card .hotel-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
}

.hotel-card .price-label {
    font-size: 0.8rem;
    color: #999;
}

/* City chips for filtering hotels */
.city-chip {
    border-radius: 50px;
    padding: 6px 14px;
    font-size: 0.85rem;
}
.city-chip.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-color: transparent;
}

/* WhatsApp buttons */
.whatsapp-btn {
    padding: 8px 12px;
    border-radius: 8px;
    color: #fff;
}
.whatsapp-btn i { color: #fff; }

.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    background: #25D366;
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.25);
    text-decoration: none;
}
.whatsapp-float i { font-size: 22px; }

/* Ensure dropdown menus appear above scrollable tables */
.table-responsive .dropdown-menu {
    z-index: 3000;
}

.room-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.room-card:hover {
    box-shadow: 0 15px 45px rgba(0,0,0,0.12);
}

.room-card .room-image {
    height: 200px;
    object-fit: cover;
}

.room-card .room-details {
    padding: 20px;
}

.room-card .room-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
}

.room-card .room-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.amenity-badge {
    background: var(--light-bg);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #555;
    display: inline-flex;
    align-items: center;
    margin: 3px;
}

.amenity-badge i {
    color: var(--secondary-color);
    margin-right: 6px;
}

.booking-form {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    position: sticky;
    top: 100px;
}

.booking-form .form-label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
}

.booking-form .form-control {
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    border-radius: 10px;
}

.booking-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 95, 122, 0.1);
}

.price-summary {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.price-summary .total-price {
    font-size: 2rem;
    font-weight: 700;
}

.about-section {
    background: linear-gradient(135deg, var(--dark-color), var(--primary-color));
    color: white;
    padding: 80px 0;
}

.about-section .feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-color);
    margin: 0 auto 20px;
}

.contact-section {
    padding: 80px 0;
}

.contact-info-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0,0,0,0.12);
}

.contact-info-card .icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 20px;
}

.gallery-item {
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 20px;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.confirmation-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    text-align: center;
}

.confirmation-box .success-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 30px;
}

.confirmation-box .booking-ref {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--light-bg);
    padding: 15px 30px;
    border-radius: 10px;
    display: inline-block;
}

.breadcrumb {
    background: transparent;
    padding: 15px 0;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--dark-color));
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
}

.star-rating {
    color: var(--gold-color);
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
}

.loading-spinner.active {
    display: block;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-box {
        margin-top: -40px;
        padding: 20px;
    }
    
    .booking-form {
        position: static;
        margin-top: 30px;
    }
}

/* Dashboard & bookings: show stat cards in 2x2 grid on small screens */
@media (max-width: 576px) {
    /* target the stat row which directly follows the page top-bar */
    .top-bar + .row.g-3.mb-4,
    /* dashboard uses g-4 spacing; include that selector too */
    .top-bar + .row.g-4.mb-4,
    /* fallback selector for other dashboards */
    .dashboard-stats-row,
    .stats-row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        align-items: stretch;
    }

    /* ensure the inner cards stretch and have consistent padding */
    .top-bar + .row.g-3.mb-4 .card,
    .top-bar + .row.g-4.mb-4 .card,
    .dashboard-stats-row .card,
    .stats-row .card {
        width: 100% !important;
        margin: 0 !important;
    }

    /* small visual tweak for the count number to remain visible and balanced */
    .top-bar + .row.g-3.mb-4 .card h4,
    .top-bar + .row.g-4.mb-4 .card h4,
    .dashboard-stats-row .card h4,
    .stats-row .card h4 {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }

    /* ensure the grid children (columns) don't keep bootstrap padding/margins */
    .top-bar + .row.g-4.mb-4 > [class*="col-"],
    .top-bar + .row.g-3.mb-4 > [class*="col-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
    }

    /* Make stat cards stretch and look consistent in each grid cell */
    .top-bar + .row.g-4.mb-4,
    .top-bar + .row.g-3.mb-4,
    .dashboard-stats-row,
    .stats-row {
        width: 100%;
        box-sizing: border-box;
        padding: 6px 8px;
    }

    .top-bar + .row.g-4.mb-4 .stat-card,
    .top-bar + .row.g-3.mb-4 .stat-card,
    .dashboard-stats-row .stat-card,
    .stats-row .stat-card {
        width: 100%;
        height: 100%;
        padding: 14px !important;
        display: flex;
        align-items: center;
        gap: 12px;
        border-radius: 12px;
    }

    /* Slightly reduce icon size and make value align nicely */
    .stat-card .stat-icon { width: 56px; height: 56px; font-size: 20px; }
    .stat-card .stat-value { font-size: 1.25rem; }
    .stat-card .stat-label { font-size: 0.95rem; }
}

/* Extra compact rules for very small phones */
@media (max-width: 420px) {
    .top-bar + .row.g-4.mb-4,
    .top-bar + .row.g-3.mb-4,
    .dashboard-stats-row,
    .stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        padding: 4px 6px;
    }

    .top-bar + .row.g-4.mb-4 > [class*="col-"],
    .top-bar + .row.g-3.mb-4 > [class*="col-"] {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    .top-bar + .row.g-4.mb-4 .stat-card,
    .top-bar + .row.g-3.mb-4 .stat-card,
    .dashboard-stats-row .stat-card,
    .stats-row .stat-card {
        padding: 10px !important;
        gap: 8px;
        border-radius: 10px;
    }

    .stat-card .stat-icon { width: 44px; height: 44px; font-size: 18px; }
    .stat-card .stat-value { font-size: 1rem; font-weight: 700; }
    .stat-card .stat-label { font-size: 0.85rem; color: #5b6b73; }

    /* prevent cards from appearing too tall by ensuring content wraps */
    .stat-card .stat-label, .stat-card .stat-value { white-space: normal; }
}

/* Make room action buttons stack and have spacing on small screens for better touch targets */
@media (max-width: 576px) {
    .room-card .room-details .btn {
        display: block !important;
        width: 100% !important;
        margin-bottom: 0.65rem !important;
    }
    .room-card .room-details .btn:last-child {
        margin-bottom: 0 !important;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

/* Footer: make all footer text white */
footer, footer * {
    color: #ffffff !important;
}

footer a {
    color: #ffffff !important;
}

footer .text-muted {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* -------------------------
   Site Preloader (luxury theme)
   ------------------------- */
#site-preloader {
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, #000000 0%, #111111 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .6s ease, visibility .6s ease;
}

#site-preloader .preloader-inner {
    position: relative;
    width: min(85vw, 420px);
    max-width: 480px;
    text-align: center;
    padding: 14px 18px;
    box-sizing: border-box;
}

.preloader-spinner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    width: clamp(84px, 18vw, 140px);
    height: clamp(84px, 18vw, 140px);
    border-radius: 50%;
    border: 6px solid rgba(212,175,55,0.08);
    z-index: 1;
}

.preloader-spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(#d4af37 0deg 60deg, transparent 60deg 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 14px), black calc(100% - 13px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 14px), black calc(100% - 13px));
    animation: preloader-rotate 2.2s linear infinite;
}

@keyframes preloader-rotate { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

.preloader-logo {
    position: relative;
    z-index: 3;
    color: #d4af37;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 4.6vw, 34px);
    letter-spacing: .06em;
    text-shadow: 0 6px 20px rgba(0,0,0,0.55);
    margin: 6px 0 0;
    opacity: 1;
}

.preloader-tag {
    position: relative;
    z-index: 3;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 300;
}

/* hide with fade */
#site-preloader.preloader-hide { opacity: 0; visibility: hidden; pointer-events: none; }

/* prevent scroll while active */
body.preloader-active { overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .preloader-spinner::after { animation: none; } }

/* Responsive admin: convert tables to card rows on small screens and tablets */
@media (max-width: 1199px) {
    .table-responsive thead { display: none; }
    .table-responsive table, .table-responsive tbody, .table-responsive tr, .table-responsive td { display: block; width: 100%; }
    .table-responsive tbody tr { margin-bottom: 12px; border: 1px solid #eee; border-radius: 10px; padding: 16px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,0.03); }
    .table-responsive td { padding: 6px 10px; border: none; border-bottom: 1px dashed #f0f0f0; }
    .table-responsive td:last-child { border-bottom: none; }
    .table-responsive td[data-label] { position: relative; padding-left: 140px; min-height: 40px; }
    .table-responsive td[data-label]::before {
        content: attr(data-label) ': '; 
        position: absolute; 
        left: 12px; 
        top: 50%; 
        transform: translateY(-50%);
        font-weight: 700; 
        color: #333; 
        width: 120px;
        white-space: nowrap; 
        overflow: hidden; 
        text-overflow: ellipsis;
    }
    /* compact actions row alignment */
    .table-responsive td[data-label="Actions"] { padding-left: 0; display: flex; flex-direction: row; align-items: center; gap:8px; flex-wrap: nowrap; }
    /* place the Actions label on its own line above the buttons */
    .table-responsive td[data-label="Actions"]::before { position: static; transform: none; top: auto; left: auto; width: auto; margin-bottom: 8px; display: block; content: 'Action'; }
    /* ensure buttons/icons don't overlap and have consistent sizing */
    .table-responsive td[data-label="Actions"] .btn,
    .table-responsive td[data-label="Actions"] .dropdown,
    .table-responsive td[data-label="Actions"] form {
        margin: 0 6px 6px 0;
    }
    .table-responsive td[data-label="Actions"] .btn {
        padding: 6px 8px;
        min-width: 36px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Adjust table card display on very small screens */
@media (max-width: 576px) {
    .table-responsive td[data-label] { padding-left: 120px; }
    .table-responsive td[data-label]::before { width: 100px; }
    .table-responsive td[data-label="Actions"]::before { width: auto; }
    
    /* Hide image navigation buttons on mobile */
    .prev-btn, .next-btn {
        display: none !important;
    }
}

/* Testimonials styles */
.testimonials {
    background: #f7f9fb;
}
.testimonial-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(13,110,253,0.06);
}
.testimonial-card .card-body {
    padding: 22px;
}
.testimonial-card p {
    color: #444;
    font-size: 0.98rem;
    line-height: 1.5;
}
.testimonial-card .rating {
    font-size: 0.95rem;
}
.testimonials .avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .testimonials .avatar { width:48px; height:48px; }
}
