﻿/* ===== Hero ===== */
.home {
    font-family: "Cairo", sans-serif;
}

    .home p,
    .home h1,
    .home h2,
    .home h3,
    .home input,
    .home button,
    .home .cat-card,
    .home .section-desc,
    .home .hero-subtitle {
        line-height: 1.6;
        letter-spacing: 0.02em;
        word-spacing: 0.16em;
    }

    .home p {
        margin-bottom: 2em;
    }

    .home .hero-subtitle,
    .home .section-desc,
    .home .hiw-card p {
        font-size: 1rem;
    }

    .home .cat-card,
    .home .cat-card .link-underline,
    .home .how-it-works a {
        text-decoration: underline;
        text-underline-offset: 0.15em;
    }

.hero {
    background: var(--maroon);
    padding: 22px 0 60px;
}

.hero-top .btn-login {
    border: 1px solid rgba(255,255,255,.7);
    color: #fff;
    border-radius: 12px;
    padding: 6px 14px;
    font-weight: 600;
}

.hero-top .hero-nav-link {
    color: #fff;
    opacity: .85;
    text-decoration: none;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 12px;
}

    .hero-top .hero-nav-link.active {
        background: rgba(255,255,255,.12);
    }

.hero-logo {
    height: 36px;
}

.hero-title {
    font-weight: 700;
    letter-spacing: .3px;
    font-size: clamp(1.75rem, 1.55rem + 0.8vw, 2.125rem);
    line-height: 1.35;
}

.hero-subtitle {
    margin-top: .25rem;
    font-size: 1rem;
    line-height: 1.6;
}

.hero-search {
    position: relative;
    max-width: 850px;
}

.hero-search-btn {
    position: absolute;
    inset-inline-start: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    color: #8A1538;
    font-size: 20px;
}

.home :is(a, button, input, [role="button"]):focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.28);
}

.home :is(input, .hero-input):focus-visible {
    border-color: #8A1538 !important;
}

/* Visual styling ONLY – direction & padding come from es-search__input in site.css */
.hero-input {
    background: #fff;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 12px;
}

/* ===== Sections ===== */
.section-title {
    font-size: clamp(1.5rem, 1.35rem + 0.5vw, 1.875rem);
    font-weight: 800;
    line-height: 1.4;
}

.section-desc {
    margin-top: .25rem;
    font-size: 1rem;
    line-height: 1.6;
}

/* ===== How it works ===== */
.hiw-card {
    padding: 20px;
    background-color: #FCF9FA;
}

.hiw-ill {
    width: 160px;
    height: auto;
}

/* ===== CTA button ===== */
.btn-outline-maroon {
    border: 1px solid var(--maroon,#8A1538);
    color: var(--maroon,#8A1538);
    border-radius: 10px;
}

    .btn-outline-maroon:hover {
        background: var(--maroon,#8A1538);
        color: #fff;
        text-decoration: none;
    }

/* ===== Categories ===== */
.cat-card {
    padding: 22px 16px;
    border: 1px solid #D3BBC2;
    transition: .2s ease;
    border-radius: 12px;
    text-align: start;
}

    .cat-card:hover {
        border-color: #8A1538;
        transform: translateY(-2px);
    }

        .cat-card:hover .fw-bold,
        .cat-card:hover .link-underline,
        .cat-card:focus-visible .fw-bold,
        .cat-card:focus-visible .link-underline {
            text-decoration: underline;
            text-underline-offset: 2px;
        }



/* === Categories carousel tweaks === */
.categories .cat-card {
    min-height: 180px;
    padding: 20px;
    transition: border-color .2s ease, transform .2s ease;
}

    .categories .cat-card:hover {
        border-color: var(--maroon);
        transform: translateY(-2px);
    }

/* viewport + peek masks */
.cat-carousel-viewport {
    overflow: hidden;
}

.cat-mask {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    pointer-events: none;
    z-index: 2;
    display: none; /* hidden on small screens */
}

@media (min-width: 992px) {
    .cat-mask {
        display: block;
    }

    .cat-mask-start {
        right: -1px;
        background: linear-gradient(270deg, rgba(252,249,250,1) 0%, rgba(252,249,250,0) 100%);
    }

    .cat-mask-end {
        left: -1px;
        background: linear-gradient(90deg, rgba(252,249,250,1) 0%, rgba(252,249,250,0) 100%);
    }
}

/* controls */
.cat-control {
    width: 44px;
    height: 44px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--maroon);
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
}

    .cat-control i {
        font-size: 1.25rem;
        line-height: 44px;
    }

.carousel-control-prev.cat-control {
    right: -6px;
    left: auto;
}

.carousel-control-next.cat-control {
    left: -6px;
    right: auto;
}

/* tighter container gutters on big screens so cards “peek” */
@media (min-width: 1200px) {
    .categories .container {
        padding-inline: 2rem;
    }
}

/* make it feel draggable */
#catCarousel .carousel-inner {
    cursor: grab;
    user-select: none;
}

#catCarousel.dragging .carousel-inner {
    cursor: grabbing;
}

/* ===== DARK MODE - Page Specific Only ===== */

/* Hero section */
html.dark-mode .hero {
    background: var(--maroon);
}

/* Section titles - WHITE (multiple selectors for higher specificity) */
html.dark-mode .section-title.fw-bold.text-dark,
html.dark-mode .section-title.fw-bold,
html.dark-mode .section-title.text-dark,
html.dark-mode .section-title {
    color: #ffffff !important;
}

/* Section descriptions - YELLOW */
html.dark-mode .section-desc {
    color: var(--accent) !important;
}

/* Hero content */
html.dark-mode .hero-title {
    color: #ffffff !important;
}

html.dark-mode .hero-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
}

html.dark-mode .home :is(a, button, input, [role="button"]):focus-visible {
    outline: 3px solid #E6E504;
    box-shadow: 0 0 0 4px rgba(230, 229, 4, 0.24);
}

html.dark-mode .home :is(input, .hero-input):focus-visible {
    border-color: #E6E504 !important;
}

/* How it works section background */
html.dark-mode .hiw-card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border-primary);
}

/* Category cards */
html.dark-mode .cat-card {
    background: var(--bg-card);
    border-color: var(--border-primary);
}

    html.dark-mode .cat-card:hover {
        border-color: var(--maroon);
    }

    /* Category card titles - WHITE */
    html.dark-mode .cat-card h5,
    html.dark-mode .cat-card h6,
    html.dark-mode .cat-card .card-title {
        color: #ffffff !important;
    }

    /* Category card descriptions - YELLOW */
    html.dark-mode .cat-card p,
    html.dark-mode .cat-card .card-text {
        color: var(--accent) !important;
    }

/* Carousel controls */
html.dark-mode .cat-control {
    background: var(--bg-card);
    border-color: var(--border-primary);
    color: var(--maroon);
}

    html.dark-mode .cat-control:hover {
        background: var(--bg-secondary);
    }

/* Carousel masks for dark mode */
@media (min-width: 992px) {
    html.dark-mode .cat-mask-start {
        background: linear-gradient(270deg, #1a1a1a 0%, rgba(26,26,26,0) 100%);
    }

    html.dark-mode .cat-mask-end {
        background: linear-gradient(90deg, #1a1a1a 0%, rgba(26,26,26,0) 100%);
    }
}

/* Buttons */
html.dark-mode .btn-outline-maroon {
    border-color: var(--maroon);
    color: #ffffff;
}

    html.dark-mode .btn-outline-maroon:hover {
        background: var(--maroon);
        color: #ffffff;
    }
