/* ═══════════════════════════════════════════════════════════
   Home Landing — منصة النشاطات الشبابية
   ═══════════════════════════════════════════════════════════ */

:root {
    --hl-primary: #0a3d62;
    --hl-primary-light: #1a6da8;
    --hl-green: #006233;
    --hl-green-dark: #004d28;
    --hl-green-glow: rgba(0, 98, 51, 0.35);
    --hl-accent: #27ae60;
    --hl-accent-light: #2ecc71;
    --hl-gold: #d4af37;
    --hl-text: #1a2533;
    --hl-text-muted: #5a6a7e;
    --hl-surface: #f4f7fb;
    --hl-card: #ffffff;
    --hl-radius: 20px;
    --hl-radius-sm: 14px;
    --hl-shadow: 0 20px 60px rgba(10, 61, 98, 0.12);
    --hl-shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.18);
    --hl-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.home-page {
    font-family: 'Cairo', 'PNU', sans-serif !important;
    background: var(--hl-surface);
}

/* ─── Navbar sur la page d'accueil ─────────────────────── */
body.home-page:not(.scrolled) .navbar {
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: blur(8px);
}

body.home-page:not(.scrolled) .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.92) !important;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

body.home-page:not(.scrolled) .navbar-nav .nav-link.active,
body.home-page:not(.scrolled) .navbar-nav .nav-link:hover {
    color: #fff !important;
}

body.home-page:not(.scrolled) .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4);
}

/* ─── Hero (slider 3 images — بنية hero-section الأصلية) ─── */
.home-hero.hero-section {
    position: relative;
    overflow: hidden;
    background-image: none !important;
    background-color: #0a2018;
    min-height: 85vh;
    padding: 140px 0 100px;
}

.home-hero__slider {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    margin: 0;
}

.home-hero__slider .carousel-inner,
.home-hero__slider .carousel-item {
    height: 100%;
}

.home-hero__slider .carousel-item {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100% !important;
}

.home-hero__slider .hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.home-hero__slider .carousel-control-prev,
.home-hero__slider .carousel-control-next {
    z-index: 2;
}

.home-hero__content {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 960px;
    pointer-events: none;
}

.home-hero__content a {
    pointer-events: auto;
}

.home-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1.1rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    animation: hl-fade-up 0.8s ease both;
}

.home-hero__badge-dot {
    width: 8px;
    height: 8px;
    background: var(--hl-accent-light);
    border-radius: 50%;
    animation: hl-pulse 2s ease infinite;
}

@keyframes hl-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.home-hero__title {
    font-size: clamp(2rem, 5.5vw, 3.75rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    animation: hl-fade-up 0.8s ease 0.15s both;
}

.home-hero__title #heroDynamicHighlight {
    display: block;
    background: linear-gradient(90deg, #a8e6cf, #fff 40%, #d4af37);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero__subtitle {
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.88);
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    animation: hl-fade-up 0.8s ease 0.3s both;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    animation: hl-fade-up 0.8s ease 0.45s both;
}

.hl-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: all var(--hl-transition);
    border: none;
    cursor: pointer;
}

.hl-btn--primary {
    background: linear-gradient(135deg, var(--hl-green), var(--hl-accent));
    color: #fff;
    box-shadow: 0 8px 28px var(--hl-green-glow);
}

.hl-btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px var(--hl-green-glow);
    color: #fff;
}

.hl-btn--glass {
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.hl-btn--glass:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    color: #fff;
}

.home-hero__indicators {
    z-index: 4;
    margin-bottom: 1rem;
}

.home-hero__indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    padding: 0;
    transition: all var(--hl-transition);
    opacity: 0.7;
    text-indent: -9999px;
    overflow: hidden;
}

.home-hero__indicators button.active {
    background: #fff;
    border-color: #fff;
    width: 28px;
    border-radius: 10px;
    opacity: 1;
}

@keyframes hl-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Stats bar ────────────────────────────────────────── */
.hl-stats {
    position: relative;
    z-index: 20;
    margin-top: -4rem;
    padding: 0 1rem 3rem;
}

.hl-stats__inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    background: var(--hl-card);
    border-radius: var(--hl-radius);
    padding: 1.75rem 2rem;
    box-shadow: var(--hl-shadow-lg);
    border: 1px solid rgba(0, 98, 51, 0.08);
}

.hl-stat {
    text-align: center;
    padding: 0.5rem;
    position: relative;
}

.hl-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, #dde4ef, transparent);
}

[dir="rtl"] .hl-stat:not(:last-child)::after {
    left: auto;
    right: 0;
}

.hl-stat__value {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--hl-green);
    line-height: 1.1;
}

.hl-stat__label {
    font-size: 0.85rem;
    color: var(--hl-text-muted);
    margin-top: 0.35rem;
    font-weight: 600;
}

