/* =========================================================
   KCGF WEBSITE
   FILE: assets/css/header.css
   VERSION: 3.0.0

   PURPOSE:
   - Header and announcement bar
   - Transparent branding and logo
   - Header action buttons
   - Glassmorphism navigation
   - Desktop dropdown navigation
   - Mobile navigation
   - Background decorations
   - Light and dark theme
   - Responsive layout

   DEPENDENCIES:
   - style.css
   - language.css
   - animations.css
   - includes/header.php
   - assets/js/navigation.js
   - assets/js/theme.js
========================================================= */


/* =========================================================
   01. HEADER VARIABLES
========================================================= */

:root {
    --kcgf-header-height: 90px;
    --kcgf-header-radius: 50px;

    --kcgf-header-border: rgba(30, 48, 60, 0.08);

    --kcgf-header-shadow:
        0 8px 30px rgba(29, 43, 56, 0.08);

    --kcgf-header-shadow-hover:
        0 14px 36px rgba(29, 43, 56, 0.14);

    --kcgf-header-transition:
        0.3s cubic-bezier(0.22, 1, 0.36, 1);

    --kcgf-header-menu-background:
        rgba(255, 255, 255, 0.94);

    --kcgf-header-menu-text: #292929;
    --kcgf-header-nav-text: #103653;
}


/* =========================================================
   02. HEADER BASE
========================================================= */

.kcgf-header {
    position: relative;
    z-index: 1000;
    width: 100%;
    background: transparent;
    isolation: isolate;
}

.kcgf-header,
.kcgf-header * {
    box-sizing: border-box;
}

.kcgf-header a {
    text-decoration: none;
}

.kcgf-header button {
    font: inherit;
}

.kcgf-header button,
.kcgf-header a {
    -webkit-tap-highlight-color: transparent;
}

.kcgf-header button:focus-visible,
.kcgf-header a:focus-visible {
    outline: 3px solid var(--kcgf-teal);
    outline-offset: 4px;
}


/* =========================================================
   03. SKIP LINK
========================================================= */

.kcgf-skip-link {
    position: absolute;
    top: -100px;
    left: 15px;
    z-index: 10000;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 20px;

    color: var(--kcgf-white);
    background: var(--kcgf-blue);

    border-radius: 10px;

    font-size: 14px;
    font-weight: 600;

    transition: top 0.25s ease;
}

.kcgf-skip-link:focus {
    top: 15px;
}


/* =========================================================
   04. TOP ANNOUNCEMENT BAR
========================================================= */

.kcgf-topbar {
    position: relative;
    width: 100%;
    min-height: 36px;

    color: rgba(255, 255, 255, 0.92);
    background: var(--kcgf-blue-dark);

    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15px;
}

