/* -------------------------------------------------------------
   #1 BASIS
   ------------------------------------------------------------- */

:root {
    --tg-header-bg: rgba(255, 255, 255, 0.94);
    --tg-topbar-bg: linear-gradient(90deg, #020617 0%, #0f172a 100%);
    --tg-text-dark: #0f172a;
    --tg-text-soft: #64748b;
    --tg-text-light: #ffffff;
    --tg-border: rgba(15, 23, 42, 0.08);
    --tg-border-light: rgba(255, 255, 255, 0.12);
    --tg-primary: #0d89ff;
    --tg-accent: #18d0d0;
    --tg-hover-bg: rgba(13, 137, 255, 0.08);
    --tg-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    --tg-radius: 18px;
    --tg-container: 1320px;
}

/* -------------------------------------------------------------
   #2 CONTAINER
   ------------------------------------------------------------- */

.tg-container {
    width: min(100% - 32px, var(--tg-container));
    margin-inline: auto;
}

/* -------------------------------------------------------------
   #3 TOPBAR
   ------------------------------------------------------------- */

.tg-topbar {
    background: var(--tg-topbar-bg);
    color: var(--tg-text-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tg-topbar__inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

.tg-topbar__left,
.tg-topbar__right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 22px;
}

.tg-topbar__item,
.tg-topbar__right a {
    font-size: 0.94rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
}

.tg-topbar__item a,
.tg-topbar__right a:hover {
    color: #ffffff;
}

/* -------------------------------------------------------------
   #4 HEADER
   ------------------------------------------------------------- */

.tg-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: var(--tg-header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--tg-border);
}

.tg-header.is-scrolled {
    box-shadow: var(--tg-shadow);
}

.tg-header__inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* -------------------------------------------------------------
   #5 BRAND
   ------------------------------------------------------------- */

.tg-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    flex: 0 0 auto;
    min-width: 260px;
    max-width: 340px;
}

.tg-brand__logo {
    width: 66px;
    height: 66px;
    object-fit: contain;
    flex-shrink: 0;
}

.tg-brand__text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tg-brand__title {
    font-size: 1.05rem;
    line-height: 1.15;
    font-weight: 800;
    color: var(--tg-text-dark);
}

.tg-brand__subtitle {
    font-size: 0.92rem;
    line-height: 1.2;
    color: var(--tg-text-soft);
}

/* -------------------------------------------------------------
   #6 DESKTOP NAV
   ------------------------------------------------------------- */


.tg-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
}

.tg-nav__list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.tg-nav__item {
    position: relative;
}

.tg-nav__link,
.tg-nav__button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 14px;
    border: 0;
    background: transparent;
    color: var(--tg-text-dark);
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.tg-nav__link:hover,
.tg-nav__button-link:hover,
.tg-nav__item.is-active > .tg-nav__link {
    background: var(--tg-hover-bg);
    color: var(--tg-text-dark);
}

.tg-nav__arrow {
    font-size: 0.8rem;
    line-height: 1;
}

/* -------------------------------------------------------------
   #7 DROPDOWN
   ------------------------------------------------------------- */

.tg-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 250px;
    padding: 10px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--tg-border);
    box-shadow: var(--tg-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.22s ease;
    z-index: 50;
}

.tg-nav__item--has-dropdown:hover .tg-dropdown,
.tg-nav__item--has-dropdown:focus-within .tg-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tg-dropdown__link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--tg-text-dark);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tg-dropdown__link:hover {
    background: var(--tg-hover-bg);
}

/* -------------------------------------------------------------
   #8 BURGER
   ------------------------------------------------------------- */

.tg-burger {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid var(--tg-border);
    border-radius: 14px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}
.tg-burger {
    flex: 0 0 auto;
}

.tg-burger span {
    width: 20px;
    height: 2px;
    background: var(--tg-text-dark);
    border-radius: 2px;
}

/* -------------------------------------------------------------
   #9 OVERLAY
   ------------------------------------------------------------- */

.tg-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: 0.2s ease;
    z-index: 1250;
}

.tg-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* -------------------------------------------------------------
   #10 MOBILE MENU
   ------------------------------------------------------------- */

.tg-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: min(92vw, 390px);
    height: 100dvh;
    background: #ffffff;
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform 0.28s ease;
    z-index: 1300;
    display: flex;
    flex-direction: column;
}

.tg-mobile-menu.is-open {
    transform: translateX(0);
}

.tg-mobile-menu__header {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--tg-border);
}

.tg-mobile-menu__close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
}

.tg-mobile-nav {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.tg-mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tg-mobile-nav__item + .tg-mobile-nav__item {
    margin-top: 10px;
}

.tg-mobile-nav__link,
.tg-mobile-nav__toggle {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
    border-radius: 16px;
    border: 1px solid var(--tg-border);
    background: #ffffff;
    color: var(--tg-text-dark);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.tg-mobile-nav__toggle-icon {
    font-size: 1.2rem;
    color: var(--tg-primary);
}

.tg-mobile-subnav {
    display: none;
    padding: 10px 8px 4px 8px;
}

.tg-mobile-subnav.is-open {
    display: block;
}

.tg-mobile-subnav__link {
    display: block;
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--tg-text-soft);
    text-decoration: none;
    font-weight: 600;
}

.tg-mobile-subnav__link:hover {
    background: var(--tg-hover-bg);
    color: var(--tg-text-dark);
}

.tg-mobile-menu__footer {
    padding: 18px 20px 22px;
    border-top: 1px solid var(--tg-border);
}

.tg-mobile-menu__contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    width: 100%;
    padding: 0 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0d89ff 0%, #18d0d0 100%);
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(13, 137, 255, 0.24);
}

