<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Lumbini Province Taekwondo Association - Official website of LPTA Nepal. Member registration, news, events, achievements and more.">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>@yield('title', 'Lumbini Province Taekwondo Association')</title>

    <!-- Google Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Oswald:wght@400;500;600;700&display=swap" rel="stylesheet">

    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css">
    
    <!-- GLightbox CSS -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css" />

    <style>
        *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

        :root {
            --red:       #c0392b;
            --red-dark:  #962d22;
            --red-light: #e74c3c;
            --blue:      #1a2e5a;
            --blue-mid:  #22397a;
            --blue-light:#2e4fa0;
            --gold:      #d4a017;
            --gold-light:#f0c040;
            --white:     #ffffff;
            --off-white: #f8f9fb;
            --gray-100:  #f1f3f6;
            --gray-200:  #e2e6ea;
            --gray-500:  #6c757d;
            --gray-700:  #3d4552;
            --gray-900:  #1a1d23;
            --radius:    12px;
            --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
            --shadow-md: 0 8px 30px rgba(0,0,0,.12);
            --shadow-lg: 0 20px 60px rgba(0,0,0,.18);
            --transition: .3s cubic-bezier(.4,0,.2,1);
        }

        html { scroll-behavior: smooth; }
        body {
            font-family: 'Inter', sans-serif;
            color: var(--gray-900);
            background: var(--white);
            line-height: 1.6;
            overflow-x: hidden;
        }

        /* ── Utility ─────────────────────────────── */
        .container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
        .section-pad { padding: 90px 0; }
        .section-pad-sm { padding: 60px 0; }
        .text-center { text-align: center; }
        .btn {
            display: inline-flex; align-items: center; gap: 8px;
            padding: 13px 28px; border-radius: 8px; font-size: .9rem;
            font-weight: 600; cursor: pointer; transition: var(--transition);
            border: none; text-decoration: none; letter-spacing: .3px;
        }
        .btn-primary { background: var(--red); color: var(--white); }
        .btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(192,57,43,.35); }
        .btn-outline { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6); }
        .btn-outline:hover { background: rgba(255,255,255,.15); border-color: var(--white); transform: translateY(-2px); }
        .btn-blue { background: var(--blue); color: var(--white); }
        .btn-blue:hover { background: var(--blue-mid); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(26,46,90,.3); }
        .badge {
            display: inline-block; padding: 4px 12px; border-radius: 50px;
            font-size: .72rem; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
        }
        .badge-red { background: rgba(192,57,43,.12); color: var(--red); }
        .badge-gold { background: rgba(212,160,23,.14); color: #9a7010; }
        .badge-blue { background: rgba(26,46,90,.1); color: var(--blue); }

        /* Flash / toast bar */
        .flash-bar {
            position: fixed; right: 20px; bottom: 22px; z-index: 1200;
            background: rgba(0,0,0,.85); color: var(--white);
            padding: 12px 18px; border-radius: 8px; box-shadow: var(--shadow-md);
            display: inline-flex; align-items: center; gap:10px; font-weight:600;
            max-width: min(480px, calc(100% - 48px));
        }
        .flash-bar.success { background: #2ecc71; }
        .flash-bar.error { background: #e74c3c; }

        /* ── Section Headers ─────────────────────── */
        .section-header { margin-bottom: 56px; }
        .section-label {
            display: inline-block; font-size: .75rem; font-weight: 700;
            letter-spacing: 2px; text-transform: uppercase; color: var(--red);
            margin-bottom: 12px;
        }
        .section-title {
            font-family: 'Oswald', sans-serif; font-size: clamp(1.8rem, 3vw, 2.6rem);
            font-weight: 600; color: var(--blue); line-height: 1.2;
        }
        .section-title span { color: var(--red); }
        .section-subtitle {
            margin-top: 14px; font-size: 1rem; color: var(--gray-500);
            max-width: 580px;
        }
        .section-header.centered .section-subtitle { margin: 14px auto 0; }
        .divider {
            width: 56px; height: 4px; background: linear-gradient(90deg, var(--red), var(--gold));
            border-radius: 4px; margin-top: 18px;
        }
        .centered .divider { margin: 18px auto 0; }

        /* ── NAVBAR ──────────────────────────────── */
        #navbar {
            position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
            transition: var(--transition);
            background: transparent;
        }
        #navbar.scrolled {
            background: var(--blue);
            box-shadow: 0 4px 24px rgba(0,0,0,.25);
        }
        .nav-inner {
            display: flex; align-items: center; justify-content: space-between;
            height: 72px;
        }
        .nav-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
        .nav-logo-icon {
            width: 48px; height: 48px; border-radius: 50%;
            background: linear-gradient(135deg, var(--red), var(--gold));
            display: flex; align-items: center; justify-content: center;
            font-size: 1.3rem; color: var(--white); font-weight: 900;
            box-shadow: 0 4px 16px rgba(192,57,43,.4);
            flex-shrink: 0;
        }
        .nav-logo-text { line-height: 1; }
        .nav-logo-text strong {
            display: block; font-family: 'Oswald', sans-serif;
            font-size: 1.05rem; color: var(--white); letter-spacing: .5px;
        }
        .nav-logo-text small { color: rgba(255,255,255,.65); font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; }
        .nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
        .nav-links a {
            display: block; padding: 8px 14px; color: rgba(255,255,255,.85);
            text-decoration: none; font-size: .875rem; font-weight: 500;
            border-radius: 6px; transition: var(--transition); letter-spacing: .2px;
        }
        .nav-links a:hover, .nav-links a.active { color: var(--white); background: rgba(255,255,255,.12); }
        .nav-cta { display: flex; align-items: center; gap: 10px; }
        .nav-cta a { font-size: .85rem; padding: 9px 18px; }
        .nav-cta .btn-primary { background: var(--red); }
        .nav-hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
        .nav-hamburger span {
            display: block; width: 24px; height: 2px; background: var(--white);
            margin: 5px 0; transition: var(--transition); border-radius: 2px;
        }

        /* ── HERO ────────────────────────────────── */
        #hero {
            position: relative; min-height: 100vh;
            background: linear-gradient(135deg, var(--blue) 0%, #0d1f45 40%, #1a0a0a 100%);
            display: flex; align-items: center; overflow: hidden;
        }
        .hero-bg-pattern {
            position: absolute; inset: 0; opacity: .06;
            background-image: repeating-linear-gradient(
                45deg, rgba(255,255,255,1) 0, rgba(255,255,255,1) 1px,
                transparent 0, transparent 50%
            );
            background-size: 30px 30px;
        }
        .hero-glow-red {
            position: absolute; top: -200px; right: -200px;
            width: 700px; height: 700px; border-radius: 50%;
            background: radial-gradient(circle, rgba(192,57,43,.4) 0%, transparent 70%);
            pointer-events: none;
        }
        .hero-glow-blue {
            position: absolute; bottom: -200px; left: -100px;
            width: 600px; height: 600px; border-radius: 50%;
            background: radial-gradient(circle, rgba(46,79,160,.4) 0%, transparent 70%);
            pointer-events: none;
        }
        .hero-content {
            position: relative; z-index: 2;
            display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
            align-items: center;
        }
        .hero-eyebrow {
            display: inline-flex; align-items: center; gap: 10px;
            background: rgba(255,255,255,.08); backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,.15); border-radius: 50px;
            padding: 8px 18px; font-size: .78rem; color: rgba(255,255,255,.8);
            letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600;
            margin-bottom: 24px;
        }
        .hero-eyebrow i { color: var(--gold-light); }
        .hero-title {
            font-family: 'Oswald', sans-serif;
            font-size: clamp(2.4rem, 5vw, 4rem);
            font-weight: 700; color: var(--white); line-height: 1.1;
            margin-bottom: 20px; letter-spacing: .5px;
        }
        .hero-title .accent { color: var(--gold-light); }
        .hero-title .accent-red { color: #ff6b5b; }
        .hero-desc {
            font-size: 1.05rem; color: rgba(255,255,255,.72);
            line-height: 1.75; margin-bottom: 36px; max-width: 480px;
        }
        .hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
        .hero-stats {
            display: grid; grid-template-columns: repeat(3, 1fr);
            gap: 16px; margin-top: 48px; padding-top: 36px;
            border-top: 1px solid rgba(255,255,255,.12);
        }
        .hero-stat { text-align: center; }
        .hero-stat-num {
            font-family: 'Oswald', sans-serif; font-size: 2rem; font-weight: 700;
            color: var(--gold-light); line-height: 1;
        }
        .hero-stat-label { font-size: .75rem; color: rgba(255,255,255,.55); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
        .hero-visual {
            position: relative; display: flex; align-items: center; justify-content: center;
        }
        .hero-emblem {
            width: 340px; height: 340px; border-radius: 50%;
            background: linear-gradient(135deg, rgba(192,57,43,.25), rgba(26,46,90,.4));
            border: 2px solid rgba(255,255,255,.1);
            display: flex; align-items: center; justify-content: center;
            position: relative; backdrop-filter: blur(10px);
            box-shadow: 0 0 80px rgba(192,57,43,.2), inset 0 0 60px rgba(255,255,255,.03);
        }
        .hero-emblem::before {
            content: '';
            position: absolute; inset: 20px; border-radius: 50%;
            border: 1px solid rgba(255,255,255,.08);
        }
        .hero-emblem-inner { text-align: center; z-index: 1; }
        .hero-emblem-icon { font-size: 5rem; margin-bottom: 12px; line-height: 1; }
        .hero-emblem-tagline {
            font-family: 'Oswald', sans-serif; font-size: 1rem;
            color: rgba(255,255,255,.7); letter-spacing: 2px; text-transform: uppercase;
        }
        .hero-orbit-1, .hero-orbit-2 {
            position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.06);
        }
        .hero-orbit-1 { width: 420px; height: 420px; }
        .hero-orbit-2 { width: 520px; height: 520px; }
        .hero-orbit-dot {
            position: absolute; width: 10px; height: 10px; border-radius: 50%;
            background: var(--gold-light); top: -5px; left: 50%;
            box-shadow: 0 0 16px var(--gold-light);
            animation: orbit-spin 8s linear infinite;
            transform-origin: 0 210px;
        }

        @keyframes orbit-spin { from { transform: rotate(0deg) translateX(210px); } to { transform: rotate(360deg) translateX(210px); } }
        .hero-scroll {
            position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
            display: flex; flex-direction: column; align-items: center; gap: 8px;
            color: rgba(255,255,255,.5); font-size: .75rem; letter-spacing: 1px;
            text-transform: uppercase; z-index: 2;
        }
        .hero-scroll-arrow {
            width: 36px; height: 36px; border-radius: 50%;
            border: 1px solid rgba(255,255,255,.2);
            display: flex; align-items: center; justify-content: center;
            animation: bounce-arrow 2s ease-in-out infinite;
        }
        @keyframes bounce-arrow { 0%,100%{transform:translateY(0)} 50%{transform:translateY(6px)} }

        /* ── COUNTER STRIP ───────────────────────── */
        #counters {
            background: linear-gradient(90deg, var(--blue), var(--blue-mid));
            padding: 40px 0;
            box-shadow: 0 8px 32px rgba(26,46,90,.3);
        }
        .counters-grid {
            display: grid; grid-template-columns: repeat(7, 1fr); gap: 0;
        }
        .counter-item {
            text-align: center; padding: 20px 12px;
            border-right: 1px solid rgba(255,255,255,.1);
            position: relative;
        }
        .counter-item:last-child { border-right: none; }
        .counter-icon { font-size: 1.6rem; margin-bottom: 8px; line-height: 1; }
        .counter-num {
            font-family: 'Oswald', sans-serif; font-size: 2.2rem; font-weight: 700;
            color: var(--white); line-height: 1; margin-bottom: 4px;
        }
        .counter-num.gold-num { color: var(--gold-light); }
        .counter-num.silver-num { color: #c0c8d0; }
        .counter-num.bronze-num { color: #cd7f32; }
        .counter-label { font-size: .7rem; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: 1px; }

        /* ── FEATURED NEWS ───────────────────────── */
        #news-section { background: var(--off-white); }
        .news-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 24px; }
        .news-card {
            background: var(--white); border-radius: var(--radius);
            overflow: hidden; box-shadow: var(--shadow-sm);
            transition: var(--transition); border: 1px solid var(--gray-200);
            display: flex; flex-direction: column;
        }
        .news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
        .news-card-img {
            width: 100%; aspect-ratio: 16/9; background: linear-gradient(135deg, #1a2e5a 0%, #c0392b 100%);
            display: flex; align-items: center; justify-content: center;
            font-size: 3.5rem; flex-shrink: 0; position: relative; overflow: hidden;
        }
        .news-card-img.tall { aspect-ratio: 4/3; font-size: 5rem; }
        .news-card-img-overlay {
            position: absolute; inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,.5), transparent);
        }
        .news-card-img .category-pill {
            position: absolute; top: 14px; left: 14px;
            background: var(--red); color: var(--white);
            font-size: .68rem; font-weight: 700; padding: 4px 10px;
            border-radius: 50px; letter-spacing: .8px; text-transform: uppercase;
        }
        .news-card-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
        .news-card-meta {
            display: flex; align-items: center; gap: 12px;
            font-size: .75rem; color: var(--gray-500); margin-bottom: 10px;
        }
        .news-card-meta i { color: var(--red); }
        .news-card-title {
            font-family: 'Oswald', sans-serif; font-size: 1.15rem; font-weight: 600;
            color: var(--blue); line-height: 1.3; margin-bottom: 10px;
            text-decoration: none; display: block; transition: var(--transition);
        }
        .news-card-title:hover { color: var(--red); }
        .news-card-title.lg { font-size: 1.5rem; }
        .news-card-excerpt { font-size: .875rem; color: var(--gray-500); line-height: 1.6; flex: 1; }
        .news-card-footer {
            margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--gray-100);
            display: flex; align-items: center; justify-content: space-between;
        }
        .read-more {
            font-size: .82rem; font-weight: 600; color: var(--red);
            text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
            transition: var(--transition);
        }
        .read-more:hover { gap: 10px; }
        .news-views { font-size: .75rem; color: var(--gray-500); }

        /* ── EVENTS ──────────────────────────────── */
        #events-section { background: var(--white); }
        .events-list { display: flex; flex-direction: column; gap: 20px; }
        .event-card {
            display: grid; grid-template-columns: 140px 100px 1fr auto;
            gap: 24px; align-items: center; padding: 24px 28px;
            background: var(--white); border-radius: var(--radius);
            border: 1px solid var(--gray-200); box-shadow: var(--shadow-sm);
            transition: var(--transition);
        }
        .event-card-img {
            width: 140px; height: 100px; border-radius: 8px; overflow: hidden; background: #eee; display: flex; align-items: center; justify-content: center;
        }
        .event-card-img img {
            width: 100%; height: 100%; object-fit: cover;
        }
        .event-card:hover { transform: translateX(6px); box-shadow: var(--shadow-md); border-left: 4px solid var(--red); }
        .event-date-box {
            background: linear-gradient(135deg, var(--blue), var(--blue-mid));
            border-radius: 10px; padding: 14px 10px; text-align: center; color: var(--white);
        }
        .event-date-day { font-family: 'Oswald', sans-serif; font-size: 2rem; font-weight: 700; line-height: 1; }
        .event-date-month { font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; opacity: .8; margin-top: 2px; }
        .event-info h3 {
            font-family: 'Oswald', sans-serif; font-size: 1.15rem; font-weight: 600;
            color: var(--blue); margin-bottom: 6px;
        }
        .event-meta { display: flex; gap: 16px; flex-wrap: wrap; }
        .event-meta span { font-size: .8rem; color: var(--gray-500); display: flex; align-items: center; gap: 5px; }
        .event-meta i { color: var(--red); }
        .reg-open {
            background: linear-gradient(135deg, #27ae60, #2ecc71);
            color: var(--white); font-size: .75rem; font-weight: 700;
            padding: 8px 18px; border-radius: 50px; white-space: nowrap;
            letter-spacing: .5px;
        }
        .reg-closed {
            background: var(--gray-100); color: var(--gray-500);
            font-size: .75rem; font-weight: 600; padding: 8px 18px;
            border-radius: 50px; white-space: nowrap;
        }

        /* ── ACHIEVEMENTS ────────────────────────── */
        #achievements-section {
            background: linear-gradient(135deg, var(--blue) 0%, #0d1f45 100%);
            position: relative; overflow: hidden;
        }
        #achievements-section::before {
            content: ''; position: absolute; inset: 0; opacity: .04;
            background-image: repeating-linear-gradient(45deg, rgba(255,255,255,1) 0, rgba(255,255,255,1) 1px, transparent 0, transparent 50%);
            background-size: 30px 30px;
        }
        #achievements-section .section-title { color: var(--white); }
        #achievements-section .section-label { color: var(--gold-light); }
        .achievements-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; z-index: 1; }
        .achievement-card {
            background: rgba(255,255,255,.06); backdrop-filter: blur(10px);
            border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius);
            padding: 32px 28px; text-align: center; transition: var(--transition);
        }
        .achievement-card:hover { background: rgba(255,255,255,.1); transform: translateY(-4px); }
        .achievement-medal {
            font-size: 3.5rem; margin-bottom: 14px; line-height: 1;
            filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
        }
        .achievement-title {
            font-family: 'Oswald', sans-serif; font-size: 1.1rem; font-weight: 600;
            color: var(--white); margin-bottom: 8px;
        }
        .achievement-player { font-size: .88rem; color: rgba(255,255,255,.6); margin-bottom: 8px; }
        .achievement-date { font-size: .75rem; color: rgba(255,255,255,.4); }
        .achievement-type {
            display: inline-block; margin-top: 12px; padding: 4px 12px;
            border-radius: 50px; font-size: .7rem; font-weight: 700;
            letter-spacing: .8px; text-transform: uppercase;
        }
        .achievement-type.nat { background: rgba(212,160,23,.2); color: var(--gold-light); }
        .achievement-type.intl { background: rgba(192,57,43,.2); color: #ff8878; }

        /* ── COACHES & REFS ──────────────────────── */
        #people-section { background: var(--off-white); }
        .people-tabs {
            display: flex; gap: 0; margin-bottom: 40px;
            background: var(--gray-100); border-radius: 10px; padding: 6px;
            width: fit-content;
        }
        .people-tab {
            padding: 10px 28px; border-radius: 7px; font-size: .875rem; font-weight: 600;
            cursor: pointer; transition: var(--transition); color: var(--gray-500);
            border: none; background: none;
        }
        .people-tab.active { background: var(--white); color: var(--blue); box-shadow: var(--shadow-sm); }
        .people-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
        .people-card {
            background: var(--white); border-radius: var(--radius);
            overflow: hidden; box-shadow: var(--shadow-sm);
            border: 1px solid var(--gray-200); transition: var(--transition); text-align: center;
        }
        .people-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
        .people-avatar {
            width: 100%; aspect-ratio: 1; background: linear-gradient(135deg, var(--blue) 0%, var(--red) 100%);
            display: flex; align-items: center; justify-content: center;
            font-size: 3.5rem; font-weight: 700; color: rgba(255,255,255,.7);
        }
        .people-info { padding: 20px 18px; }
        .people-name { font-family: 'Oswald', sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--blue); margin-bottom: 4px; }
        .people-role { font-size: .8rem; color: var(--gray-500); margin-bottom: 10px; }
        .people-detail { font-size: .78rem; color: var(--gray-700); display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 4px; }
        .people-detail i { color: var(--red); }
        .tab-content { display: none; }
        .tab-content.active { display: block; }

        /* ── DISTRICTS ───────────────────────────── */
        #districts-section { background: var(--white); }
        .districts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
        .district-card {
            background: var(--white); border: 1px solid var(--gray-200);
            border-radius: var(--radius); padding: 24px 20px; text-align: center;
            transition: var(--transition); box-shadow: var(--shadow-sm);
            cursor: pointer;
        }
        .district-card:hover {
            background: var(--blue); border-color: var(--blue);
            transform: translateY(-4px); box-shadow: var(--shadow-md);
        }
        .district-card:hover .district-name { color: var(--white); }
        .district-card:hover .district-meta { color: rgba(255,255,255,.6); }
        .district-card:hover .district-icon { background: rgba(255,255,255,.15); color: var(--white); }
        .district-icon {
            width: 48px; height: 48px; border-radius: 10px;
            background: var(--gray-100); display: flex; align-items: center; justify-content: center;
            margin: 0 auto 14px; font-size: 1.4rem; transition: var(--transition);
            color: var(--blue);
        }
        .district-name { font-family: 'Oswald', sans-serif; font-size: 1rem; font-weight: 600; color: var(--blue); margin-bottom: 4px; transition: var(--transition); }
        .district-meta { font-size: .75rem; color: var(--gray-500); transition: var(--transition); }

        /* ── GALLERY STRIP ───────────────────────── */
        #gallery-section { background: var(--gray-900); overflow: hidden; }
        #gallery-section .section-title { color: var(--white); }
        #gallery-section .section-label { color: var(--gold-light); }
        #gallery-section .divider { background: linear-gradient(90deg, var(--gold-light), var(--red)); }
        .gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
        .gallery-item {
            aspect-ratio: 1; background: linear-gradient(135deg, var(--blue), var(--red));
            display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
            position: relative; overflow: hidden; cursor: pointer; transition: var(--transition);
        }
        .gallery-item:hover .gallery-overlay { opacity: 1; }
        .gallery-item:hover { transform: scale(1.02); z-index: 2; }
        .gallery-overlay {
            position: absolute; inset: 0; background: rgba(0,0,0,.6);
            display: flex; align-items: center; justify-content: center;
            opacity: 0; transition: var(--transition);
        }
        .gallery-overlay i { color: var(--white); font-size: 1.5rem; }

        /* ── CTA BANNER ──────────────────────────── */
        #cta-section {
            background: linear-gradient(135deg, var(--red-dark) 0%, var(--red) 50%, var(--red-light) 100%);
            padding: 80px 0; text-align: center; position: relative; overflow: hidden;
        }
        #cta-section::before {
            content: ''; position: absolute; inset: 0; opacity: .06;
            background-image: repeating-linear-gradient(45deg, rgba(255,255,255,1) 0, rgba(255,255,255,1) 1px, transparent 0, transparent 50%);
            background-size: 30px 30px;
        }
        .cta-inner { position: relative; z-index: 1; }
        .cta-title { font-family: 'Oswald', sans-serif; font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 700; color: var(--white); margin-bottom: 14px; }
        .cta-desc { font-size: 1.05rem; color: rgba(255,255,255,.8); margin-bottom: 36px; }
        .cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
        .btn-white { background: var(--white); color: var(--red); font-weight: 700; }
        .btn-white:hover { background: #ffe8e6; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

        /* ── FOOTER ──────────────────────────────── */
        footer {
            background: var(--gray-900);
            color: rgba(255,255,255,.7); padding: 70px 0 0;
        }
        .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 50px; }
        .footer-brand .nav-logo { margin-bottom: 20px; display: inline-flex; }
        .footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 320px; margin-bottom: 24px; }
        .footer-socials { display: flex; gap: 10px; }
        .footer-social {
            width: 38px; height: 38px; border-radius: 8px;
            background: rgba(255,255,255,.07); display: flex; align-items: center; justify-content: center;
            color: rgba(255,255,255,.6); text-decoration: none; transition: var(--transition); font-size: .95rem;
        }
        .footer-social:hover { background: var(--red); color: var(--white); }
        .footer-col h4 { font-family: 'Oswald', sans-serif; font-size: 1rem; color: var(--white); margin-bottom: 20px; letter-spacing: .5px; }
        .footer-links { list-style: none; }
        .footer-links li { margin-bottom: 10px; }
        .footer-links a { color: rgba(255,255,255,.6); text-decoration: none; font-size: .875rem; transition: var(--transition); display: flex; align-items: center; gap: 7px; }
        .footer-links a:hover { color: var(--gold-light); padding-left: 6px; }
        .footer-links a i { color: var(--red); font-size: .7rem; }
        .footer-contact-item { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
        .footer-contact-icon { width: 32px; height: 32px; border-radius: 8px; background: rgba(192,57,43,.15); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--red); font-size: .85rem; }
        .footer-contact-text { font-size: .83rem; line-height: 1.5; }
        .footer-bottom {
            border-top: 1px solid rgba(255,255,255,.07);
            padding: 20px 0; display: flex; align-items: center; justify-content: space-between;
        }
        .footer-bottom p { font-size: .8rem; color: rgba(255,255,255,.35); }
        .footer-bottom-links { display: flex; gap: 20px; }
        .footer-bottom-links a { font-size: .78rem; color: rgba(255,255,255,.35); text-decoration: none; }
        .footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

        /* ── FLASH MESSAGE ───────────────────────── */
        .flash-bar {
            position: fixed; bottom: 30px; right: 30px; z-index: 9999;
            background: var(--blue); color: var(--white); padding: 14px 22px;
            border-radius: 10px; box-shadow: var(--shadow-lg);
            font-size: .88rem; display: flex; align-items: center; gap: 10px;
            animation: slide-in .4s ease;
        }
        .flash-bar.success { background: #27ae60; }
        @keyframes slide-in { from{opacity:0;transform:translateX(40px)} to{opacity:1;transform:none} }

        /* ── RESPONSIVE ──────────────────────────── */
        @media (max-width: 1100px) {
            .counters-grid { grid-template-columns: repeat(4, 1fr); }
            .people-grid { grid-template-columns: repeat(2, 1fr); }
        }
        @media (max-width: 900px) {
            .hero-content { grid-template-columns: 1fr; text-align: center; }
            .hero-visual { display: none; }
            .hero-buttons { justify-content: center; }
            .hero-stats { grid-template-columns: repeat(3, 1fr); }
            .news-grid { grid-template-columns: 1fr; }
            .achievements-grid { grid-template-columns: 1fr 1fr; }
            .districts-grid { grid-template-columns: repeat(3, 1fr); }
            .gallery-grid { grid-template-columns: repeat(3, 1fr); }
            .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
        }
        @media (max-width: 680px) {
            .section-pad { padding: 60px 0; }
            .nav-links, .nav-cta { display: none; }
            .nav-hamburger { display: block; }
            .counters-grid { grid-template-columns: repeat(2, 1fr); }
            .event-card { grid-template-columns: 80px 1fr; }
            .event-card > .reg-open, .event-card > .reg-closed { display: none; }
            .event-card-img { display: none; }
            .achievements-grid { grid-template-columns: 1fr; }
            .districts-grid { grid-template-columns: 1fr 1fr; }
            .gallery-grid { grid-template-columns: repeat(2, 1fr); }
            .footer-grid { grid-template-columns: 1fr; }
            .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
            .people-grid { grid-template-columns: 1fr 1fr; }
        }
    </style>

    @yield('head')
</head>
<body>

<!-- ── NAVBAR ──────────────────────────────────────────── -->
@php
    $headerLogoText = $siteSettings['header_logo_text'] ?? 'LPTA';
    $headerLogoTagline = $siteSettings['header_logo_tagline'] ?? 'Lumbini Province Taekwondo';
    $headerLogoIcon = $siteSettings['header_logo_icon'] ?? '🥋';
    $headerLogoImg = $siteSettings['header_logo_img'] ?? null;
    
    $defaultMenu = [
        ['label' => 'Home', 'route' => 'home'],
        ['label' => 'About', 'route' => 'about'],
        ['label' => 'News', 'route' => 'news'],
        ['label' => 'Events', 'route' => 'events'],
        ['label' => 'Achievements', 'route' => 'achievements'],
        ['label' => 'Gallery', 'route' => 'gallery'],
        ['label' => 'Downloads', 'route' => 'downloads'],
        ['label' => 'Contact', 'route' => 'contact'],
    ];
    $menuItems = $defaultMenu;
    if (!empty($siteSettings['nav_menu_json'])) {
        $decoded = json_decode($siteSettings['nav_menu_json'], true);
        if (is_array($decoded)) {
            $menuItems = $decoded;
        }
    }
@endphp
<nav id="navbar">
    <div class="container">
        <div class="nav-inner">
            <a href="{{ route('home') }}" class="nav-logo">
                @if($headerLogoImg)
                    <img src="{{ asset($headerLogoImg) }}" alt="Logo" style="height: 48px; width: auto; object-fit: contain; border-radius: 8px;">
                @else
                    <div class="nav-logo-icon">{{ $headerLogoIcon }}</div>
                @endif
                <div class="nav-logo-text">
                    <strong>{{ $headerLogoText }}</strong>
                    <small>{{ $headerLogoTagline }}</small>
                </div>
            </a>
            <ul class="nav-links">
                @foreach($menuItems as $item)
                    @php
                        $url = '#';
                        $isActive = false;
                        if (isset($item['route'])) {
                            try {
                                $url = route($item['route']);
                                $isActive = request()->routeIs($item['route'] . '*');
                            } catch (\Exception $e) {
                                $url = isset($item['url']) ? url($item['url']) : '#';
                            }
                        } elseif (isset($item['url'])) {
                            // Always use url() to convert relative paths to absolute URLs
                            $url = url($item['url']);
                            $isActive = request()->is(trim($item['url'], '/') ?: '/');
                        }
                    @endphp
                    <li><a href="{{ $url }}" class="{{ $isActive ? 'active' : '' }}">{{ $item['label'] }}</a></li>
                @endforeach
            </ul>
            <div class="nav-cta">
                @auth
                    <a href="{{ route('admin.dashboard') }}" class="btn btn-outline">Dashboard</a>
                @else
                    <a href="{{ route('login') }}" class="btn btn-outline">Login</a>
                    <a href="{{ route('register') }}" class="btn btn-primary">Join Now</a>
                @endauth
            </div>
            <button class="nav-hamburger" id="menuBtn" aria-label="Menu">
                <span></span><span></span><span></span>
            </button>
        </div>
    </div>
</nav>

<!-- ── MAIN CONTENT ──────────────────────────────────── -->
@yield('content')

<!-- ── FOOTER ──────────────────────────────────────── -->
<footer>
    <div class="container">
        <div class="footer-grid">
            <div class="footer-brand">
                <a href="{{ route('home') }}" class="nav-logo">
                    @if($headerLogoImg)
                        <img src="{{ asset($headerLogoImg) }}" alt="Logo" style="height: 48px; width: auto; object-fit: contain; border-radius: 8px; margin-bottom: 12px; display: block;">
                    @else
                        <div class="nav-logo-icon">{{ $headerLogoIcon }}</div>
                    @endif
                    <div class="nav-logo-text">
                        <strong>{{ $headerLogoText }}</strong>
                        <small>{{ $headerLogoTagline }}</small>
                    </div>
                </a>
                <p>{{ $siteSettings['footer_about'] ?? 'The official governing body of Taekwondo in Lumbini Province, Nepal. We develop champions, promote discipline, and unite 12 districts under one flag.' }}</p>
                <div class="footer-socials">
                    <a href="{{ $siteSettings['social_facebook'] ?? '#' }}" class="footer-social" target="_blank"><i class="fab fa-facebook-f"></i></a>
                    <a href="{{ $siteSettings['social_youtube'] ?? '#' }}" class="footer-social" target="_blank"><i class="fab fa-youtube"></i></a>
                    <a href="{{ $siteSettings['social_instagram'] ?? '#' }}" class="footer-social" target="_blank"><i class="fab fa-instagram"></i></a>
                    <a href="{{ $siteSettings['social_tiktok'] ?? '#' }}" class="footer-social" target="_blank"><i class="fab fa-tiktok"></i></a>
                </div>
            </div>
            <div class="footer-col">
                <h4>Quick Links</h4>
                <ul class="footer-links">
                    <li><a href="{{ route('about') }}"><i class="fas fa-chevron-right"></i> About LPTA</a></li>
                    <li><a href="{{ route('news') }}"><i class="fas fa-chevron-right"></i> Latest News</a></li>
                    <li><a href="{{ route('events') }}"><i class="fas fa-chevron-right"></i> Events</a></li>
                    <li><a href="{{ route('coaches') }}"><i class="fas fa-chevron-right"></i> Coaches</a></li>
                    <li><a href="{{ route('referees') }}"><i class="fas fa-chevron-right"></i> Referees</a></li>
                    <li><a href="{{ route('gallery') }}"><i class="fas fa-chevron-right"></i> Gallery</a></li>
                    <li><a href="{{ route('downloads') }}"><i class="fas fa-chevron-right"></i> Downloads</a></li>
                </ul>
            </div>
            <div class="footer-col">
                <h4>Member Portal</h4>
                <ul class="footer-links">
                    <li><a href="{{ route('register') }}"><i class="fas fa-chevron-right"></i> Register Now</a></li>
                    <li><a href="{{ route('login') }}"><i class="fas fa-chevron-right"></i> Member Login</a></li>
                    <li><a href="{{ route('verify', 'LPTA-00001') }}"><i class="fas fa-chevron-right"></i> Verify Member</a></li>
                    <li><a href="{{ route('tree') }}"><i class="fas fa-chevron-right"></i> Member Directory</a></li>
                    <li><a href="{{ route('achievements') }}"><i class="fas fa-chevron-right"></i> Hall of Fame</a></li>
                    <li><a href="{{ route('downloads') }}"><i class="fas fa-chevron-right"></i> Forms & Docs</a></li>
                </ul>
            </div>
            <div class="footer-col">
                <h4>Contact Us</h4>
                <div class="footer-contact-item">
                    <div class="footer-contact-icon"><i class="fas fa-map-marker-alt"></i></div>
                    <div class="footer-contact-text">{!! nl2br(e($siteSettings['contact_address'] ?? 'Milanchowk, Butwal-11, Rupandehi, Lumbini Province, Nepal')) !!}</div>
                </div>
                <div class="footer-contact-item">
                    <div class="footer-contact-icon"><i class="fas fa-phone"></i></div>
                    <div class="footer-contact-text">{!! nl2br(e($siteSettings['contact_phone'] ?? "+977-71-540123\n+977-9857012345")) !!}</div>
                </div>
                <div class="footer-contact-item">
                    <div class="footer-contact-icon"><i class="fas fa-envelope"></i></div>
                    <div class="footer-contact-text">{!! nl2br(e($siteSettings['contact_email'] ?? "info@lumbinitkd.org\nadmin@lumbinitkd.org")) !!}</div>
                </div>
            </div>
        </div>
        <div class="footer-bottom">
            <p>{{ $siteSettings['footer_copyright'] ?? '© ' . date('Y') . ' Lumbini Province Taekwondo Association. All rights reserved.' }}</p>
            <div class="footer-bottom-links">
                <a href="#">Privacy Policy</a>
                <a href="#">Terms of Use</a>
                <a href="{{ route('contact') }}">Contact</a>
            </div>
        </div>
    </div>
</footer>

@if(session('success'))
<div class="flash-bar success" id="flashBar">
    <i class="fas fa-check-circle"></i> {{ session('success') }}
</div>
@endif
@if(session('error'))
<div class="flash-bar" id="flashBar">
    <i class="fas fa-exclamation-circle"></i> {{ session('error') }}
</div>
@endif

<script>
// Navbar scroll effect
const navbar = document.getElementById('navbar');
window.addEventListener('scroll', () => {
    navbar.classList.toggle('scrolled', window.scrollY > 50);
});
navbar.classList.add('scrolled'); // always solid for non-hero pages

// Auto-dismiss flash
const fb = document.getElementById('flashBar');
if (fb) setTimeout(() => fb.style.display = 'none', 5000);

// Hamburger
document.getElementById('menuBtn')?.addEventListener('click', function() {
    const nav = document.querySelector('.nav-links');
    if (nav.style.display === 'flex') {
        nav.style.display = '';
    } else {
        nav.style.cssText = 'display:flex;flex-direction:column;position:absolute;top:72px;left:0;right:0;background:var(--blue);padding:16px 24px;gap:4px;';
    }
});
</script>

<script src="https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script>
<script>
    document.addEventListener("DOMContentLoaded", function() {
        const lightbox = GLightbox({
            selector: '.glightbox',
            touchNavigation: true,
            loop: true,
        });
    });
</script>
@yield('scripts')
</body>
</html>
