/* ==========================================================================
   Asian Noodle Garden - custom styles
   Tailwind handles layout/spacing. This file holds the bits Tailwind can't:
   component classes, overlays, and mobile-specific fixes.
   ========================================================================== */

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Open Sans', sans-serif;
    /* clip (not hidden) so the sticky header keeps working */
    overflow-x: clip;
}

/* Stop the sticky header from covering anchor targets */
section[id] {
    scroll-margin-top: 84px;
}

/* Lock background scroll while the mobile drawer is open */
body.menu-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --------------------------------------------------- Accessibility */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    background: #2D7A3A;
    color: #fff;
    padding: 12px 20px;
    font-size: 14px;
}
.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 2px solid #2D7A3A;
    outline-offset: 2px;
}

/* Hide scrollbar on the horizontally scrollable top bar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* --------------------------------------------------- Navigation */
.nav-link { position: relative; }
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2D7A3A;
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }

/* Mobile drawer links - 48px tall so they are easy to tap */
.mobile-link {
    display: block;
    padding: 14px 20px;
    min-height: 48px;
    color: rgba(29, 58, 38, 0.75);
    font-size: 15px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(29, 58, 38, 0.09);
    text-align: left;
    transition: background 0.2s, color 0.2s;
}
.mobile-link:hover,
.mobile-link:active {
    color: #1D3A26;
    background: rgba(45, 122, 58, 0.12);
}
[data-accordion][aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}

/* --------------------------------------------------- Hero */
.top-bar-bg { background-color: #2D7A3A; }

.hero-overlay {
    background: linear-gradient(to right,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.5) 60%,
        rgba(0, 0, 0, 0.2) 100%);
}
/* On phones the text sits over the middle of the photo, so darken evenly */
@media (max-width: 767px) {
    .hero-overlay {
        background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.55) 0%,
            rgba(0, 0, 0, 0.78) 55%,
            rgba(0, 0, 0, 0.88) 100%);
    }
}

/* --------------------------------------------------- Category panels */
.category-panel {
    position: relative;
    display: block;
    overflow: hidden;
    cursor: pointer;
}
/* Even tint across the whole photo so the centred label stays readable,
   plus a little extra weight top and bottom for contrast */
.category-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, transparent 35%, transparent 65%, rgba(0, 0, 0, 0.35) 100%),
        rgba(0, 0, 0, 0.38);
    transition: background-color 0.4s ease;
}
.category-panel:hover::before { background-color: rgba(0, 0, 0, 0.52); }

.category-panel img { transition: transform 0.6s ease; }
.category-panel:hover img { transform: scale(1.08); }

/* Label sits centred over the image */
.category-panel .panel-label {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 16px;
}
@media (min-width: 640px) {
    .category-panel .panel-label { padding: 28px 24px; }
}
.category-panel .panel-label h3 {
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
}
.category-panel .panel-label p {
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7);
}

/* --------------------------------------------------- Chef cards */
.chef-card img { transition: transform 0.5s ease; }
.chef-card:hover img { transform: scale(1.05); }

/* --------------------------------------------------- Testimonials */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    background: #2D7A3A;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

/* --------------------------------------------------- Social icons */
.social-icon {
    width: 34px;
    height: 34px;
    border: 1px solid currentColor;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: all 0.2s;
    /* inherits the container's colour: white on the green top bar,
       deep green in the footer and drawer */
    color: inherit;
    opacity: 0.65;
}
.social-icon:hover {
    background: #2D7A3A;
    border-color: #2D7A3A;
    color: #fff;
    opacity: 1;
}

/* --------------------------------------------------- Floating WhatsApp */
#waFloat {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 40;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s;
}
#waFloat:hover { transform: scale(1.08); }

/* Images should never blow out their container */
img { max-width: 100%; }

/* ==========================================================================
   Menu page
   ========================================================================== */

/* Sticky category bar sits directly under the header. The header height is
   measured in JS and written to --header-h so there is never a gap or overlap. */
.cat-nav {
    position: sticky;
    top: var(--header-h, 64px);
    z-index: 40;
    background: rgba(250, 247, 240, 0.97);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(29, 58, 38, 0.12);
}

.cat-chip {
    flex-shrink: 0;
    padding: 9px 18px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(29, 58, 38, 0.65);
    border: 1px solid rgba(29, 58, 38, 0.18);
    border-radius: 2px;
    white-space: nowrap;
    transition: all 0.2s;
}
.cat-chip:hover { color: #1D3A26; border-color: rgba(29, 58, 38, 0.45); }
.cat-chip.active {
    color: #fff;
    background: #2D7A3A;
    border-color: #2D7A3A;
}

/* Clear both sticky bars when jumping to a category */
section[id].menu-section {
    scroll-margin-top: calc(var(--header-h, 64px) + var(--catnav-h, 56px) + 8px);
}

/* --------------------------------------------------- Section headings */
.menu-cat-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    line-height: 1.2;
}
/* The short bar under each category name, lifted from the reference menu */
.menu-cat-rule {
    display: block;
    width: 56px;
    height: 4px;
    background: #2D7A3A;
    margin-top: 16px;
}
.menu-cat-rule.on-jade { background: #fff; }

/* --------------------------------------------------- Menu items */
.menu-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--rule, rgba(29, 58, 38, 0.14));
}
.menu-item:last-child { border-bottom: 0; }

