/**
 * @file layout.css
 * @description Site-wide header, mobile drawer menu, language switcher and footer styles
 * @author Erdinç Taze
 * @copyright
 */

:root {
    --site-navy: #0b1736;
    --site-navy-2: #15275a;
    --site-orange: #ffa633;
    --site-orange-dark: #f28c0f;
    --site-orange-soft: #fff4e5;
    --site-ink: #0f172a;
    --site-text: #475569;
    --site-muted: #64748b;
    --site-line: #e7ebf3;
    --site-soft: #f5f7fb;
    --site-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --site-header-height: 76px;
    --site-font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --site-font-heading: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --bs-font-sans-serif: var(--site-font-body);
    --bs-body-font-family: var(--site-font-body);
}

/* ===============================
   Typography
   =============================== */
html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--site-font-body);
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--site-font-heading);
    letter-spacing: -0.015em;
}

h1, h2, .h1, .h2 {
    font-weight: 800;
}

button, input, select, textarea, optgroup,
.select2-container, .bootstrap-datetimepicker-widget {
    font-family: inherit;
}

/* ===============================
   Shared buttons
   =============================== */
.site-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: transform 0.25s var(--site-ease), box-shadow 0.25s var(--site-ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-btn:hover {
    transform: translateY(-1px);
}

.site-btn-whatsapp {
    background: #25d366;
    color: #fff;
    box-shadow: 0 10px 20px -10px rgba(37, 211, 102, 0.8);
}

.site-btn-whatsapp:hover,
.site-btn-whatsapp:focus {
    background: #1ebe5b;
    color: #fff;
}

.site-btn-whatsapp i {
    font-size: 1.2rem;
}

.site-btn-primary {
    background: linear-gradient(135deg, var(--site-orange) 0%, var(--site-orange-dark) 100%);
    color: #fff;
    box-shadow: 0 10px 20px -10px rgba(242, 140, 15, 0.75);
}

.site-btn-primary:hover,
.site-btn-primary:focus {
    color: #fff;
    box-shadow: 0 14px 26px -10px rgba(242, 140, 15, 0.85);
}

.site-btn-dark {
    background: var(--site-navy);
    color: #fff;
}

.site-btn-dark:hover,
.site-btn-dark:focus {
    background: var(--site-orange-dark);
    color: #fff;
}

.site-btn:disabled {
    opacity: 0.65;
    transform: none;
    cursor: not-allowed;
}

.site-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.site-btn-ghost:hover,
.site-btn-ghost:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}

.site-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid var(--site-line);
    background: #fff;
    color: var(--site-ink);
    font-size: 1.15rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.site-icon-btn:hover {
    border-color: var(--site-orange);
    color: var(--site-orange-dark);
}

/* ===============================
   Header
   =============================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--site-line);
    box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.25);
}

.site-header-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--site-header-height);
}

.site-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo img {
    width: auto;
    height: 50px;
}

.site-nav {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-nav-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 auto;
}

.site-nav-desktop a {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 999px;
    color: var(--site-ink);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.site-nav-desktop a:hover {
    background: var(--site-soft);
    color: var(--site-orange-dark);
}

.site-nav-desktop .active a {
    background: var(--site-orange-soft);
    color: var(--site-orange-dark);
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.site-nav-desktop + .site-actions {
    margin-left: 0;
}

/* Language switcher */
.site-lang {
    position: relative;
}

.site-lang .language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--site-line);
    background: #fff;
    color: var(--site-ink);
    font-size: 0.875rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.site-lang .language-switcher:hover {
    border-color: var(--site-orange);
    background: var(--site-orange-soft);
}

.site-lang-flag {
    width: 20px;
    height: 14px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.site-lang .dropdown-arrow {
    color: var(--site-muted);
    font-size: 0.7rem;
    transition: transform 0.25s var(--site-ease);
}

.site-lang .dropdown-arrow.rotate {
    transform: rotate(180deg);
}

.site-lang .language-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 10;
    min-width: 210px;
    margin: 0;
    padding: 8px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 24px 48px -16px rgba(11, 23, 54, 0.35), 0 0 0 1px rgba(15, 23, 42, 0.06);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.25s var(--site-ease), visibility 0.2s;
}

