/* ==========================================================================
   Floating Header CSS
   ========================================================================== */

:root {
    --fh-bg: rgba(255, 255, 255, 0.85);
    --fh-border: rgba(3, 31, 66, 0.08);
    --fh-text: #031F42;
    --fh-text-hover: #1f3f98;
    --fh-shadow: 0 10px 30px -10px rgba(3, 31, 66, 0.15), 0 1px 3px rgba(3, 31, 66, 0.05);
}

body.mobile-menu-open {
    overflow: hidden;
    height: 100vh;
}

.floating-header-container {
    position: sticky;
    top: 20px;
    z-index: 1100;           /* scroll-expand-hero (z:10) ve mobile sheet (z:9999) arasında değil, hepsinin üstünde */
    margin: 0 auto;
    width: 92%;
    max-width: 1200px;
    background: var(--fh-bg);
    box-shadow: var(--fh-shadow);
    border-radius: 100px;
    backdrop-filter: blur(12px);
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    padding: 8px 16px;
}

body.modal-open .floating-header-container,
body.modal-open .custom-topbar {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(-15px);
}

.custom-topbar {
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.floating-header-container.is-scrolled {
    top: 10px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 40px -12px rgba(3, 31, 66, 0.25);
}

/* Blur desteklenmeyen tarayıcılarda okunaklı, opak bir yedek görünüm. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .floating-header-container {
        background: #ffffff;
    }
}

.floating-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Logo */
.floating-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
    padding-left: 10px;
}

.floating-logo-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.floating-logo .logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--fh-text);
    margin: 0;
}

.floating-logo .logo-text .highlight {
    color: #1f3f98;
}

/* Desktop Menu Links */
.floating-menu-desktop {
    display: flex;
    align-items: center;
    gap: 4px;
}

.floating-menu-desktop .menu-item {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--fh-text);
    padding: 6px 10px;
    border-radius: 50px;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.floating-menu-desktop .menu-item:hover,
.floating-menu-desktop .menu-item.active {
    color: var(--fh-text-hover);
    background-color: rgba(31, 63, 152, 0.08);
}

/* Dropdown styling */
.floating-menu-desktop .menu-dropdown {
    position: relative;
}

.floating-menu-desktop .dropdown-menu-content {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    border: 1px solid rgba(3, 31, 66, 0.08);
    box-shadow: 0 15px 30px rgba(3, 31, 66, 0.1);
    border-radius: 16px;
    min-width: 220px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s linear,
        pointer-events 0s linear;
    transition-delay: 0.5s, 0.5s, 0.5s, 0.5s;
    z-index: 100;
}

.floating-menu-desktop .menu-dropdown:hover .dropdown-menu-content {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(5px);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0s linear,
        pointer-events 0s linear;
    transition-delay: 0s, 0s, 0s, 0s;
}

