/**
 * =================================================================
 * MYFUN.CO.ZA THEME — South African Flag Colours
 * Green #007A4D | Gold #FFB81C | Red #DE3831 | Blue #002395
 * =================================================================
 */

:root {
    --color-primary: #007A4D;
    --color-primary-dark: #005C3A;
    --color-primary-light: #009960;
    --color-primary-rgb: 0, 122, 77;
    --color-secondary: #002395;
    --color-secondary-dark: #001A70;
    --color-accent: #FFB81C;
    --color-accent-dark: #D9970A;
    --gradient-primary: linear-gradient(135deg, #007A4D 0%, #005C3A 100%);
    --gradient-hero: linear-gradient(135deg, #E8F5EE 0%, #D0EBE0 100%);
    --gradient-hero-text: #003D26;
}

/* ---- Buttons ----
   style.css's .btn-secondary/.btn-accent pair a background color with a
   fixed text color (black for secondary, white for accent) that only
   works for the base theme's own gold-secondary/red-accent palette. This
   theme swaps secondary to navy and accent to gold, so those pairings
   need their own text-color override here too, or the button text is
   nearly invisible against the new background (navy+black is ~1.3:1
   contrast; gold+white is ~1.7:1 - both fail WCAG's 4.5:1 minimum). */
.btn-primary {
    background: var(--gradient-primary);
    border-color: var(--color-primary);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #009960 0%, #007A4D 100%);
    border-color: var(--color-primary-light);
}
/* The menu's link colour (.main-nav a) was winning over the button's, leaving Sign Up dark-on-green */
.main-nav a.btn-primary, .main-nav a.btn-primary:hover, .main-nav a.btn-primary.active { color: #fff; }

.btn-secondary,
.btn-secondary:hover {
    color: var(--color-white);
}
.btn-accent,
.btn-accent:hover {
    color: var(--color-black);
}

/* Same pairing problem as the buttons above - badge-secondary is still
   the base theme's gold-bg/black-text combo, illegible on this navy. */
.badge-secondary {
    color: var(--color-white);
}

/* .star reused --color-secondary assuming it stayed gold (a "gold star"
   look) - keep that look explicit here since this theme's secondary is
   navy now; --color-accent is this theme's own gold. */
.star {
    color: var(--color-accent);
}

/* ---- Header flag stripe ---- */
.site-header {
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(
        to right,
        #DE3831 0%,
        #DE3831 20%,
        #FFB81C 20%,
        #FFB81C 40%,
        #007A4D 40%,
        #007A4D 60%,
        #002395 60%,
        #002395 80%,
        #000000 80%,
        #000000 100%
    ) 1;
}

/* ---- Nav active state ----
   Intentionally NOT overridden to --color-accent (gold) here - gold text
   on the header's white background is ~1.7:1 contrast, well under WCAG's
   4.5:1 minimum, so it's left as style.css's own --color-primary (green),
   which already reads fine against white. */

/* ---- Hero/Banner accent ---- */
.hero-section,
.page-hero {
    background: var(--gradient-hero);
    color: var(--gradient-hero-text);
}

/* ---- Cards ---- */
.card:hover {
    border-color: var(--color-primary-light);
    box-shadow: 0 4px 20px rgba(0, 122, 77, 0.15);
}

/* ---- Links ---- */
a {
    color: var(--color-primary);
}
a:hover {
    color: var(--color-primary-light);
}

/* ---- Footer ---- */
.site-footer {
    background: linear-gradient(135deg, #003D26 0%, #002395 100%);
}

/* ---- Badges / tags ---- */
.badge-primary,
.tag-primary {
    background-color: var(--color-primary);
}
.badge-accent,
.tag-accent {
    background-color: var(--color-accent);
    color: #000;
}

/* ---- SA flag decorative strip (reusable class) ---- */
.sa-flag-strip {
    height: 4px;
    background: linear-gradient(
        to right,
        #DE3831 0% 20%,
        #FFB81C 20% 40%,
        #007A4D 40% 60%,
        #002395 60% 80%,
        #000000 80% 100%
    );
    border-radius: 2px;
}

/* ---- Header: area picker beside the logo, compact nav (2026-09-26) ----
   The "Viewing: <area>" bar used to be a full-width row of its own, and on
   laptop-width screens the menu ran off the right edge (hiding Login). */
.header-area { margin: 0 auto 0 1rem; flex: 0 0 auto; }   /* never squashed - its text spilled over the menu */
.header-area .area-selector-wrapper label { font-size: 0.75rem; }

.more-menu { position: relative; }
.more-dropdown {
    display: none; position: absolute; top: 100%; right: 0; min-width: 190px;
    background: var(--color-white); border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    padding: 0.4rem 0; margin-top: 0.4rem; z-index: 1001; list-style: none;
}
.more-dropdown li { list-style: none; }
.more-dropdown li a { display: block; padding: 0.6rem 1rem; border-radius: 0; }
/* A label at the top of a dropdown, not a link (e.g. "Behind The Fun" over Services) */
.more-dropdown li.more-heading { padding: 0.55rem 1rem 0.35rem; font-family: 'Quicksand', sans-serif; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-gray-500, #6B7280); border-bottom: 1px solid var(--color-gray-200, #E5E7EB); margin-bottom: 0.25rem; cursor: default; }
.more-menu.open .more-dropdown { display: block; }
@media (min-width: 769px) {
    .more-dropdown { display: block; visibility: hidden; }
    .more-menu:hover .more-dropdown, .more-menu.open .more-dropdown { visibility: visible; }
}

/* Mid-size screens (laptops): tighter menu so everything incl. Login fits */
@media (min-width: 769px) and (max-width: 1400px) {
    .main-nav > ul { gap: 0.15rem; }
    .main-nav a { font-size: 0.85rem; padding: 0.35rem 0.5rem; }
    .site-logo { height: 42px; }
    .header-area { margin-left: 0.6rem; }
}
@media (min-width: 769px) and (max-width: 1600px) {
    .header-area .area-selector-wrapper label { display: none; }
    .header-area .area-selector { min-width: 0; max-width: 150px; }
}

/* Tablets in portrait (~800px): the full menu only just fits, so Install app
   shows as its icon and the logo and area picker shrink a little */
@media (min-width: 769px) and (max-width: 899px) {
    .install-app-label { display: none; }
    .site-logo { height: 36px; }
    .header-area { margin-left: 0.3rem; }
    .header-area .area-selector { max-width: 110px; }
}

/* Phones: logo, area picker and menu button share one row */
@media (max-width: 768px) {
    .header-area { margin: 0 0.5rem; }
    .header-area .area-selector-wrapper label { display: none; }
    .header-area .area-selector { max-width: 140px; font-size: 0.8rem; }
    .site-logo { height: 38px; }
    .more-dropdown { position: static; display: block; border: none; box-shadow: none; padding: 0; margin: 0; background: var(--color-gray-100); }
    .more-menu > a { display: none !important; }
}

/* More menu: an invisible bridge over the gap between "More" and its dropdown,
   so moving the mouse down onto the items doesn't close it (it used to). */
.more-dropdown::before { content: ''; position: absolute; top: -12px; left: 0; right: 0; height: 12px; }
@media (min-width: 769px) {
    .more-dropdown { transition: visibility 0s linear .25s; }
    .more-menu:hover .more-dropdown { transition-delay: 0s; }
}

/* ---- Venue service badges: open now / menu / delivery / collection ---- */
.svc-badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.svc-badge { display: inline-block; font-size: .72rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #374151; white-space: nowrap; }
.svc-badge.svc-open { background: #dcfce7; color: #166534; }
.svc-badge.svc-closed { background: #fee2e2; color: #991b1b; }
.svc-badge.svc-order { background: #e0f2fe; color: #075985; }
.svc-badge.svc-paused { background: #fef3c7; color: #92400e; }
.svc-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .6rem; }
.svc-filter { display: inline-block; padding: .35rem .9rem; border: 2px solid var(--color-primary); border-radius: 20px; color: var(--color-primary); font-size: .82rem; font-weight: 600; text-decoration: none; }
.svc-filter.on { background: var(--color-primary); color: #fff; }