.kcgf-topbar-inner {
    width: min(1240px, calc(100% - 48px));
    min-height: 36px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.kcgf-topbar-left,
.kcgf-topbar-right {
    display: flex;
    align-items: center;
    gap: 9px;
}

.kcgf-topbar-left {
    min-width: 0;
}

.kcgf-topbar-symbol {
    width: 22px;
    height: 22px;
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #FFD49B;
    background: rgba(255, 255, 255, 0.10);

    border-radius: 50%;
    font-size: 11px;
}

.kcgf-topbar-unit {
    color: #FFD49B;
    font-size: 10px;
    font-weight: 600;
}

.kcgf-parent-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #FFD49B !important;
    text-decoration: none;

    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.kcgf-parent-link:hover {
    color: #FFFFFF !important;
    transform: translateY(-1px);
}

.kcgf-parent-link i {
    font-size: 9px;
    opacity: 0.8;
}


/* =========================================================
   05. BRANDING AREA
   IMPORTANT: FULLY TRANSPARENT
========================================================= */

.kcgf-branding {
    position: relative;
    z-index: 1003;

    width: 100%;

    /* Animated page background remains visible */
    background: transparent;
    background-color: transparent;

    border-bottom: 1px solid transparent;

    box-shadow: none;
}

.kcgf-branding-inner {
    width: min(1240px, calc(100% - 48px));
    min-height: 106px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}


/* Brand link */

.kcgf-brand {
    display: inline-flex;
    align-items: center;
    gap: 15px;

    min-width: 0;

    color: var(--kcgf-text);
    text-decoration: none;

    transition: transform var(--kcgf-header-transition);
}

.kcgf-brand:hover {
    transform: translateY(-2px);
}


/* Logo container */

.kcgf-logo-wrap {
    position: relative;

    width: 76px;
    height: 76px;
    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 5px;

    /* No white box behind logo */
    background: transparent;
    background-color: transparent;

    border: 1px solid rgba(255, 107, 0, 0.12);
    border-radius: 20px;

    box-shadow: none;

    transition:
        border-color var(--kcgf-header-transition),
        transform var(--kcgf-header-transition);
}

.kcgf-brand:hover .kcgf-logo-wrap {
    border-color: rgba(255, 107, 0, 0.45);

    transform:
        perspective(500px)
        rotateY(-8deg)
        rotateX(4deg)
        translateY(-2px);
}

.kcgf-logo {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}


/* Brand text */

.kcgf-brand-text {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;
}

.kcgf-brand-name {
    color: #FF6B00;

    background: linear-gradient(
        110deg,
        #FF6B00 0%,
        #FF8A24 48%,
        #E65300 100%
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    font-family: 'Poppins', sans-serif;
    font-size: clamp(17px, 2vw, 23px);
    font-weight: 800;

    line-height: 1.25;
    letter-spacing: -0.45px;

    overflow-wrap: anywhere;

    transition: filter 0.3s ease;
}

.kcgf-brand:hover .kcgf-brand-name {
    filter: drop-shadow(
        0 3px 8px rgba(255, 107, 0, 0.20)
    );
}

.kcgf-brand-tagline {
    color: var(--kcgf-muted);

    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;

    line-height: 1.5;
    letter-spacing: 0.2px;
}

.kcgf-brand-tagline a {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    color: #E96500;
    font-weight: 700;
    text-decoration: none;

    transition:
        color 0.25s ease,
        gap 0.25s ease;
}

.kcgf-brand-tagline a:hover {
    color: #FF8A24;
    gap: 7px;
}

.kcgf-brand-tagline a i {
    font-size: 8px;
}


/* =========================================================
   06. BRANDING ACTIONS
========================================================= */

.kcgf-branding-actions {
    position: relative;
    z-index: 1004;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 13px;
    flex-shrink: 0;

    background: transparent;
}


/* Theme toggle */

.kcgf-theme-toggle {
    position: relative;

    width: 42px;
    height: 42px;
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--kcgf-blue);
    background: rgba(242, 246, 249, 0.85);

    border: 1px solid rgba(22, 75, 120, 0.08);
    border-radius: 50%;

    cursor: pointer;

    transition:
        color var(--kcgf-header-transition),
        background var(--kcgf-header-transition),
        border-color var(--kcgf-header-transition),
        transform var(--kcgf-header-transition);
}

.kcgf-theme-toggle:hover {
    color: var(--kcgf-white);
    background: var(--kcgf-blue);
    transform: rotate(12deg);
}

.kcgf-theme-toggle i {
    position: absolute;
    font-size: 15px;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.kcgf-theme-toggle .theme-icon-dark {
    opacity: 1;
    transform: rotate(0) scale(1);
}

.kcgf-theme-toggle .theme-icon-light {
    opacity: 0;
    transform: rotate(-45deg) scale(0.6);
}

html[data-theme="dark"] .kcgf-theme-toggle .theme-icon-dark {
    opacity: 0;
    transform: rotate(45deg) scale(0.6);
}

html[data-theme="dark"] .kcgf-theme-toggle .theme-icon-light {
    opacity: 1;
    transform: rotate(0) scale(1);
}


/* Donate button - preserve orange gradient */

.kcgf-donate-btn {
    position: relative;
    overflow: hidden;

    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    padding: 0 22px;

    color: var(--kcgf-white);

    background: linear-gradient(
        135deg,
        var(--kcgf-orange),
        var(--kcgf-orange-dark)
    );

    border: none;
    border-radius: 50px;

    box-shadow:
        0 6px 17px rgba(255, 107, 0, 0.22);

    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;

    text-decoration: none;

    transition:
        color var(--kcgf-header-transition),
        transform var(--kcgf-header-transition),
        box-shadow var(--kcgf-header-transition);
}

.kcgf-donate-btn::before {
    content: "";

    position: absolute;
    top: 0;
    left: -120%;

    width: 80%;
    height: 100%;

    background: linear-gradient(
        110deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );

    transform: skewX(-20deg);
    transition: left 0.65s ease;
}

.kcgf-donate-btn:hover::before {
    left: 140%;
}

.kcgf-donate-btn:hover {
    color: var(--kcgf-white);

    transform: translateY(-3px);

    box-shadow:
        0 10px 24px rgba(255, 107, 0, 0.30);
}

.kcgf-donate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 13px;
}

.kcgf-donate-btn:hover .kcgf-donate-icon {
    animation: kcgf-header-heart-beat 0.7s ease;
}


/* =========================================================
   07. NAVIGATION CONTAINER
========================================================= */

.kcgf-navigation-container {
    position: relative;
    z-index: 1001;

    width: 100%;

    display: flex;
    justify-content: center;

    padding: 0 24px;
    margin-top: -1px;
}


/* =========================================================
   08. CAPSULE NAVBAR
========================================================= */

.kcgf-navbar {
    position: relative;

    width: min(1150px, 100%);
    min-height: 59px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 7px 12px;

    background: rgba(255, 255, 255, 0.66);

    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: var(--kcgf-header-radius);

    box-shadow:
        0 12px 35px rgba(21, 45, 65, 0.10),
        0 3px 10px rgba(21, 45, 65, 0.045),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);

    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);

    transition:
        box-shadow var(--kcgf-header-transition),
        background var(--kcgf-header-transition);
}