.menu-item-head {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.menu-item-name {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
@media (min-width: 640px) {
    .menu-item-name { font-size: 16px; }
}
/* Dotted leader between the dish name and the price */
.menu-leader {
    flex: 1 1 auto;
    min-width: 18px;
    border-bottom: 1px dotted var(--rule, rgba(29, 58, 38, 0.28));
    transform: translateY(-4px);
}
.menu-price {
    flex-shrink: 0;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.03em;
    white-space: nowrap;
}
.menu-desc {
    font-size: 13px;
    line-height: 1.6;
    margin-top: 6px;
    max-width: 46ch;
}

/* --------------------------------------------------- Dish tags */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 3px 7px;
    border-radius: 2px;
    vertical-align: middle;
    margin-left: 8px;
    white-space: nowrap;
}
.tag-pick { background: #2D7A3A; color: #fff; }
.tag-veg { border: 1px solid currentColor; }
.tag-spicy { color: #C0392B; }
.on-jade .tag-pick { background: #fff; color: #1E5227; }
.on-jade .tag-spicy { color: #FFD9D5; }

/* Light sections need darker rules and tag colours */
.menu-light { --rule: rgba(26, 26, 26, 0.14); }
.menu-light .menu-leader { border-bottom-color: rgba(26, 26, 26, 0.28); }
.on-jade { --rule: rgba(255, 255, 255, 0.28); }
.on-jade .menu-leader { border-bottom-color: rgba(255, 255, 255, 0.4); }

/* --------------------------------------------------- Section photo */
.menu-photo {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}
.menu-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}
.menu-photo:hover img { transform: scale(1.05); }

/* Keep the photo alongside the list while a long category scrolls past */
@media (min-width: 1024px) {
    .menu-photo-sticky {
        position: sticky;
        top: calc(var(--header-h, 64px) + var(--catnav-h, 56px) + 32px);
    }
}

/* ==========================================================================
   About page
   ========================================================================== */

/* --------------------------------------------------- Value cards */
.value-card {
    background: rgba(29, 58, 38, 0.03);
    border: 1px solid rgba(29, 58, 38, 0.10);
    padding: 30px 26px;
    border-radius: 2px;
    transition: border-color 0.3s, transform 0.3s;
}
.value-card:hover {
    border-color: rgba(45, 122, 58, 0.6);
    transform: translateY(-3px);
}
.value-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(45, 122, 58, 0.14);
    color: #2D7A3A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 18px;
}

/* --------------------------------------------------- Reviews */
.stars {
    display: inline-flex;
    gap: 2px;
    color: #E0A62B;
    font-size: 13px;
}
.stars .empty { color: rgba(26, 26, 26, 0.2); }

.review-card {
    background: #fff;
    padding: 26px;
    border-radius: 2px;
    border: 1px solid rgba(29, 58, 38, 0.07);
    box-shadow: 0 1px 3px rgba(29, 58, 38, 0.06);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.review-source {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #6B7A6D;
}

/* Big rating summary block */
.rating-score {
    font-family: 'Cinzel', serif;
    font-size: 52px;
    font-weight: 700;
    line-height: 1;
    color: #2D7A3A;
}

/* ==========================================================================
   Reservation page
   ========================================================================== */

/* Light-background variant of .field, for the white booking card */
.field-light {
    width: 100%;
    background: #fff;
    border: 1px solid rgba(26, 26, 26, 0.18);
    color: #1A1A1A;
    padding: 13px 15px;
    font-size: 16px;          /* keeps iOS from zooming on focus */
    min-height: 50px;
    border-radius: 2px;
    transition: border-color 0.2s, box-shadow 0.2s;
    color-scheme: light;
}
.field-light::placeholder { color: rgba(26, 26, 26, 0.42); }
.field-light:focus {
    outline: none;
    border-color: #2D7A3A;
    box-shadow: 0 0 0 3px rgba(45, 122, 58, 0.14);
}
.field-light.touched:invalid {
    border-color: #C0392B;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}
textarea.field-light {
    min-height: 108px;
    resize: vertical;
    line-height: 1.6;
}
select.field-light {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%231A1A1A88'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
}

/* Small caps label above each field */
.field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(29, 58, 38, 0.72);
    margin-bottom: 7px;
}
.field-label .req { color: #2D7A3A; }

/* The photo panel beside the form */
.booking-photo {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}
.booking-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.booking-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(23, 44, 30, 0.35) 0%, rgba(23, 44, 30, 0.9) 100%);
}
.booking-photo .booking-info {
    position: relative;
    z-index: 2;
}

/* Rule-flanked eyebrow heading, as on the reference booking page */
.eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
}
.eyebrow::before,
.eyebrow::after {
    content: '';
    height: 1px;
    width: 48px;
    background: currentColor;
    opacity: 0.35;
}

/* ==========================================================================
   Gallery carousel (home page)
   Built on native scroll-snap, so touch swiping works without any JS.
   The script only adds autoplay, arrows and dots on top.
   ========================================================================== */
.carousel {
    position: relative;
}

.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 4px;
}
.carousel-track::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: reduce) {
    .carousel-track { scroll-behavior: auto; }
}

