:root {
    --primary-color: #a94c4c;
    /* Bright Maroon */
    --primary-hover: #924444;
    /* Medium Maroon */
    --bg-dark: #120505;
    /* Very Deep Warm Black */
    --bg-card: #1E0A0A;
    /* Dark Warm Card Bg */
    --text-light: #F4F1EC;
    /* Warm White */
    --text-muted: #c17171;
    /* Light Maroon/Pinkish */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
    --glass: rgba(169, 76, 76, 0.1);
    --border-light: rgba(169, 76, 76, 0.3);
}

/* Scroll Performance Optimizations */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-overflow-scrolling: touch;
    /* Enable momentum scrolling on iOS */
    text-rendering: optimizeLegibility;
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: var(--font-body);
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.8;
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: #6d3636;
    /* Darkest Maroon */
    border-radius: 4px;
}

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

/* Utilities */
.h-font {
    font-family: var(--font-heading);
}

.font-din {
    font-family: 'Barlow Condensed', sans-serif !important;
    letter-spacing: 1px;
    font-weight: 700;
    text-transform: uppercase;
}

.text-gold {
    color: var(--primary-color) !important;
}

.text-real-gold {
    color: #D4AF37 !important;
    /* Authentic Gold */
}

/* Keeping class name for compatibility but styling as Maroon */
.text-maroon {
    color: var(--primary-color) !important;
}

.bg-dark-custom {
    background-color: var(--bg-dark) !important;
}

.bg-maroon {
    background-color: var(--primary-color) !important;
}

/* Navbar */
.navbar {
    background-color: rgba(12, 4, 4, 0.98) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: 0.8rem 0;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.navbar-brand {
    color: var(--text-light) !important;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 400;
    font-size: 0.95rem;
    margin: 0 15px;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    font-weight: 500;
    padding: 0 28px;
    height: 48px;
    /* Locked height */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    letter-spacing: 0.3px;
    text-transform: none !important;
    font-size: 0.95rem;
    box-shadow: none !important;
}

.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    /* Removed translateY for static feel */
}

.btn-outline-light {
    border-color: var(--border-light);
    color: var(--text-light);
    border-radius: 8px;
    padding: 0 28px;
    height: 48px;
    /* Locked height matches primary */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.3px;
    font-size: 0.95rem;
}

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

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    contain: content;
}

.card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.card-img-top {
    height: 300px;
    object-fit: cover;
    filter: grayscale(10%);
    transition: filter 0.5s ease;
}

.card:hover .card-img-top {
    filter: grayscale(0%);
}

.card-body {
    padding: 2rem;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background-size: cover;
    background-position: center top;
    /* Pinned to top to prevent jumps */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(18, 5, 5, 0.4), rgba(18, 5, 5, 0.95));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: #E0E0E0;
    font-weight: 300;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Section Titles */