.site-lang .language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-lang .language-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--site-ink);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.site-lang .language-dropdown a:hover {
    background: var(--site-orange-soft);
    color: var(--site-orange-dark);
}

.site-lang .language-dropdown img {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.site-lang-code {
    margin-left: auto;
    color: var(--site-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

/* Burger */
.site-burger {
    display: none;
    flex-direction: column;
    gap: 4px;
}

.site-burger span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: width 0.25s var(--site-ease);
}

.site-burger span:nth-child(2) {
    width: 12px;
    align-self: flex-end;
    margin-right: 12px;
}

.site-burger:hover span:nth-child(2) {
    width: 18px;
    margin-right: 12px;
}

/* ===============================
   Mobile drawer
   =============================== */
.site-drawer {
    display: none;
}

@media (max-width: 991.98px) {
    :root {
        --site-header-height: 66px;
    }

    .site-header-bar {
        gap: 12px;
    }

    .site-logo img {
        height: 42px;
    }

    .site-nav-desktop,
    .site-header-cta {
        display: none;
    }

    .site-actions {
        margin-left: auto !important;
        gap: 8px;
    }

    .site-burger {
        display: inline-flex;
    }

    .site-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1040;
        display: flex;
        flex-direction: column;
        width: min(360px, 88vw);
        padding: 18px 20px 24px;
        background: #fff;
        box-shadow: -24px 0 60px -20px rgba(11, 23, 54, 0.45);
        overflow-y: auto;
        transform: translateX(105%);
        visibility: hidden;
        transition: transform 0.4s var(--site-ease), visibility 0.4s;
    }

    html.menu-opened .site-drawer {
        transform: translateX(0);
        visibility: visible;
    }

    html.menu-opened,
    html.menu-opened body {
        overflow: hidden;
    }

    /* Zendesk sets the launcher position inline, so it must be overridden with !important. */
    html.menu-opened iframe#launcher,
    html.menu-opened .progress-wrap {
        visibility: hidden !important;
    }

    .sidebar-overlay {
        left: 0;
        background: rgba(11, 23, 54, 0.55);
        backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s;
    }

    html.menu-opened .sidebar-overlay,
    .sidebar-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    .site-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 16px;
        margin-bottom: 12px;
        border-bottom: 1px solid var(--site-line);
    }

    .site-nav-mobile {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .site-nav-mobile a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 14px;
        border-radius: 12px;
        color: var(--site-ink);
        font-size: 1.05rem;
        font-weight: 600;
        text-decoration: none;
        transition: background-color 0.2s ease, color 0.2s ease, padding 0.25s var(--site-ease);
    }

    .site-nav-mobile a i {
        color: #cbd5e1;
        font-size: 0.8rem;
        transition: color 0.2s ease, transform 0.25s var(--site-ease);
    }

    .site-nav-mobile a:hover {
        background: var(--site-soft);
        padding-left: 18px;
    }

    .site-nav-mobile a:hover i {
        color: var(--site-orange-dark);
        transform: translateX(3px);
    }

    .site-nav-mobile .active a {
        background: var(--site-orange-soft);
        color: var(--site-orange-dark);
    }

    .site-nav-mobile .active a i {
        color: var(--site-orange-dark);
    }

    html.menu-opened .site-nav-mobile li {
        animation: siteDrawerItem 0.45s var(--site-ease) both;
    }

    html.menu-opened .site-nav-mobile li:nth-child(2) { animation-delay: 0.04s; }
    html.menu-opened .site-nav-mobile li:nth-child(3) { animation-delay: 0.08s; }
    html.menu-opened .site-nav-mobile li:nth-child(4) { animation-delay: 0.12s; }
    html.menu-opened .site-nav-mobile li:nth-child(5) { animation-delay: 0.16s; }
    html.menu-opened .site-nav-mobile li:nth-child(6) { animation-delay: 0.2s; }

    .site-drawer-footer {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: auto;
        padding-top: 24px;
    }

    .site-drawer-footer .site-btn {
        width: 100%;
        height: 50px;
    }

    .site-drawer-contact {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--site-text);
        font-weight: 500;
        text-decoration: none;
        word-break: break-all;
    }

    .site-drawer-contact span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 38px;
        height: 38px;
        border-radius: 10px;
        background: var(--site-orange-soft);
        color: var(--site-orange-dark);
    }

    .site-drawer-contact:hover {
        color: var(--site-orange-dark);
    }
}

