:root {
    /* Brand Colors - Refined for Luxury */
    --color-primary: #111827;
    /* Deep Charcoal */
    --color-primary-light: #374151;
    --color-gold: #C5A059;
    /* Muted Metallic Gold */
    --color-gold-light: #E5C585;
    --color-cream: #FAFAF9;
    /* Warm Alabaster */
    --color-white: #FFFFFF;
    --color-text-main: #262626;
    --color-text-muted: #737373;
    --color-bg-subtle: #F5F5F4;
    --color-border: #E7E5E4;

    /* Functional Colors */
    --color-success: #059669;
    --color-warning: #D97706;
    --color-error: #DC2626;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;

    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;
    --spacing-2xl: 6rem;
    --container-width: 1280px;
    --border-radius: 4px;
    /* Sharper corners for premium feel */
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-white);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 500;
    /* Elegant weight */
    line-height: 1.2;
    color: var(--color-primary);
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-2xl) 0;
}

.text-center {
    text-align: center;
}

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

.text-muted {
    color: var(--color-text-muted);
}

/* Buttons & Interactive */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-gold);
    border-color: var(--color-gold);
    color: var(--color-white);
    transform: translateY(-1px);
}

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

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

.btn-gold {
    background-color: var(--color-gold);
    color: var(--color-white);
}

.btn-gold:hover {
    background-color: #B08D4C;
}

/* Cards */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-color: var(--color-gold-light);
}

/* Form Elements */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
}

.form-input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: 2px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Specialized Components */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 99px;
}

/* Luxury Overlays */
.overlay-dark {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
}

/* Nav Specifics */
.nav-link {
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.nav-link:hover {
    color: var(--color-gold);
}

/* Horizontal Scroll Carousel Refinements */
.carousel-wrapper {
    position: relative;
    width: 100%;
    margin-top: 2rem;
}

.scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 2.5rem;
    padding: 1.5rem 0.5rem 3rem 0.5rem;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    width: 100%;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.scroll-card {
    flex: 0 0 calc(50% - 1.25rem);
    /* Show 2 cards at a time on desktop */
    min-width: 450px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    scroll-snap-align: start;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: left;
    display: flex;
    flex-direction: column;
}

.scroll-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--color-gold-light);
}

.scroll-card-img {
    width: 100%;
    height: 400px;
    /* Increased height for better proportionality */
    object-fit: cover;
    border-bottom: 1px solid var(--color-border);
    transition: transform 0.6s ease;
}

.scroll-card:hover .scroll-card-img {
    transform: scale(1.03);
}

.scroll-card-content {
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.scroll-card h4 {
    font-size: 0.9rem;
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-gold);
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.scroll-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    color: var(--color-primary);
    font-family: var(--font-serif);
    line-height: 1.3;
}

.scroll-card p {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.8;
}

/* Nav Arrows */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
    padding: 0 1rem;
}

.nav-arrow {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-arrow:hover {
    background: var(--color-gold);
    color: white;
    border-color: var(--color-gold);
}

@media (max-width: 1024px) {
    .scroll-card {
        flex: 0 0 85%;
        min-width: unset;
    }
}

/* ============================================================
   MOBILE RESPONSIVENESS
   The header is rendered by app.js for every page and was built
   at desktop widths only: a 130px-tall logo lockup and a nav row
   with 3rem gaps pushed the document to ~667px wide on a 390px
   phone. Anyone arriving from a printed QR code lands on a page
   they have to pinch and pan. These rules are additive - they
   override the inline styles app.js writes, without touching it.
   ============================================================ */

@media (max-width: 900px) {

    /* --- Header --- */
    #main-nav .container {
        height: auto !important;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    #main-nav img {
        height: 38px !important;
    }

    #main-nav .container > a:first-child > div {
        padding-left: 0.75rem !important;
    }

    #main-nav .container > a:first-child span:first-child {
        font-size: 1.05rem !important;
    }

    #main-nav .container > a:first-child span:last-child {
        font-size: 0.68rem !important;
        letter-spacing: 0.14em !important;
    }

    #main-nav ul {
        order: 2;
        width: 100%;
        gap: 1.25rem !important;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nav-link {
        font-size: 0.95rem;
    }

    #main-nav .container > div:last-child {
        order: 3;
        gap: 0.6rem !important;
        margin-left: auto;
    }

    #main-nav .btn {
        padding: 0.55rem 1.1rem !important;
        font-size: 0.9rem !important;
    }

    /* --- Type and rhythm --- */
    .section {
        padding: 3rem 0;
    }

    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* --- Any fixed multi-column grid collapses --- */
    #featured-journeys,
    #umrah-journeys {
        grid-template-columns: 1fr !important;
        gap: 1.75rem !important;
    }

    /* --- Footer --- */
    #main-footer .container > div:first-child {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
        padding-top: 2.5rem !important;
    }

    #main-footer .container > div:last-child {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        margin-top: 2.5rem !important;
    }

    /* --- Cards that were laid out side by side --- */
    .card[style*="flex-direction: row"] {
        flex-direction: column !important;
    }

    .card[style*="flex-direction: row"] > div {
        flex: 1 1 auto !important;
        min-height: 0 !important;
    }

    .card[style*="flex-direction: row"] img {
        height: 220px !important;
    }

    .scroll-card-content {
        padding: 1.75rem !important;
    }
}

@media (max-width: 560px) {
    .card[style*="padding: 3rem"] {
        padding: 1.75rem !important;
    }

    .btn {
        padding: 0.85rem 1.5rem;
    }
}