.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-subtitle {
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

/* Footer */
.footer {
    background-color: #0A0202;
    padding: 80px 0 30px;
    border-top: 1px solid var(--border-light);
}

.footer h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.footer-link {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    transition: padding-left 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
    padding-left: 10px;
}

/* Auth Pages (Login/Register) */
.auth-wrap {
    position: relative;
    z-index: 1;
}

.auth-card {
    background: rgba(22, 7, 7, 0.95);
    border: 1px solid rgba(169, 76, 76, 0.3);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

@media (min-width: 992px) {
    .auth-card {
        background: rgba(30, 10, 10, 0.6);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
}

.auth-card:hover {
    border-color: var(--primary-color);
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    background: rgba(169, 76, 76, 0.2);
    border: 1px solid rgba(169, 76, 76, 0.3);
    border-radius: 999px;
    font-weight: 700;
    color: var(--primary-color);
}

/* Form Controls Override */
.form-control {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-light) !important;
    border-radius: 12px !important;
    font-size: 1.1rem;
    /* Consistent large font */
    padding: 12px 18px;
}

.input-group {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light) !important;
    /* Single outer border */
    background-color: rgba(255, 255, 255, 0.05);
    /* Match form-control bg */
}

.input-group .form-control,
.input-group .input-group-text,
.input-group .btn {
    border: none !important;
    /* Remove internal borders */
    background-color: transparent !important;
    /* Transparent to show parent bg */
    border-radius: 0 !important;
    box-shadow: none !important;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(169, 76, 76, 0.25) !important;
}

/* Ensure no double shadow or clipping when inside group */
.input-group .form-control:focus {
    box-shadow: none !important;
}

.input-group-text {
    border-radius: 0 !important;
    background-color: transparent !important;
    border: none !important;
    color: var(--primary-color) !important;
    font-size: 1.2rem;
}

/* Specific highlight when group is focused */
.input-group:focus-within {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.25rem rgba(169, 76, 76, 0.25) !important;
}

/* Responsive */
@media (max-width: 991px) {
    .hero-title {
        font-size: 4rem;
    }

    .navbar-collapse {
        background-color: rgba(18, 5, 5, 0.98);
        padding: 20px;
        margin-top: 15px;
        border: 1px solid var(--border-light);
        border-radius: 20px;
        text-align: left;
    }

    .navbar-nav .nav-link {
        margin: 0;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }

    .navbar-nav .d-flex {
        margin-top: 15px;
        flex-direction: column;
        gap: 10px;
    }

    .navbar-nav .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 1rem;
        /* Slightly smaller baseline */
        font-weight: 300;
        letter-spacing: 0.1px;
    }

    .booking-instruction {
        font-size: 0.85rem !important;
        /* Specific decrease for the instruction text */
        line-height: 1.5;
    }

    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: 80px 0;
    }

    .hero-title {
        font-size: 4rem;
        line-height: 1.1;
    }

    .hero-subtitle {
        font-size: 1.3rem;
        line-height: 1.6;
        margin-bottom: 2.5rem;
    }

    .card-img-top {
        height: 250px;
    }

    .section-title {
        font-size: 3rem;
    }

    .card-body {
        padding: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 3rem;
        line-height: 1.1;
        margin-bottom: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 2.5rem;
        padding: 0 10px;
    }

    .btn-primary,
    .btn-outline-light {
        width: 100%;
        margin-bottom: 15px;
        padding: 16px 20px;
        font-size: 1rem;
        font-weight: 700;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section-title {
        font-size: 2.5rem;
    }

    /* Auth & Booking Mobile Styles */
    .auth-card {
        margin: 0;
        border-radius: 20px;
        border: 1px solid rgba(169, 76, 76, 0.3);
        margin-bottom: 20px;
    }

    .auth-card .p-4,
    .auth-card .p-md-5 {
        padding: 1rem !important;
    }

    .auth-card h4 {
        font-size: 1.8rem;
    }

    .form-control,
    .btn {
        font-size: 0.95rem !important;
        padding: 0 12px !important;
        height: 48px !important;
        /* Force height symmetry */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* --- Time Slots Fix --- */
    #jam-container {
        display: flex;
        flex-wrap: wrap;
    }

    .time-btn {
        width: 100% !important;
        padding: 0 !important;
        font-size: 0.95rem !important;
        height: 48px !important;
        border-radius: 8px;
    }

    /* --- Form Labels --- */
    .form-label {
        font-size: 1rem !important;
        letter-spacing: 0.5px;
    }

    .navbar-brand {
        font-size: 1.2rem !important;
        max-width: 75%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .navbar .container-fluid {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* --- Custom Additions for Prices & Alerts --- */
.bg-gold {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.5em 0.8em;
}

.alert-custom {
    background-color: rgba(169, 76, 76, 0.15);
    border: 1px solid rgba(169, 76, 76, 0.3);
    color: #F4F1EC;
}

/* Remove Bootstrap Blue Focus Ring */
.btn:focus,
.btn:active:focus,
.btn-check:focus+.btn,
.btn.focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(169, 76, 76, 0.25) !important;
    border-color: var(--primary-color) !important;
    outline: none !important;
}

/* --- MOBILE PERFORMANCE OVERDRIVE --- */
@media (max-width: 768px) {
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }

    .navbar,
    .auth-card,
    .card,
    .bg-card,
    .status-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: var(--bg-card) !important;
    }

    .hero-section {
        background-attachment: scroll !important;
    }

    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        position: relative;
    }

    [data-aos] {
        transition-duration: 350ms !important;
    }
}

.selection-box {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: 20px !important;
    padding: 1rem !important;
    /* Slightly tighter for better balance */
    margin-bottom: 2rem;
    width: 100%;
}

.selection-box .row {
    margin-bottom: -0.75rem !important;
    /* Counteract child margins */
    width: auto;
    margin-left: -0.375rem !important;
    margin-right: -0.375rem !important;
}

.selection-box .col-4,
.selection-box .col-12,
.selection-box .col-md-3 {
    padding: 0 0.375rem !important;
    margin-bottom: 0.75rem !important;
}

.selection-box .btn {
    width: 100% !important;
    height: 48px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    font-size: 0.9rem !important;
    transition: background-color 0.2s ease, border-color 0.2s ease !important;
    /* Only color transition */
    transform: none !important;
    /* No movement */
}

/* Ensure no movement on active/focus */
.selection-box .btn:active,
.selection-box .btn:focus {
    transform: none !important;
}

.form-label.text-gold {
    margin-bottom: 0.75rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center horizontally */
}