.hl-stat__icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 0.5rem;
    background: linear-gradient(135deg, rgba(0, 98, 51, 0.1), rgba(39, 174, 96, 0.15));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hl-green);
    font-size: 1.2rem;
}

.hl-stat__icon .bi::before {
    font-family: bootstrap-icons !important;
}

/* ─── Section commune ──────────────────────────────────── */
.hl-section {
    padding: 5rem 0;
    position: relative;
}

.hl-section--alt {
    background: linear-gradient(180deg, var(--hl-surface) 0%, #eef3f9 100%);
}

.hl-section__eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--hl-green);
    margin-bottom: 0.75rem;
}

.hl-section__title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--hl-text);
    margin-bottom: 1rem;
}

.hl-section__desc {
    color: var(--hl-text-muted);
    font-size: 1.05rem;
    line-height: 1.85;
    max-width: 720px;
}

.hl-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--hl-green), var(--hl-accent));
    border-radius: 4px;
    margin: 1rem auto 0;
}

/* ─── About ────────────────────────────────────────────── */
.hl-about {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

.hl-about__visual {
    position: relative;
}

.hl-about__logo-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
}

.hl-about__logo-card {
    background: var(--hl-card);
    border-radius: var(--hl-radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--hl-shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: transform var(--hl-transition);
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.hl-about__logo-card:hover {
    transform: translateY(-6px);
}

.hl-about__logo-card img {
    max-height: 90px;
    width: auto;
    object-fit: contain;
}

.hl-about__accent-ring {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px dashed rgba(0, 98, 51, 0.15);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: hl-spin-slow 30s linear infinite;
}

@keyframes hl-spin-slow {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.hl-features-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.hl-feature-pill {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    background: var(--hl-card);
    border-radius: var(--hl-radius-sm);
    border: 1px solid rgba(0, 98, 51, 0.08);
    transition: all var(--hl-transition);
}

.hl-feature-pill:hover {
    border-color: var(--hl-green);
    box-shadow: 0 8px 24px rgba(0, 98, 51, 0.1);
    transform: translateY(-2px);
}

.hl-feature-pill__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--hl-green), var(--hl-accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.hl-feature-pill__text strong {
    display: block;
    font-size: 0.95rem;
    color: var(--hl-text);
    margin-bottom: 0.15rem;
}

.hl-feature-pill__text span {
    font-size: 0.8rem;
    color: var(--hl-text-muted);
}

/* ─── Steps ────────────────────────────────────────────── */
.hl-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.hl-step {
    position: relative;
    background: var(--hl-card);
    border-radius: var(--hl-radius);
    padding: 2rem 1.75rem;
    text-align: center;
    box-shadow: var(--hl-shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all var(--hl-transition);
    overflow: hidden;
}

.hl-step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--hl-green), var(--hl-accent));
}

.hl-step:hover {
    transform: translateY(-8px);
    box-shadow: var(--hl-shadow-lg);
}

.hl-step__num {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--hl-green), var(--hl-accent));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
}

.hl-step h4 {
    font-weight: 700;
    color: var(--hl-text);
    margin-bottom: 0.5rem;
}

.hl-step p {
    color: var(--hl-text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

/* ─── Categories ───────────────────────────────────────── */
.hl-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.hl-cat-card {
    position: relative;
    background: var(--hl-card);
    border-radius: var(--hl-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: all var(--hl-transition);
    overflow: hidden;
}

.hl-cat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 98, 51, 0.04), transparent);
    opacity: 0;
    transition: opacity var(--hl-transition);
}

.hl-cat-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hl-shadow);
    border-color: rgba(0, 98, 51, 0.2);
    color: inherit;
}

.hl-cat-card:hover::after {
    opacity: 1;
}

.hl-cat-card__img-wrap {
    width: 88px;
    height: 88px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, rgba(0, 98, 51, 0.08), rgba(39, 174, 96, 0.12));
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--hl-transition);
}

.hl-cat-card:hover .hl-cat-card__img-wrap {
    transform: scale(1.08) rotate(-3deg);
}

.hl-cat-card__img-wrap img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.hl-cat-card__count {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--hl-green);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.hl-cat-card__name {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--hl-text);
}

.hl-cat-card__arrow {
    margin-top: 1rem;
    color: var(--hl-green);
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(8px);
    transition: all var(--hl-transition);
}

.hl-cat-card:hover .hl-cat-card__arrow {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Map teaser ───────────────────────────────────────── */
.hl-map-teaser {
    background: linear-gradient(135deg, #ffffff 0%, #f6fbf8 45%, #f3f7ff 100%) !important;
    border-radius: var(--hl-radius);
    padding: 3rem;
    color: var(--hl-text) !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 98, 51, 0.10) !important;
    box-shadow: var(--hl-shadow) !important;
}

.hl-map-teaser::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/images/national_youth_bg.png') center/cover;
    opacity: 0.06 !important;
}

