/*
grunge.css
Name: Pragyan Timalsina
UID: 25024650
TBC ID: 11499
This stylesheet contains all the visual styling for the World Hotels website, including dark/light mode themes, animations, and responsive card layouts.
*/

/* importing fancy fonts from google for our headers and body text */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700&family=Cormorant+Garamond:wght@400;600;700&family=Montserrat:wght@300;400;500;600&display=swap');

/* this animation makes things fade in and slide up from the bottom */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* this one is for the hero slideshow to zoom in and fade the images */
@keyframes slideAnimation {
    0% { opacity: 0; transform: scale(1); }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 0; }
}

/* default variables for the dark theme mode */
:root {
    --bg-body: #050505;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1a1a1a 0%, #000000 100%);
    --text-main: #ffffff;
    --text-on-card: #e0e0e0;
    --text-muted: #b0b0b0;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --border: rgba(255, 255, 255, 0.2);
    --accent: #d4af37;
    --accent-gradient: linear-gradient(135deg, #d4af37 0%, #f3cf55 50%, #b8860b 100%);
    --glass-bg: rgba(20, 20, 20, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.15);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.8);
    --nav-bg: rgba(0, 0, 0, 0.9);
}

/* changing variables when the light theme is active */
[data-theme="light"] {
    --bg-body: #f9f9f9;
    --bg-gradient: linear-gradient(135deg, #fdfbf7 0%, #eef2f3 100%);
    --text-main: #0a1128;
    --text-on-card: #0a1128;
    --text-muted: #666666;
    --bg-secondary: #ffffff;
    --text-primary: #000000;
    --border: #cccccc;
    --accent: #b8860b;
    --accent-gradient: linear-gradient(135deg, #b8860b 0%, #d4af37 100%);
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-border: 1px solid rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.95);
}

/* setting the main body background and font */
body {
    background-color: var(--bg-body);
    background-image: var(--bg-gradient);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    transition: all 0.5s ease;
    min-height: 100vh;
}

/* using the cinzel font for our big titles */
h1, h2, h3, .navbar-brand, .grunge-text, .cinzel {
    font-family: 'Cinzel Decorative', serif;
    font-weight: 700;
}

/* using the cormorant font for subheadings */
h4, h5, h6 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* making sure titles in cards stay visible in both themes */
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6 {
    color: var(--text-on-card) !important;
}

/* navigation bar styling with a blur effect */
.navbar {
    background-color: var(--nav-bg) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--accent);
    padding: 1.2rem 0;
    position: relative;
    z-index: 1050 !important;
    transition: padding 0.3s ease, background-color 0.3s ease;
}

/* adjusting navbar size when user scrolls down */
.navbar.scrolled {
    padding: 0.8rem 0 !important;
    background-color: rgba(0, 0, 0, 0.95) !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* styling for the brand name in the top left */
.navbar-brand {
    font-size: 2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* making nav links look nice and gold on hover */
.nav-link {
    color: var(--text-main) !important;
    font-weight: 600;
    margin: 0 15px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.nav-link:hover {
    color: var(--accent) !important;
}

/* dropdown menu styling in the header */
.dropdown-menu {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--accent) !important;
    z-index: 1051 !important;
}

.dropdown-item { color: var(--text-primary) !important; }
.dropdown-item:hover { background-color: var(--accent) !important; color: #000 !important; }

/* hero section layout for the home page */
.hero-section {
    position: relative;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
}

.hero-slideshow {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 0;
}

/* setting up the three images for the slideshow */
.slide {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; animation: slideAnimation 15s infinite;
}
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }

/* dark overlay for the hero section so text is clear */
.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, var(--bg-body) 100%);
    z-index: 1;
}

/* box containing the main welcome message */
.hero-content {
    position: relative; z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.5);
    padding: 4rem; border-radius: 4px;
    max-width: 1000px; width: 90%; text-align: center;
}

.hero-content h1, .hero-content p { color: #ffffff !important; }

/* styling for input fields and text areas */
.form-control, .form-select, textarea {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 12px;
}

/* making sure placeholder text isn't too dark */
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1;
}

/* light mode overrides for our forms */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select,
[data-theme="light"] textarea {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
}

[data-theme="light"] .form-control::placeholder {
    color: rgba(0, 0, 0, 0.5) !important;
}