.kcgf-navbar:hover {
    box-shadow: var(--kcgf-header-shadow-hover);
}


/* Navigation list */

.kcgf-nav-menu {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 5px;

    padding: 0;
    margin: 0;

    list-style: none;
}

.kcgf-nav-item {
    position: relative;

    display: flex;
    align-items: center;

    min-width: 0;
}


/* Navigation links */

.kcgf-nav-link {
    position: relative;

    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 0 17px;

    color: var(--kcgf-header-nav-text);
    background: transparent;

    border: none;
    border-radius: 30px;

    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;

    transition:
        color var(--kcgf-header-transition),
        background var(--kcgf-header-transition),
        transform var(--kcgf-header-transition);
}

.kcgf-nav-link:hover {
    color: var(--kcgf-orange-dark);
    background: rgba(255, 107, 0, 0.09);

    transform: translateY(-2px);
}


/* Active navigation */

.kcgf-nav-item.active > .kcgf-nav-link {
    color: var(--kcgf-white);

    background: linear-gradient(
        135deg,
        var(--kcgf-orange),
        var(--kcgf-orange-dark)
    );

    box-shadow:
        0 4px 12px rgba(255, 107, 0, 0.19);
}


/* Dropdown arrow */

.kcgf-dropdown-arrow {
    flex-shrink: 0;
    font-size: 9px;

    transition: transform var(--kcgf-header-transition);
}

.kcgf-nav-item.is-open > .kcgf-dropdown-trigger .kcgf-dropdown-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   09. DESKTOP DROPDOWN
========================================================= */

.kcgf-nav-item.has-dropdown {
    position: relative;
}

.kcgf-dropdown-menu {
    position: absolute;

    top: calc(100% + 8px);
    left: 0;

    min-width: 255px;
    max-width: min(320px, calc(100vw - 30px));

    padding: 10px;

    background: rgba(255, 255, 255, 0.90);

    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: 18px;

    box-shadow:
        0 18px 45px rgba(20, 40, 60, 0.16);

    -webkit-backdrop-filter: blur(25px) saturate(180%);
    backdrop-filter: blur(25px) saturate(180%);

    opacity: 0;
    visibility: hidden;

    transform: translateY(8px) scale(0.97);
    transform-origin: top left;

    pointer-events: none;

    transition:
        opacity 0.22s ease,
        visibility 0.22s ease,
        transform 0.22s ease;

    z-index: 1100;
}