.hl-map-teaser__content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 260px;
}

.hl-map-teaser h3 {
    font-weight: 800;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--hl-text) !important;
}

.hl-map-teaser p {
    opacity: 1;
    margin-bottom: 0;
    line-height: 1.7;
    color: var(--hl-text-muted) !important;
}

.hl-map-teaser--camp {
    background: linear-gradient(135deg, #fff9f0 0%, #fff5e6 45%, #f6fbf8 100%) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
}

.hl-map-teaser--camp h3 {
    color: #b45309 !important;
}

/* ─── Events ───────────────────────────────────────────── */
.hl-events-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding: 1rem 0 2rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--hl-green) transparent;
}

.hl-events-track::-webkit-scrollbar {
    height: 6px;
}

.hl-events-track::-webkit-scrollbar-thumb {
    background: var(--hl-green);
    border-radius: 10px;
}

.hl-event-card {
    flex: 0 0 300px;
    scroll-snap-align: start;
    background: var(--hl-card);
    border-radius: var(--hl-radius);
    overflow: hidden;
    box-shadow: var(--hl-shadow);
    border: none;
    cursor: pointer;
    transition: all var(--hl-transition);
    text-align: right;
    font: inherit;
    color: inherit;
    padding: 0;
    width: 100%;
    max-width: 300px;
}

.hl-event-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--hl-shadow-lg);
}

.hl-event-card__img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.hl-event-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hl-event-card:hover .hl-event-card__img img {
    transform: scale(1.08);
}

.hl-event-card__date {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--hl-green);
}

.hl-event-card__body {
    padding: 1.25rem;
}

.hl-event-card__title {
    font-weight: 700;
    color: var(--hl-text);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hl-event-card__cta {
    color: var(--hl-green);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Event modal refresh */
.hl-event-modal .modal-content {
    border: none;
    border-radius: var(--hl-radius);
    overflow: hidden;
}

.hl-event-modal .event-hero img {
    max-height: 360px;
    object-fit: cover;
    width: 100%;
}

.btn-hl-gradient {
    background: linear-gradient(135deg, var(--hl-green), var(--hl-accent));
    color: #fff;
    border: none;
    padding: 0.65rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all var(--hl-transition);
}

.btn-hl-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--hl-green-glow);
    color: #fff;
}

/* ─── Gallery ──────────────────────────────────────────── */
.hl-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.hl-gallery__item {
    position: relative;
    border-radius: var(--hl-radius-sm);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.hl-gallery__item a {
    display: block;
    width: 100%;
    height: 100%;
}

.hl-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.3s;
}

.hl-gallery__item:hover img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.hl-gallery__item::after {
    content: '\F52A';
    font-family: 'bootstrap-icons';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    background: rgba(0, 98, 51, 0.45);
    opacity: 0;
    transition: opacity var(--hl-transition);
}

.hl-gallery__item:hover::after {
    opacity: 1;
}

/* ─── Scroll reveal ────────────────────────────────────── */
.hl-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.hl-reveal.hl-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 991px) {
    .hl-about {
        grid-template-columns: 1fr;
    }

    .hl-stats__inner {
        grid-template-columns: repeat(2, 1fr);
    }

    .hl-stat:nth-child(2)::after {
        display: none;
    }

    .hl-steps {
        grid-template-columns: 1fr;
    }

    .hl-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .hl-stats__inner {
        grid-template-columns: 1fr 1fr;
        padding: 1.25rem;
    }

    .hl-stat::after {
        display: none !important;
    }

    .hl-features-mini {
        grid-template-columns: 1fr;
    }

    .hl-map-teaser {
        padding: 2rem 1.5rem;
        text-align: center;
        justify-content: center;
    }

    .home-hero__indicators {
        bottom: 4.5rem;
    }

    .hl-categories {
        grid-template-columns: 1fr;
    }
}

/* ─── Home mobile ───────────────────────────────────────── */
@media (max-width: 767px) {
    .home-hero.hero-section {
        padding: 110px 0 70px;
        min-height: 75vh;
    }

    body.home-page:not(.scrolled) .navbar-collapse {
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(10px);
        border-radius: 16px;
        padding: 0.75rem;
        margin-top: 0.75rem;
    }
}

@media (max-width: 575px) {
    .home-hero__title {
        line-height: 1.18;
    }

    .hl-btn {
        width: 100%;
        justify-content: center;
    }

    .hl-stats {
        margin-top: -2rem;
        padding: 0 0.75rem 2rem;
    }

    .hl-section {
        padding: 3.25rem 0;
    }
}