/* fixing the background color for select dropdowns */
select option { background-color: #1a1a1a; color: #fff; }
[data-theme="light"] select option { background-color: #fff; color: #000; }

/* fixing the annoying autofill background color in chrome */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-body) inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* glass effect styling for our cards */
.hotel-card, .card {
    background: var(--glass-bg);
    border: var(--glass-border);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    transition: all 0.4s ease;
    color: var(--text-on-card);
}

/* making sure muted text is readable inside cards */
.card .text-muted, .hotel-card .text-muted, .small {
    color: var(--text-muted) !important;
}

/* lifting cards up when hovered */
.hotel-card:hover, .card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

/* destination card setup for the home page city grid */
.destination-card {
    position: relative; border-radius: 12px; overflow: hidden;
    height: 450px; cursor: pointer; box-shadow: var(--glass-shadow);
    transition: transform 0.5s ease; border: none; background-color: #000;
}

.destination-card:hover { transform: translateY(-10px) scale(1.02); }

/* adding a zoom effect to destination images */
.destination-img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s ease;
}

.destination-card:hover .destination-img { transform: scale(1.15); }

/* overlay for the city name on the destination cards */
.destination-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 2rem; color: white; z-index: 10;
}

/* main gold/warning buttons styling */
.btn-gold, .btn-warning {
    background: var(--accent-gradient);
    color: #000; border: none; font-weight: 800;
    text-transform: uppercase; letter-spacing: 2px;
    padding: 12px 30px;
}

/* glowing effect when hovering on buttons */
.btn-gold:hover, .btn-warning:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.6);
}