/* Desktop dropdown open states */

@media (min-width: 768px) {

    .kcgf-nav-item.has-dropdown:hover > .kcgf-dropdown-menu,
    .kcgf-nav-item.has-dropdown.is-open > .kcgf-dropdown-menu,
    .kcgf-nav-item.has-dropdown:focus-within > .kcgf-dropdown-menu {
        opacity: 1;
        visibility: visible;

        transform: translateY(0) scale(1);

        pointer-events: auto;
    }

    /* Invisible bridge prevents hover gap */

    .kcgf-dropdown-menu::before {
        content: "";

        position: absolute;
        top: -12px;
        left: 0;
        right: 0;

        height: 14px;

        background: transparent;
        pointer-events: auto;
    }

    .kcgf-nav-item.has-dropdown:hover > .kcgf-dropdown-trigger .kcgf-dropdown-arrow {
        transform: rotate(180deg);
    }
}


/* Dropdown inner */

.kcgf-dropdown-inner {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    gap: 3px;
}


/* Dropdown links */

.kcgf-dropdown-link {
    min-height: 43px;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 9px 12px;

    color: var(--kcgf-header-menu-text);

    border: 1px solid transparent;
    border-radius: 11px;

    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;

    text-decoration: none;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        padding 0.25s ease,
        transform 0.25s ease;
}

.kcgf-dropdown-link:hover {
    color: var(--kcgf-orange-dark);
    background: rgba(255, 107, 0, 0.09);

    border-color: rgba(255, 107, 0, 0.10);

    padding-left: 17px;
    transform: translateX(2px);
}

.kcgf-dropdown-link.active {
    color: var(--kcgf-orange-dark);
    background: rgba(255, 107, 0, 0.10);
}


/* Dropdown icon */

.kcgf-dropdown-icon {
    width: 25px;
    height: 25px;
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--kcgf-orange-dark);
    background: rgba(255, 107, 0, 0.10);

    border-radius: 8px;
    font-size: 9px;

    transition:
        color 0.25s ease,
        background 0.25s ease,
        transform 0.25s ease;
}

.kcgf-dropdown-link:hover .kcgf-dropdown-icon {
    color: var(--kcgf-white);
    background: var(--kcgf-orange);

    transform: translateX(3px) rotate(-5deg);
}


/* =========================================================
   10. MOBILE MENU BUTTON
========================================================= */

.kcgf-mobile-toggle {
    display: none;

    width: 43px;
    height: 43px;
    flex-shrink: 0;

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    padding: 0;

    color: var(--kcgf-white);
    background: var(--kcgf-orange);

    border: none;
    border-radius: 50%;

    cursor: pointer;

    transition:
        background var(--kcgf-header-transition),
        transform var(--kcgf-header-transition);
}

.kcgf-mobile-toggle:hover {
    background: var(--kcgf-orange-dark);
}

.kcgf-mobile-toggle span {
    display: block;

    width: 17px;
    height: 2px;

    background: var(--kcgf-white);
    border-radius: 5px;

    transition:
        transform 0.25s ease,
        opacity 0.2s ease;
}


/* Mobile toggle open animation */

.kcgf-mobile-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.kcgf-mobile-toggle.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.kcgf-mobile-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   11. BACKGROUND DECORATIONS
========================================================= */

.kcgf-background-decor {
    position: fixed;
    inset: 0;

    overflow: hidden;

    pointer-events: none;
    user-select: none;

    z-index: 0;
}

.kcgf-decor {
    position: absolute;

    display: flex;
    align-items: center;
    justify-content: center;

    color: rgba(255, 107, 0, 0.06);

    pointer-events: none;
    user-select: none;
}