/* -------------------------------------------------------------
   #11 LARGE DESKTOP
   ------------------------------------------------------------- */

@media (max-width: 1340px) {
    .tg-header__inner {
        gap: 18px;
    }

    .tg-nav__link,
    .tg-nav__button-link {
        padding: 0 12px;
        font-size: 0.95rem;
    }

    .tg-brand__title {
        font-size: 0.98rem;
    }

    .tg-brand__subtitle {
        font-size: 0.86rem;
    }
}

/* -------------------------------------------------------------
   #12 TABLET / MOBILE NAV SWITCH
   ------------------------------------------------------------- */

@media (max-width: 1320px) {
    .tg-nav {
        display: none;
    }

    .tg-burger {
        display: inline-flex;
    }

    .tg-header__inner {
        grid-template-columns: 1fr auto;
    }
}

/* -------------------------------------------------------------
   #13 MOBILE
   ------------------------------------------------------------- */

@media (max-width: 768px) {
    .tg-topbar {
        display: none;
    }

    .tg-header__inner {
        min-height: 78px;
        gap: 12px;
    }

    .tg-brand {
        gap: 10px;
        max-width: calc(100% - 58px);
    }

    .tg-brand__logo {
        width: 52px;
        height: 52px;
    }

    .tg-brand__title {
        font-size: 0.96rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tg-brand__subtitle {
        font-size: 0.78rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* -------------------------------------------------------------
   #14 SMALL MOBILE
   ------------------------------------------------------------- */

@media (max-width: 420px) {
    .tg-container {
        width: min(100% - 22px, var(--tg-container));
    }

    .tg-header__inner {
        min-height: 74px;
    }

    .tg-brand__logo {
        width: 46px;
        height: 46px;
    }

    .tg-brand__title {
        font-size: 0.9rem;
    }

    .tg-brand__subtitle {
        font-size: 0.74rem;
    }

    .tg-burger {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .tg-mobile-menu {
        width: 100%;
    }
}


@media (max-width: 1500px) {
    .tg-brand {
        min-width: 220px;
        max-width: 300px;
    }

    .tg-brand__logo {
        width: 56px;
        height: 56px;
    }

    .tg-brand__title {
        font-size: 0.95rem;
        line-height: 1.1;
    }

    .tg-brand__subtitle {
        font-size: 0.8rem;
        line-height: 1.1;
    }

    .tg-nav__link,
    .tg-nav__button-link {
        min-height: 42px;
        padding: 0 10px;
        font-size: 0.92rem;
    }
}

/* -------------------------------------------------------------
   # MOBILE ACTIVE STATE
------------------------------------------------------------- */

.tg-mobile-nav__item.is-active > .tg-mobile-nav__link {
    background: rgba(13, 137, 255, 0.12);
    color: #0f172a;
    border-color: rgba(13, 137, 255, 0.3);
}

/* =========================================================
   #18 TOPBAR
========================================================= */
.tg-topbar {
    position: relative;
    z-index: 30;
    background:
        linear-gradient(90deg, rgba(4, 18, 38, 0.96), rgba(10, 35, 68, 0.94));
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
    color: #eaf4ff;
}

.tg-topbar__inner {
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.tg-topbar__left,
.tg-topbar__right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 12px;
}

.tg-topbar__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    line-height: 1.2;
    white-space: nowrap;
}

.tg-topbar__label {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.10);
    font-size: 13px;
    flex: 0 0 24px;
}

.tg-topbar__item strong {
    color: #ffffff;
    font-weight: 700;
}

.tg-topbar__item a {
    color: #dff0ff;
    text-decoration: none;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.tg-topbar__item a:hover {
    color: #ffffff;
}

.tg-topbar__right {
    justify-content: flex-end;
}

.tg-topbar__social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.10);
    transition:
        transform 0.25s ease,
        background 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.tg-topbar__social:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   Responsive
========================================================= */
@media (max-width: 1200px) {
    .tg-topbar__inner {
        justify-content: center;
    }

    .tg-topbar__left,
    .tg-topbar__right {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .tg-topbar {
        font-size: 13px;
    }

    .tg-topbar__inner {
        min-height: auto;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .tg-topbar__left,
    .tg-topbar__right {
        width: 100%;
        justify-content: center;
    }

    .tg-topbar__item {
        white-space: normal;
        justify-content: center;
        text-align: center;
        width: 100%;
        border-radius: 14px;
    }

    .tg-topbar__social {
        flex: 1 1 auto;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .tg-topbar__social {
        width: 100%;
    }
}

/* WhatsApp */
.tg-topbar__right a[href*="wa.me"]:hover {
    background: #25D366;
    border-color: #25D366;
    color: #fff;
}

/* Telegram */
.tg-topbar__right a[href*="t.me"]:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: #fff;
}

/* Instagram */
.tg-topbar__right a[href*="instagram"]:hover {
    background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
    border-color: transparent;
    color: #fff;
}

/* LinkedIn */
.tg-topbar__right a[href*="linkedin"]:hover {
    background: #0A66C2;
    border-color: #0A66C2;
    color: #fff;
}

