/* ================================================================
   AHNAF.KZ — LAYOUT CSS
   Base · Variables · Topbar · Header · Nav · Footer · Preloader
   Display: KZ Unbounded | Body: Golos Text
================================================================ */

@font-face {
    font-family: 'KZ Unbounded';
    src: url('../../fonts/KZunb/regular.ttf') format('truetype');
    font-weight: 400 700;
    font-display: swap;
}

:root {
    --teal:       #0B6E6B;
    --teal-dark:  #084F4D;
    --teal-deep:  #063B39;
    --teal-light: #BDE2E0;
    --mint:       #E1F5F4;
    --mint-soft:  #E6F2F1;
    --navy:       #1E3A5F;
    --navy-deep:  #16294a;
    --ink:        #1A2332;
    --ink-2:      #2E3A4F;
    --muted:      #74808F;
    --gold:       #B8935E;
    --cream:      #F3F1EC;
    --cream-2:    #E8E4DC;
    --bg:         #FAFAF7;
    --white:      #fff;
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 20px;
    --r-xl: 28px;
    --sh-sm: 0 0 20px rgba(1,31,30,.08);
    --sh-md: 0 6px 24px rgba(26,35,50,.10);
    --sh-card: 0 0 20px rgba(1,31,30,.10);
    --tr: .3s ease;
    --container: 1376px;
    --header-h: 74px;
    --font-display: 'KZ Unbounded', 'Golos Text', sans-serif;
    --font-body: 'Golos Text', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    overflow-x: hidden;
}
a   { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 16px;
}
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* ── Preloader (белый, спокойный) ──────────────────────── */
.preloader {
    position: fixed; inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center; justify-content: center;
    background: #fff;
    transition: opacity .55s ease, transform .55s ease, visibility .55s ease;
}
.preloader.is-hidden {
    opacity: 0;
    /* transform: translateY(-40px); */
    visibility: hidden;
    pointer-events: none;
}
.preloader__box {
    display: flex; flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
}
.preloader__logo {
    width: 64px; max-width: 64px; height: auto;
    object-fit: contain;
    animation: preloader-float 2.4s ease-in-out infinite;
}
@media (max-width: 480px) { .preloader__logo { width: 56px; } }
.preloader__line {
    width: 84px; height: 2px;
    border-radius: 2px;
    background: var(--cream-2);
    position: relative;
    overflow: hidden;
}
.preloader__line::after {
    content: '';
    position: absolute; left: 0; top: 0;
    width: 100%; height: 100%;
    border-radius: 2px;
    background: var(--teal);
    transform-origin: left;
    animation: preloader-grow 1.6s ease-in-out infinite;
}
.preloader__text {
    font-size: 11.5px; font-weight: 400;
    letter-spacing: .05em; text-transform: uppercase;
    color: var(--muted); text-align: center;
    color: var(--ink-2);
}
.preloader__text-small{
    font-size: 9px;
    color: var(--muted);
    font-weight: 400;
}
@keyframes preloader-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}
@keyframes preloader-grow {
    0%   { transform: scaleX(0); }
    50%  { transform: scaleX(1); }
    100% { transform: scaleX(0); }
}