.kcgf-decor-om {
    top: 100px;
    left: 3%;

    font-size: 70px;
    font-weight: 700;

    animation:
        kcgf-header-decor-float 8s ease-in-out infinite;
}

.kcgf-decor-book {
    top: 180px;
    right: 5%;

    font-size: 38px;

    animation:
        kcgf-header-decor-float 9s ease-in-out infinite reverse;
}

.kcgf-decor-diya {
    top: 430px;
    left: 7%;

    font-size: 35px;

    animation:
        kcgf-header-decor-float 10s ease-in-out infinite;
}

.kcgf-decor-pen {
    top: 520px;
    right: 8%;

    font-size: 36px;

    animation:
        kcgf-header-decor-float 7s ease-in-out infinite reverse;
}


/* Keep website content above background decorations */

.kcgf-header,
.kcgf-page-wrapper {
    position: relative;
    z-index: 1;
}

.kcgf-header {
    z-index: 1000;
}


/* =========================================================
   12. ANIMATIONS
========================================================= */

@keyframes kcgf-header-decor-float {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-18px) rotate(5deg);
    }
}

@keyframes kcgf-header-heart-beat {
    0%,
    100% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.25);
    }

    45% {
        transform: scale(0.95);
    }

    65% {
        transform: scale(1.2);
    }
}

@keyframes kcgf-header-mobile-menu-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   13. DARK THEME
========================================================= */

/* Branding remains transparent in dark mode too */

html[data-theme="dark"] .kcgf-branding {
    background: transparent;
    background-color: transparent;

    border-bottom-color: transparent;
    box-shadow: none;
}

/* Keep orange title visible */