.carousel-slide {
    position: relative;
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 256px;
    overflow: hidden;
}
@media (min-width: 640px) {
    .carousel-slide { flex-basis: calc(50% - 2px); height: 224px; }
}
@media (min-width: 1024px) {
    .carousel-slide { flex-basis: calc(25% - 3px); height: 264px; }
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.carousel-slide:hover img { transform: scale(1.07); }

/* Caption that fades in over the photo */
.carousel-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: 40px 16px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #FAF7F0;
    opacity: 0;
    transition: opacity 0.3s;
}
.carousel-slide:hover .carousel-caption,
.carousel-slide:focus-within .carousel-caption { opacity: 1; }

/* Arrows */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(23, 44, 30, 0.75);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s, opacity 0.2s;
}
.carousel-arrow:hover { background: #2D7A3A; }
.carousel-arrow[disabled] { opacity: 0.3; cursor: default; }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 18px;
}
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(29, 58, 38, 0.22);
    transition: all 0.25s;
}
.carousel-dot.active {
    background: #2D7A3A;
    width: 22px;
    border-radius: 4px;
}

/* ==========================================================================
   Gallery page
   ========================================================================== */

/* Staggered masonry columns, like the reference gallery */
.gallery-grid {
    columns: 2;
    column-gap: 14px;
}
@media (min-width: 768px) { .gallery-grid { columns: 3; column-gap: 16px; } }
@media (min-width: 1280px) { .gallery-grid { columns: 4; } }

.gallery-item {
    break-inside: avoid;
    margin-bottom: 14px;
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    background: rgba(29, 58, 38, 0.05);
    cursor: zoom-in;
}
@media (min-width: 768px) { .gallery-item { margin-bottom: 16px; } }

/* The source photos are all square, so the staggered masonry look comes from
   cropping each tile to a different aspect ratio rather than from the files. */
.gallery-item { aspect-ratio: 1 / 1; }
.gallery-item.g-tall { aspect-ratio: 3 / 4; }
.gallery-item.g-wide { aspect-ratio: 4 / 3; }
.gallery-item.g-portrait { aspect-ratio: 2 / 3; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease, filter 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.06); }

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(23, 44, 30, 0);
    transition: background 0.3s;
}
.gallery-item:hover::after { background: rgba(23, 44, 30, 0.35); }

.gallery-item .gallery-zoom {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-item:hover .gallery-zoom { opacity: 1; }

/* ==========================================================================
   Lightbox
   ========================================================================== */
#lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(10, 20, 14, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s;
}
#lightbox.open { opacity: 1; visibility: visible; }

#lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lightbox-btn {
    position: absolute;
    z-index: 2;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
}
.lightbox-btn:hover { background: #2D7A3A; }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 14px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 14px; top: 50%; transform: translateY(-50%); }

.lightbox-caption {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    letter-spacing: 0.06em;
    padding: 0 70px;
}

/* ==========================================================================
   Contact page
   ========================================================================== */
.map-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
    filter: saturate(0.85);
}
@media (min-width: 1024px) {
    .map-frame { min-height: 100%; }
}

/* Address / phone / email blocks */
.contact-card {
    display: flex;
    gap: 16px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(29, 58, 38, 0.12);
}
.contact-card:last-child { border-bottom: 0; }

.contact-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(45, 122, 58, 0.12);
    color: #1E5227;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.contact-label {
    font-family: 'Cinzel', serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(29, 58, 38, 0.65);
    margin-bottom: 6px;
}

/* Opening hours rows */
.hours-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dotted rgba(29, 58, 38, 0.22);
    font-size: 14px;
}
.hours-row:last-child { border-bottom: 0; }
.hours-row.is-today { font-weight: 600; color: #1E5227; }
.hours-row .today-tag {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: #2D7A3A;
    color: #FAF7F0;
    padding: 2px 6px;
    border-radius: 2px;
    margin-left: 8px;
    vertical-align: middle;
}