@media (max-width: 400px) {
    .site-lang .language-switcher {
        padding: 0 10px;
        gap: 6px;
    }

    .site-logo img {
        height: 38px;
    }
}

@keyframes siteDrawerItem {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===============================
   Footer
   =============================== */
.site-footer {
    position: relative;
    overflow: hidden;
    padding-top: 72px;
    background: linear-gradient(160deg, var(--site-navy) 0%, var(--site-navy-2) 100%);
    color: rgba(255, 255, 255, 0.7);
}

.site-footer::before {
    content: "";
    position: absolute;
    top: -220px;
    right: -160px;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 166, 51, 0.22) 0%, rgba(255, 166, 51, 0) 70%);
    pointer-events: none;
}

.site-footer .container {
    position: relative;
}

.site-footer-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px 32px;
    padding: 30px 36px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--site-orange);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.site-footer-cta h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 700;
    line-height: 1.3;
}

.site-footer-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.site-footer-cta-actions .site-btn {
    height: 50px;
    padding: 0 24px;
}

.site-footer-main {
    padding: 56px 0 48px;
}

.site-footer-logo {
    display: inline-flex;
    padding: 10px 18px;
    border-radius: 16px;
    background: #fff;
}

.site-footer-logo img {
    width: auto;
    height: 46px;
}

.site-footer-about {
    max-width: 440px;
    margin: 22px 0 24px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.75;
}

.site-footer-social {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.25s var(--site-ease);
}

.site-footer-social a:hover {
    background: var(--site-orange);
    color: #fff;
    transform: translateY(-2px);
}

.site-footer-title {
    position: relative;
    margin-bottom: 26px;
    padding-bottom: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.site-footer-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 28px;
    height: 3px;
    border-radius: 3px;
    background: var(--site-orange);
}

.site-footer-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-links li + li {
    margin-top: 12px;
}

.site-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.25s var(--site-ease);
}

.site-footer-links a::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 166, 51, 0.6);
    transition: background-color 0.2s ease;
}

.site-footer-links a:hover {
    color: #fff;
    transform: translateX(4px);
}

.site-footer-links a:hover::before {
    background: var(--site-orange);
}

.site-footer-contact {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-contact li {
    display: flex;
    align-items: center;
    gap: 12px;
    word-break: break-word;
}

.site-footer-contact li + li {
    margin-top: 14px;
}

.site-footer-contact a {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer-contact a:hover {
    color: var(--site-orange);
}

.site-footer-contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 166, 51, 0.14);
    color: var(--site-orange);
}

.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer-copyright {
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.site-footer-copyright span {
    color: #fff;
    font-weight: 600;
}

.site-footer-payments {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer-payments img {
    width: auto;
    height: 28px;
    padding: 3px 6px;
    border-radius: 6px;
    background: #fff;
}

@media (max-width: 767.98px) {
    .site-footer {
        padding-top: 48px;
    }

    .site-footer-cta {
        padding: 24px;
    }

    .site-footer-cta-actions,
    .site-footer-cta-actions .site-btn {
        width: 100%;
    }

    .site-footer-main {
        padding: 40px 0 32px;
    }

    .site-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.menu-opened .site-nav-mobile li {
        animation: none;
    }
}