html[data-theme="dark"] .kcgf-brand-name {
    background: linear-gradient(
        110deg,
        #FF8A24,
        #FFB36B
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Logo wrapper remains transparent */

html[data-theme="dark"] .kcgf-logo-wrap {
    background: transparent;
    background-color: transparent;

    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

html[data-theme="dark"] .kcgf-brand-tagline {
    color: #AEBBC5;
}

html[data-theme="dark"] .kcgf-navbar {
    background: rgba(28, 42, 54, 0.76);

    border-color: rgba(255, 255, 255, 0.12);

    box-shadow:
        0 12px 35px rgba(0, 0, 0, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

html[data-theme="dark"] .kcgf-nav-link {
    color: #E8EEF3;
}

html[data-theme="dark"] .kcgf-nav-link:hover {
    color: #FF9A48;
    background: rgba(255, 138, 36, 0.12);
}

html[data-theme="dark"] .kcgf-dropdown-menu {
    color: #E8EEF3;

    background: rgba(28, 42, 54, 0.90);
    border-color: rgba(255, 255, 255, 0.12);

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.35);

    -webkit-backdrop-filter: blur(25px) saturate(150%);
    backdrop-filter: blur(25px) saturate(150%);
}

html[data-theme="dark"] .kcgf-dropdown-link {
    color: #E8EEF3;
}

html[data-theme="dark"] .kcgf-dropdown-link:hover {
    color: #FF9A48;
    background: rgba(255, 138, 36, 0.12);
}

html[data-theme="dark"] .kcgf-dropdown-link.active {
    color: #FF9A48;
    background: rgba(255, 138, 36, 0.15);
}

html[data-theme="dark"] .kcgf-dropdown-icon {
    color: #FF9A48;
    background: rgba(255, 138, 36, 0.14);
}

html[data-theme="dark"] .kcgf-theme-toggle {
    color: #FFD27C;
    background: #263A4A;
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .kcgf-theme-toggle:hover {
    color: #17232D;
    background: #FFD27C;
}


/* =========================================================
   14. LARGE TABLET AND SMALL DESKTOP
========================================================= */

@media (max-width: 1100px) {

    .kcgf-branding-inner {
        width: calc(100% - 36px);
    }

    .kcgf-brand-name {
        font-size: 19px;
    }

    .kcgf-nav-link {
        padding: 0 12px;
        font-size: 11px;
    }

    .kcgf-nav-menu {
        gap: 2px;
    }

    .kcgf-navbar {
        width: 100%;
    }
}


/* =========================================================
   15. TABLET NAVIGATION
========================================================= */

@media (min-width: 768px) and (max-width: 900px) {

    .kcgf-navigation-container {
        padding: 0 14px;
    }

    .kcgf-nav-link {
        padding: 0 9px;
        font-size: 10px;
    }

    .kcgf-navbar {
        padding-left: 7px;
        padding-right: 7px;
    }
}


/* =========================================================
   16. MOBILE NAVIGATION
========================================================= */

@media (max-width: 767px) {

    /* Topbar */

    .kcgf-topbar-inner {
        width: calc(100% - 28px);
        justify-content: center;
    }

    .kcgf-topbar-left {
        font-size: 10px;
        text-align: center;
    }

    .kcgf-topbar-right {
        display: none;
    }


    /* Branding */

    .kcgf-branding-inner {
        width: calc(100% - 28px);
        min-height: 85px;
        gap: 10px;
    }

    .kcgf-brand {
        gap: 10px;
    }

    .kcgf-logo-wrap {
        width: 58px;
        height: 58px;
        border-radius: 15px;
    }

    .kcgf-brand-name {
        font-size: 14px;
        line-height: 1.35;
    }

    .kcgf-brand-tagline {
        max-width: 200px;
        font-size: 9px;
        line-height: 1.4;
    }


    /* Branding actions */

    .kcgf-branding-actions {
        gap: 7px;
    }

    .kcgf-theme-toggle {
        width: 35px;
        height: 35px;
    }

    .kcgf-theme-toggle i {
        font-size: 13px;
    }

    .kcgf-donate-btn {
        min-height: 36px;
        padding: 0 12px;
        gap: 6px;
        font-size: 10px;
    }

    .kcgf-donate-icon {
        font-size: 11px;
    }


    /* Navigation capsule */

    .kcgf-navigation-container {
        padding: 0 14px;
    }

    .kcgf-navbar {
        width: 100%;
        min-height: 55px;

        justify-content: flex-end;

        padding: 6px 9px;
        border-radius: 30px;

        background: rgba(255, 255, 255, 0.78);
    }


    /* Mobile toggle */

    .kcgf-mobile-toggle {
        display: flex;
    }


    /* Mobile menu */

    .kcgf-nav-menu {
        position: absolute;

        top: calc(100% + 10px);
        left: 0;

        width: 100%;

        display: none;

        flex-direction: column;
        align-items: stretch;
        gap: 5px;

        padding: 12px;

        background: rgba(255, 255, 255, 0.94);

        border: 1px solid rgba(255, 255, 255, 0.85);
        border-radius: 22px;

        box-shadow:
            0 15px 40px rgba(25, 43, 58, 0.15);

        -webkit-backdrop-filter: blur(22px) saturate(160%);
        backdrop-filter: blur(22px) saturate(160%);

        max-height: calc(100vh - 180px);
        max-height: calc(100dvh - 180px);

        overflow-y: auto;
        overscroll-behavior: contain;

        z-index: 1200;
    }


    /* JS-controlled mobile menu */

    .kcgf-navbar.is-open .kcgf-nav-menu {
        display: flex;

        animation:
            kcgf-header-mobile-menu-in 0.25s ease both;
    }


    .kcgf-nav-item {
        width: 100%;
        display: block;
    }

    .kcgf-nav-link {
        width: 100%;
        min-height: 44px;

        justify-content: space-between;

        padding: 0 15px;
        font-size: 12px;

        border-radius: 12px;
    }

    .kcgf-nav-item.active > .kcgf-nav-link {
        border-radius: 12px;
    }


    /* Mobile dropdown */

    .kcgf-dropdown-menu {
        position: static;

        display: none;

        width: 100%;
        min-width: 0;
        max-width: none;

        padding: 4px 0 5px 13px;

        background: transparent;

        border: none;
        border-radius: 0;

        box-shadow: none;

        opacity: 1;
        visibility: visible;

        transform: none;

        pointer-events: auto;

        -webkit-backdrop-filter: none;
        backdrop-filter: none;

        transition: none;
    }


    /* Open only when JS applies is-open */

    .kcgf-nav-item.is-open > .kcgf-dropdown-menu {
        display: block;
    }

    .kcgf-dropdown-link {
        min-height: 40px;
        font-size: 11px;
    }

    .kcgf-dropdown-link:hover {
        padding-left: 16px;
    }


    /* Dark mobile menu */

    html[data-theme="dark"] .kcgf-navbar {
        background: rgba(28, 42, 54, 0.82);
    }

    html[data-theme="dark"] .kcgf-nav-menu {
        background: rgba(28, 42, 54, 0.96);
        border-color: rgba(255, 255, 255, 0.10);
    }

    html[data-theme="dark"] .kcgf-dropdown-menu {
        background: transparent;
    }


    /* Background decorations */

    .kcgf-decor {
        opacity: 0.5;
    }

    .kcgf-decor-om {
        font-size: 45px;
    }

    .kcgf-decor-book,
    .kcgf-decor-pen {
        font-size: 25px;
    }
}


/* =========================================================
   17. SMALL MOBILE DEVICES
========================================================= */

@media (max-width: 420px) {

    .kcgf-branding-inner {
        width: calc(100% - 20px);
    }

    .kcgf-logo-wrap {
        width: 49px;
        height: 49px;
    }

    .kcgf-brand {
        gap: 7px;
    }

    .kcgf-brand-name {
        font-size: 12px;
    }

    .kcgf-brand-tagline {
        max-width: 145px;
        font-size: 8px;
    }

    .kcgf-branding-actions {
        gap: 5px;
    }

    .kcgf-theme-toggle {
        width: 31px;
        height: 31px;
    }

    .kcgf-theme-toggle i {
        font-size: 12px;
    }

    .kcgf-donate-btn {
        min-height: 32px;
        padding: 0 9px;
        font-size: 9px;
    }

    .kcgf-donate-icon {
        font-size: 10px;
    }
}


/* =========================================================
   18. EXTRA SMALL DEVICES
========================================================= */

@media (max-width: 350px) {

    .kcgf-branding-inner {
        width: calc(100% - 16px);
        gap: 6px;
    }

    .kcgf-brand {
        gap: 5px;
    }

    .kcgf-logo-wrap {
        width: 43px;
        height: 43px;
        padding: 3px;
    }

    .kcgf-brand-name {
        font-size: 10px;
        letter-spacing: -0.2px;
    }

    .kcgf-brand-tagline {
        max-width: 112px;
        font-size: 7px;
    }

    .kcgf-branding-actions {
        gap: 4px;
    }

    .kcgf-theme-toggle {
        width: 29px;
        height: 29px;
    }

    .kcgf-donate-btn {
        min-height: 30px;
        padding: 0 7px;
        gap: 4px;
        font-size: 8px;
    }
}


/* =========================================================
   19. LANGUAGE DROPDOWN STACKING
   Keep language menu above navigation
========================================================= */

.kcgf-header .kcgf-branding {
    z-index: 1003;
}

.kcgf-header .kcgf-branding-actions {
    position: relative;
    z-index: 1004;
}

.kcgf-header .kcgf-language-switcher {
    position: relative;
    z-index: 1005;
}

.kcgf-header .kcgf-language-menu {
    position: absolute;
    z-index: 1006;
    pointer-events: auto;
}

.kcgf-header .kcgf-navigation-container {
    z-index: 1001;
}

.kcgf-header .kcgf-navbar {
    z-index: 1001;
}


/* =========================================================
   20. REDUCED MOTION ACCESSIBILITY
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .kcgf-header *,
    .kcgf-header *::before,
    .kcgf-header *::after,
    .kcgf-background-decor *,
    .kcgf-mobile-toggle span {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }

    .kcgf-brand:hover,
    .kcgf-logo-wrap,
    .kcgf-nav-link:hover,
    .kcgf-donate-btn:hover,
    .kcgf-theme-toggle:hover {
        transform: none !important;
    }
}