/* ── Topbar (светлый) ──────────────────────────────────────── */
.topbar {
    background: var(--bg);
    height: 34px;
}
.topbar__inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.topbar__date {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar__right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.topbar__link {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 500;
    color: var(--ink-2);
    transition: color var(--tr);
}
.topbar__link:hover { color: var(--teal); }
.topbar__link svg { color: var(--teal); }

@media (max-width:768px) {
    .topbar{
        display: none;
    }
}
/* ── Header ────────────────────────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 90;
    background: var(--white);
    border-bottom: 1px solid var(--cream-2);
    transition: transform .4s ease;
    will-change: transform;
}
/* hide-on-scroll-down / show-on-scroll-up (как ihsan.kz) */
.site-header.is-hidden { transform: translateY(-100%); }

/* На мобиле header — fixed, контент отступает вниз */
@media (max-width: 640px) {
    .site-header { position: fixed; left: 0; right: 0; top: 0; }
    .site-main { padding-top: 66px; }
}

.header__inner {
    display: flex; align-items: center; gap: 24px;
    height: var(--header-h);
}
@media (max-width: 640px) {
.header__inner {
    height: 66px;
}
}


.header__brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.header__logo-img { height: 34px; width: auto; }
@media (max-width: 640px) {
.header__logo-img { height: 28px; width: auto; }
}
.header__brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.header__brand-name {
    font-family: var(--font-body);
    font-size: 18px; font-weight: 600;
    color: var(--teal);
}
.header__brand-sub {
    font-size: 10px; font-weight: 500;
    color: var(--muted);
    letter-spacing: .01em;
}
@media (max-width: 480px) {
    .header__brand-sub {
        font-size: 8.5px;      /* чуть мельче чтобы влезло */
        letter-spacing: 0;
    }
}

.site-nav { flex: 1; display: flex; justify-content: center; }
.nav__list {
    display: flex; align-items: center;
    gap: 2px;
    justify-content: center;
}
.nav__list li { position: relative; }
.nav__list a, .nav__dropdown-trigger {
    display: inline-flex; align-items: center;
    padding: 8px 11px;
    font-size: 13.5px; font-weight: 500;
    color: var(--ink);
    border-radius: var(--r-sm);
    white-space: nowrap;
    cursor: pointer;
    transition: color var(--tr), background var(--tr);
}
.nav__list a:hover, .nav__dropdown-trigger:hover { color: var(--teal); }
.nav__list a.is-active {
    color: var(--teal); font-weight: 600;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.nav__sadaka {
    flex-shrink: 0;
    background: var(--teal);
    color: #fff;
    font-size: 14px; font-weight: 500;
    padding: 9px 20px;
    border-radius: 22px;
    white-space: nowrap;
    transition: background var(--tr);
}
.nav__sadaka:hover { background: var(--teal-dark); }
@media (max-width: 640px) { .nav__sadaka { display: none; } }

/* Dropdown */
.has-dropdown { position: relative; }
.nav__dropdown {
    display: none;
    position: absolute; top: calc(100% + 6px); right: 0;
    background: var(--white);
    border-radius: var(--r-md);
    box-shadow: var(--sh-md);
    padding: 8px;
    min-width: 210px;
    z-index: 200;
}
.nav__dropdown li a { display: block; padding: 9px 14px; font-size: 13px; border-radius: var(--r-sm); }
.nav__dropdown li a:hover { background: var(--mint); }
/* .has-dropdown:hover .nav__dropdown { display: block; } */
.has-dropdown:hover .nav__dropdown { display: none; }

/* Progressive collapse */
@media (max-width: 1280px) { .nav__hide-2 { display: none !important; } }
@media (max-width: 1180px) { .nav__hide-3 { display: none !important; } }
@media (max-width: 1080px) { .nav__hide-4 { display: none !important; } }
@media (max-width: 980px)  { .nav__hide-6 { display: none !important; } }
@media (max-width: 880px)  { .nav__hide-5 { display: none !important; } }
@media (max-width: 780px)  { .nav__hide-1 { display: none !important; } }
@media (max-width: 640px)  { .site-nav     { display: none !important; } }

/* Burger */
.nav-burger {
    display: none;
    flex-direction: column; gap: 5px;
    padding: 8px;
    margin-left: auto;
}
.nav-burger span {
    width: 22px; height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform var(--tr), opacity var(--tr);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 640px) { .nav-burger { display: flex; } }

/* ── Mobile off-canvas menu (справа налево, 75vw) ──────────── */
.mobile-overlay {
    position: fixed; inset: 0;
    background: rgba(10, 20, 25, .55);
    backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
    z-index: 95;
}
.mobile-overlay.is-open { opacity: 1; visibility: visible; }

.mobile-menu {
    position: fixed; top: 0; right: 0;
    width: 75vw; max-width: 340px;
    height: 100%;
    background: var(--white);
    z-index: 96;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .38s cubic-bezier(.4, 0, .2, 1);
    box-shadow: -8px 0 32px rgba(10, 20, 25, .18);
}
.mobile-menu.is-open { transform: translateX(0); }

.mobile-menu__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 13px 20px;
    border-bottom: 1px solid var(--cream-2);
}
.mobile-menu__brand { display: flex; align-items: center; gap: 9px; }
.mobile-menu__logo { height: 26px; width: auto; }
.mobile-menu__brand span { font-size: 17px; font-weight: 600; color: var(--teal); }
.mobile-menu__close {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--ink); background: var(--bg);
    transition: background var(--tr), color var(--tr);
}
.mobile-menu__close:hover { background: var(--mint); color: var(--teal); }

.mobile-menu__nav {
    flex: 1;
    display: flex; flex-direction: column;
    padding: 14px 14px;
    gap: 2px;
    overflow-y: auto;
}
.mobile-menu__link {
    display: flex; align-items: center;
    padding: 14px 16px;
    font-size: 15px; font-weight: 500;
    color: var(--ink);
    border-radius: var(--r-md);
    transition: background var(--tr), color var(--tr), padding-left var(--tr);
}
.mobile-menu__link:hover,
.mobile-menu__link:active {
    background: var(--mint);
    color: var(--teal);
    padding-left: 22px;
}

.mobile-menu__foot {
    padding: 16px 20px 24px;
    border-top: 1px solid var(--cream-2);
}
.mobile-menu__sadaka {
    display: flex; align-items: center; justify-content: center;
    width: 100%;
    padding: 14px;
    background: var(--teal);
    color: #fff;
    font-size: 15px; font-weight: 600;
    border-radius: 24px;
    transition: background var(--tr);
}
.mobile-menu__sadaka:hover { background: var(--teal-dark); }

body.menu-open { overflow: hidden; }


/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    background: var(--ink);
    color: rgba(255,255,255,.65);
    padding: 52px 0 28px;
}
.footer__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 34px;
    margin-bottom: 44px;
}
@media (min-width: 600px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }

.footer__logo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer__logo { height: 28px; width: auto; }
.footer__logo-name {
    font-family: var(--font-display);
    font-size: 17px; font-weight: 400;
    color: #fff;
}
.footer__address {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    line-height: 1.6;
    margin-bottom: 12px;
}
.footer__map-link {
    font-size: 12px; font-weight: 600;
    color: var(--teal-light);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--tr);
}
.footer__map-link:hover { color: #fff; }

.footer__col h4 {
    font-size: 11px; font-weight: 400;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 9px; }
.footer__col li a {
    font-size: 13.5px;
    color: rgba(255,255,255,.6);
    transition: color var(--tr);
}
.footer__col li a:hover { color: #fff; }
.footer__phone { font-size: 14.5px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.footer__social { display: flex; gap: 9px; }
.footer__social a {
    width: 34px; height: 34px;
    background: rgba(255,255,255,.09);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--tr);
}
.footer__social a:hover { background: var(--teal); }
.footer__social a img { width: 14px; height: 14px; }

.footer__bottom {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,.09);
}
.footer__bottom p { font-size: 11.5px; color: rgba(255,255,255,.3); }
.footer__bottom a { text-decoration: underline; transition: color var(--tr); }
.footer__bottom a:hover { color: rgba(255,255,255,.6); }

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}