.btn-outline-warning { border-color: var(--accent); color: var(--accent); }
.btn-outline-warning:hover { background-color: var(--accent); color: #000; }

/* fixing secondary buttons inside cards */
.hotel-card .btn-outline-light, .card .btn-outline-light {
    border: 1px solid var(--accent) !important;
    color: var(--accent) !important;
}

.hotel-card .btn-outline-light:hover, .card .btn-outline-light:hover {
    background-color: var(--accent) !important;
    color: #000 !important;
}

/* utility classes for colors and spacing */
.text-warning { color: var(--accent) !important; }
.badge { padding: 8px 12px; font-weight: 500; letter-spacing: 1px; }

.tracking-wide { letter-spacing: 0.1em; }
.bg-black { background-color: #000 !important; }
.border-secondary { border-color: rgba(255, 255, 255, 0.2) !important; }

/* light mode overrides for utility classes */
[data-theme="light"] .bg-black { background-color: #ffffff !important; color: #000; }
[data-theme="light"] .border-secondary { border-color: rgba(0, 0, 0, 0.2) !important; }

/* popular destinations hover zoom logic */
.hover-zoom-card {
    overflow: hidden;
    border: 1px solid #333;
    transition: border-color 0.3s ease;
}

.hover-zoom-card img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-zoom-card:hover img {
    transform: scale(1.1);
}

.hover-zoom-card:hover {
    border-color: var(--accent);
}

/* styling for the tour dates list section */
.tour-list-container {
    background-color: #111;
    border: 1px solid #333;
    padding: 2rem;
    position: relative;
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.5);
}

.tour-item {
    border-bottom: 1px solid #333;
    transition: background 0.2s ease, padding-left 0.2s ease;
    cursor: pointer;
}

.tour-item:hover {
    background: var(--accent);
    padding-left: 10px;
}

/* making sure text turns black when background turns yellow on hover */
.tour-item:hover .tour-name,
.tour-item:hover .tour-action,
.tour-item:hover span,
.tour-item:hover small {
    color: #000 !important;
}

.tour-date {
    font-family: monospace;
    color: #666;
}

.tour-name {
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 1.1rem;
}

/* a section dedicated to fixing visibility issues found during testing */
.alert-dark {
    background-color: rgba(30, 30, 30, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    opacity: 1 !important;
}

[data-theme="light"] .alert-dark {
    background-color: #f0f0f0 !important;
    border: 1px solid #ccc !important;
}

.text-duration {
    color: #ffffff !important;
    font-weight: 600;
}

[data-theme="light"] .text-duration {
    color: #000000 !important;
}

.card-body p, .card-body span {
    color: var(--text-on-card);
}

label.text-muted {
    color: var(--text-muted) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.destination-overlay h4,
.destination-overlay h5,
.destination-overlay p {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* fixing footer visibility for both themes */
body, .text-muted {
    color: #e0e0e0 !important;
}

[data-theme="light"] body,
[data-theme="light"] .text-muted {
    color: #333333 !important;
}

.card-body h3.fw-bold {
    color: var(--accent) !important;
}

.form-label, label {
    color: #ffffff !important;
}

[data-theme="light"] .form-label,
[data-theme="light"] label {
    color: #000000 !important;
}

/* making date picker icons white in dark mode */
input[type="date"] {
    color-scheme: dark;
    color: white !important;
}

[data-theme="light"] input[type="date"] {
    color-scheme: light;
    color: black !important;
}

/* luxury card styling for hotel details */
.room-card {
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-top: 3px solid rgba(150, 150, 150, 0.3);
    transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1), box-shadow 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.room-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(255, 255, 255, 0.3);
}

.room-img-container {
    height: 280px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.room-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.room-card:hover .room-img-container img {
    transform: scale(1.08);
}

/* premium room styles with gold accents */
.premium-card {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.95) 0%, #000000 100%);
    border-top: 3px solid var(--accent);
    border-bottom: 1px solid var(--accent);
}

[data-theme="light"] .premium-card {
    background: linear-gradient(180deg, #fffcf5 0%, #fdfbf0 100%);
    border: 1px solid #d4af37;
    border-top: 3px solid var(--accent);
}

.room-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.5rem;
    letter-spacing: 1px;
    margin-bottom: 5px;
    color: var(--text-main);
}

.premium-card .room-title {
    color: var(--accent);
}

[data-theme="light"] .premium-card .room-title {
    color: #000;
}

.price-display {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-main);
}

.amenity-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: rgba(125, 125, 125, 0.1);
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
    margin-bottom: 6px;
    border-radius: 2px;
}

.amenity-badge i {
    color: var(--accent);
    margin-right: 8px;
}

/* extra light mode overrides for specific sections */
.sticky-sidebar {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
}

[data-theme="light"] .bg-black {
    background-color: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    color: #000000 !important;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05) !important;
}

[data-theme="light"] .sticky-sidebar,
[data-theme="light"] .card[style*="background: #111"],
[data-theme="light"] .card[style*="background: #0a0a0a"] {
    background-color: #ffffff !important;
    border-color: #e0e0e0 !important;
    color: #000000 !important;
}

[data-theme="light"] .sticky-sidebar h5,
[data-theme="light"] .sticky-sidebar h4,
[data-theme="light"] .sticky-sidebar li,
[data-theme="light"] .sticky-sidebar span,
[data-theme="light"] .sticky-sidebar i {
    color: #1a1a1a !important;
}

[data-theme="light"] h3.text-white,
[data-theme="light"] h3.cinzel,
[data-theme="light"] .text-white {
    color: #000000 !important;
}

[data-theme="light"] .opacity-75,
[data-theme="light"] .text-light,
[data-theme="light"] .lead {
    color: #444444 !important;
    opacity: 1 !important;
}

[data-theme="light"] .text-muted,
[data-theme="light"] .small {
    color: #555555 !important;
}

[data-theme="light"] .hero-content h1,
[data-theme="light"] .hero-content p,
[data-theme="light"] .destination-overlay h1,
[data-theme="light"] .destination-overlay h2,
[data-theme="light"] .destination-overlay h3,
[data-theme="light"] .destination-overlay p,
[data-theme="light"] .destination-overlay span,
[data-theme="light"] .destination-overlay i {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.9);
}

[data-theme="light"] .hotel-card,
[data-theme="light"] .bg-dark,
[data-theme="light"] .bg-black,
[data-theme="light"] .card.bg-dark,
[data-theme="light"] .card.bg-black {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid #e0e0e0 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05) !important;
}

[data-theme="light"] .hotel-card h3,
[data-theme="light"] .hotel-card h4,
[data-theme="light"] .hotel-card h5,
[data-theme="light"] .card-title {
    color: #0a1128 !important;
}

[data-theme="light"] .text-muted,
[data-theme="light"] .small,
[data-theme="light"] .hotel-card .text-muted,
[data-theme="light"] .hotel-card i {
    color: #555555 !important;
}

[data-theme="light"] .sticky-sidebar {
    background-color: #ffffff !important;
    border-color: #dcdcdc !important;
}

[data-theme="light"] .sticky-sidebar li,
[data-theme="light"] .sticky-sidebar span,
[data-theme="light"] .sticky-sidebar div,
[data-theme="light"] .sticky-sidebar i:not(.text-warning) {
    color: #1a1a1a !important;
}

[data-theme="light"] .text-warning {
    color: #b8860b !important;
}

[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #cccccc !important;
}

[data-theme="light"] .destination-card h3,
[data-theme="light"] .destination-card h4,
[data-theme="light"] .destination-card h5,
[data-theme="light"] .destination-card p,
[data-theme="light"] .destination-card span,
[data-theme="light"] .destination-card i,
[data-theme="light"] .destination-card .text-white {
    color: #ffffff !important;
    text-shadow: 0 2px 5px rgba(0,0,0,0.9);
}

/* settings for when the user wants to print the page */
@media print {
    body * {
        visibility: hidden;
        background: none !important;
    }

    #receipt-box, #receipt-box * {
        visibility: visible;
    }

    #receipt-box {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        box-shadow: none !important;
        border: 1px solid #000;
        color: #000 !important;
        background: white !important;
    }

    .btn, .navbar, .d-print-none {
        display: none !important;
    }

    #receipt-box .text-warning {
        color: #000 !important;
        font-weight: bold;
    }

    #receipt-box .bg-black {
        background: transparent !important;
        border: 1px solid #ddd !important;
    }
}