.floating-menu-desktop .dropdown-menu-content a {
    display: block;
    padding: 10px 16px;
    color: var(--fh-text);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.floating-menu-desktop .dropdown-menu-content a:hover {
    background-color: rgba(31, 63, 152, 0.06);
    color: var(--fh-text-hover);
}

.floating-menu-desktop .menu-item i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.floating-menu-desktop .menu-dropdown:hover .menu-item i {
    transform: rotate(180deg);
}

/* Action Buttons */
.floating-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-actions .action-btn {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 50px;
    text-decoration: none;
    transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.floating-actions .veli-giris {
    color: #1f3f98;
    background-color: rgba(31, 63, 152, 0.08);
    border: 1px solid rgba(31, 63, 152, 0.15);
}

.floating-actions .veli-giris:hover {
    background-color: #1f3f98;
    color: #ffffff;
    border-color: #1f3f98;
}

.floating-actions .kayit-basvuru {
    color: #031F42;
    background-color: #f37021;
}

.floating-actions .kayit-basvuru:hover {
    background-color: #e26218;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(243, 112, 33, 0.3);
}

/* Mobile Toggle button */
.mobile-menu-toggle-btn {
    display: none;
    background: none;
    border: 1px solid rgba(3, 31, 66, 0.1);
    color: var(--fh-text);
    font-size: 1.1rem;
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.mobile-menu-toggle-btn:hover {
    background-color: rgba(3, 31, 66, 0.05);
}

.mobile-menu-toggle-btn:focus-visible,
.mobile-nav-sheet .sheet-close-btn:focus-visible,
.mobile-nav-sheet .sheet-dropdown-toggle:focus-visible,
.floating-header-container a:focus-visible {
    outline: 3px solid #f37021;
    outline-offset: 3px;
}

/* Responsive Styles */
@media (max-width: 1199px) {
    .floating-menu-desktop {
        display: none;
    }

    .floating-actions .action-btn {
        display: none;
    }

    .mobile-menu-toggle-btn {
        display: flex;
    }

    .floating-header-container {
        border-radius: 30px;
        padding: 6px 12px;
    }
}

.mobile-nav-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: visibility 0.3s, opacity 0.3s;
    pointer-events: none;
}

.mobile-nav-sheet.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-sheet .sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgba(3, 31, 66, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mobile-nav-sheet.is-open .sheet-overlay {
    opacity: 1;
}

/* Pre-layers for animations */
.mobile-nav-sheet .sheet-prelayers {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 320px;
    max-width: 85%;
    pointer-events: none;
    z-index: 1;
}

.mobile-nav-sheet .sheet-prelayer {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav-sheet.is-open .sheet-prelayer:nth-child(1) {
    transform: translateX(0);
    transition-delay: 0s;
}

.mobile-nav-sheet.is-open .sheet-prelayer:nth-child(2) {
    transform: translateX(0);
    transition-delay: 0.12s;
}

.mobile-nav-sheet:not(.is-open) .sheet-prelayer:nth-child(1) {
    transform: translateX(-100%);
    transition-delay: 0.12s;
}

.mobile-nav-sheet:not(.is-open) .sheet-prelayer:nth-child(2) {
    transform: translateX(-100%);
    transition-delay: 0s;
}

.mobile-nav-sheet .sheet-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85%;
    height: 100%;
    max-height: 100dvh;
    background: #ffffff;
    box-shadow: 10px 0 40px rgba(3, 31, 66, 0.15);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

.mobile-nav-sheet.is-open .sheet-content {
    transform: translateX(0);
    transition-delay: 0.24s;
}

.mobile-nav-sheet .sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.mobile-nav-sheet .sheet-close-btn {
    background: none;
    border: 1px solid rgba(3, 31, 66, 0.1);
    color: var(--fh-text);
    font-size: 1.1rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-sheet .sheet-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
    margin-bottom: 20px;
}

/* Stagger wrapper for links */
.sheet-link-wrap {
    position: relative;
    overflow: hidden;
    line-height: 1;
    display: block;
    width: 100%;
}

.mobile-nav-sheet .sheet-link,
.mobile-nav-sheet .sheet-dropdown-toggle {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fh-text);
    padding: 12px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    text-align: left;
    background: none;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Link Stagger Animations */
.mobile-nav-sheet .sheet-link {
    transform: translateY(140%) rotate(5deg);
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.mobile-nav-sheet.is-open .sheet-link {
    transform: translateY(0) rotate(0deg);
}

.mobile-nav-sheet .sheet-dropdown {
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.8s cubic-bezier(0.76, 0, 0.24, 1);
}

.mobile-nav-sheet.is-open .sheet-dropdown {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay classes */
.mobile-nav-sheet.is-open .sheet-links>*:nth-child(1) .sheet-link {
    transition-delay: 0.22s;
}

.mobile-nav-sheet.is-open .sheet-links>*:nth-child(2) .sheet-link {
    transition-delay: 0.28s;
}

.mobile-nav-sheet.is-open .sheet-links>*:nth-child(3) {
    transition-delay: 0.34s;
}

/* dropdown */
.mobile-nav-sheet.is-open .sheet-links>*:nth-child(4) .sheet-link {
    transition-delay: 0.40s;
}

.mobile-nav-sheet.is-open .sheet-links>*:nth-child(5) .sheet-link {
    transition-delay: 0.46s;
}

.mobile-nav-sheet.is-open .sheet-links>*:nth-child(6) .sheet-link {
    transition-delay: 0.52s;
}

.mobile-nav-sheet .sheet-link:hover,
.mobile-nav-sheet .sheet-link.active,
.mobile-nav-sheet .sheet-dropdown-toggle:hover {
    background-color: rgba(31, 63, 152, 0.06);
    color: var(--fh-text-hover);
}

/* Mobile Dropdown */
.mobile-nav-sheet .sheet-dropdown-content {
    display: none;
    padding-left: 16px;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.mobile-nav-sheet .sheet-dropdown.is-active .sheet-dropdown-content {
    display: flex;
}

.mobile-nav-sheet .sheet-dropdown.is-active .sheet-dropdown-toggle i {
    transform: rotate(180deg);
}

.mobile-nav-sheet .sheet-dropdown-content a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--fh-text);
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
}

.mobile-nav-sheet .sheet-dropdown-content a:hover {
    background-color: rgba(31, 63, 152, 0.04);
    color: var(--fh-text-hover);
}

.mobile-nav-sheet .sheet-dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.mobile-nav-sheet .sheet-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(3, 31, 66, 0.08);
    padding-top: 20px;
    flex-shrink: 0;
    margin-top: auto;
}

.mobile-nav-sheet .sheet-content::-webkit-scrollbar {
    width: 5px;
}

.mobile-nav-sheet .sheet-content::-webkit-scrollbar-track {
    background: transparent;
}

.mobile-nav-sheet .sheet-content::-webkit-scrollbar-thumb {
    background: rgba(3, 31, 66, 0.15);
    border-radius: 10px;
}

.mobile-nav-sheet .sheet-content::-webkit-scrollbar-thumb:hover {
    background: rgba(3, 31, 66, 0.3);
}

.mobile-nav-sheet .sheet-footer .action-btn {
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px;
    border-radius: 50px;
    text-decoration: none;
    text-align: center;
    display: block;
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.8s cubic-bezier(0.76, 0, 0.24, 1), background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mobile-nav-sheet.is-open .sheet-footer .action-btn:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.58s;
}

.mobile-nav-sheet.is-open .sheet-footer .action-btn:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.64s;
}

.mobile-nav-sheet.is-open .sheet-footer .action-btn {
    transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.mobile-nav-sheet .sheet-footer .veli-giris {
    color: #1f3f98;
    background-color: rgba(31, 63, 152, 0.08);
    border: 1px solid rgba(31, 63, 152, 0.15);
}

.mobile-nav-sheet .sheet-footer .kayit-basvuru {
    color: #ffffff;
    background-color: #f37021;
    border: 1px solid #f37021;
    box-shadow: 0 4px 12px rgba(243, 112, 33, 0.25);
}

.mobile-nav-sheet .sheet-footer .kayit-basvuru:hover {
    background-color: #031F42;
    border-color: #031F42;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(3, 31, 66, 0.35);
}

.mobile-nav-sheet .sheet-footer .kayit-basvuru:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 6px rgba(3, 31, 66, 0.3);
}



@media (max-width: 480px) {
    .floating-logo-img {
        height: 35px;
    }

    .floating-logo {
        padding-left: 0;
    }

    .floating-header-container {
        padding: 4px 10px;
        top: 10px;
    }
}
.floating-header-container a,
.mobile-nav-sheet a,
.floating-actions .action-btn {
    font-family: "Montserrat", sans-serif;
}

@media (max-width: 767px) {
    .floating-header-container.custom-shadcn-header {
        width: min(92%, 1200px);
        max-width: 1200px;
        top: 12px;
        border-radius: 100px !important;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 10px 28px rgba(3, 31, 66, 0.14);
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-container {
        min-height: 56px;
        padding: 6px 12px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .custom-shadcn-nav .nav-container {
        position: relative;
        justify-content: space-between;
    }

    .custom-shadcn-nav .nav-left {
        position: static;
        transform: none;
        display: flex;
        align-items: center;
    }

    .custom-shadcn-nav .nav-right {
        display: flex !important;
        margin-left: auto;
    }

    .custom-shadcn-nav .floating-logo {
        padding-left: 0;
    }

    .custom-shadcn-nav .floating-logo-img {
        height: 50px;
    }

    .custom-shadcn-nav .mobile-menu-toggle-btn {
        display: flex !important;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 12px;
        background: rgba(31, 63, 152, 0.1);
        color: #1f3f98;
    }

    .custom-shadcn-nav .mobile-menu-toggle-btn:hover {
        background: #1f3f98;
        color: #ffffff;
    }

    .mobile-nav-sheet .sheet-content {
        width: min(88vw, 360px);
        max-width: none;
        padding: 24px 20px 20px;
        box-shadow: 12px 0 36px rgba(3, 31, 66, 0.2);
    }

    .mobile-nav-sheet .sheet-header {
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid rgba(3, 31, 66, 0.08);
    }

    .mobile-nav-sheet .sheet-close-btn {
        width: 40px;
        height: 40px;
        border: none;
        border-radius: 12px;
        background: rgba(3, 31, 66, 0.06);
    }

    .mobile-nav-sheet .sheet-link,
    .mobile-nav-sheet .sheet-dropdown-toggle {
        padding: 13px 14px;
        border-radius: 12px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .floating-header-container.custom-shadcn-header {
        width: min(92%, 1200px);
        max-width: 1200px;
        top: 16px;
        border-radius: 100px !important;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 12px 30px rgba(3, 31, 66, 0.14);
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-container {
        position: relative;
        min-height: 60px;
        padding: 8px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-menu {
        display: none !important;
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-left {
        position: static;
        transform: none;
        display: flex;
        align-items: center;
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-right {
        display: flex !important;
        margin-left: auto;
    }

    .floating-header-container.custom-shadcn-header .mobile-menu-toggle-btn {
        display: flex !important;
        width: 42px;
        height: 42px;
        border: none;
        border-radius: 12px;
        background: rgba(31, 63, 152, 0.1);
        color: #1f3f98;
    }

    .mobile-nav-sheet .sheet-content {
        width: min(420px, 62vw);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .floating-header-container.custom-shadcn-header {
        width: min(92%, 1200px);
        max-width: 1200px;
        border-radius: 100px !important;
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-container {
        min-height: 64px;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-menu {
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        gap: clamp(0.15rem, 0.4vw, 0.5rem);
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-left {
        position: static;
        transform: none;
        margin-left: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .floating-header-container.custom-shadcn-header .custom-shadcn-nav .nav-right {
        display: none !important;
    }

    .floating-header-container.custom-shadcn-header .mobile-menu-toggle-btn {
        display: none !important;
    }
}
