/* Common Styles - Header, Footer, Buttons */

/* Mobile Top Bar – desktop'ta gizli, sadece mobilde aktif */
.mobile-topbar {
    display: none;
}

/* Header Top Bar */
.header-top {
    background-color: #f5f5f5;
    padding: 6px 0;
    font-size: 13px;
}

.header-top .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
}

.top-nav-links li {
    display: flex;
    align-items: center;
}

.top-nav-links a {
    color: #4a4a4a;
    text-decoration: none;
    padding: 0 12px;
    transition: color 0.3s;
}

.top-nav-links a:hover {
    color: #1e3a8a;
}

.top-nav-links li:not(:last-child)::after {
    content: '';
    width: 1px;
    height: 16px;
    background-color: #d0d0d0;
    margin-left: 15px;
}

/* Main Header */
.main-header {
    background-color: #fff;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Desktop account button */
.desktop-account-btn {
    display: inline-block;
}

/* Mobile account button - hidden on desktop */
.mobile-account-btn {
    display: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo a {
    display: flex;
    align-items: center;
    line-height: 0;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
    vertical-align: middle;
}

.nav-menu {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #ff6600;
}

/* Dropdown Menu Styles */
.nav-menu li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 280px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 15px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1000;
    list-style: none;
}

/* Biz Kimiz dropdown – düz liste, görsele uygun */
.sub-menu--biz-kimiz {
    min-width: 300px;
    padding: 12px 0;
}

.sub-menu--biz-kimiz > li {
    margin-bottom: 0;
}

.sub-menu--biz-kimiz > li > a {
    display: block;
    padding: 10px 20px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: background-color 0.2s, color 0.2s;
}

.sub-menu--biz-kimiz > li > a:hover {
    background-color: #f5f5f5;
    color: #ff6600;
}

.sub-menu-group {
    padding: 0 20px;
    margin-bottom: 15px;
}

.sub-menu-group:last-child {
    margin-bottom: 0;
}

.sub-menu-title {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #333;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sub-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sub-menu-items li {
    margin-bottom: 5px;
}

.sub-menu-items a {
    display: block;
    padding: 8px 15px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
    border-radius: 3px;
}

.sub-menu-items a:hover {
    background-color: #f5f5f5;
    color: #1e3a8a;
}

.btn-primary {
    background-color: #ff6600;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #e55a00;
}

.btn-dark {
    background-color: #1e3a8a;
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.btn-dark:hover {
    background-color: #1e40af;
}

/* Footer – Figma ile bire bir: beyaz arka plan, koyu metin, sosyal ikonlar beyaz / koyu mavi daire */
footer {
    background-color: #ffffff;
    color: #333;
    padding: 60px 0 30px;
    border-top: none;
    font-family: 'Inter', sans-serif;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.footer-logo {
    display: flex;
    align-items: center;
}

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

.footer-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e4e7ee;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #243875;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
    font-size: 21px;
}

.social-icon:hover {
    background-color: #ff6600;
    color: white;
}

.social-icon .social-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    display: block;
    transition: filter 0.3s;
}

.social-icon:hover .social-icon-img {
    filter: brightness(0) invert(1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    font-family: 'Manrope', sans-serif;
}

.footer-column h5 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-top: 25px;
    margin-bottom: 15px;
    font-family: 'Manrope', sans-serif;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    font-family: 'Inter', sans-serif;
}

.footer-column ul li a:hover {
    color: #1e3a8a;
}

.footer-contact {
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    font-family: 'Inter', sans-serif;
}

.footer-contact p {
    margin-bottom: 10px;
}

.footer-contact a {
    color: #333;
    text-decoration: none;
}

.footer-contact a:hover {
    color: #1e3a8a;
}

.footer-bottom {
    text-align: right;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #999;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

/* Mobile Header CTA Button */
.mobile-header-cta {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.25);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-header-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.35);
}

.mobile-header-cta:active {
    transform: scale(0.95);
}

.mobile-header-cta i {
    margin: 0;
    line-height: 1;
}

/* Mobile Menu Button - Animated Hamburger */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}

.mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Hamburger Lines */
.mobile-menu-btn .hamburger-icon {
    width: 24px;
    height: 18px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
}

.mobile-menu-btn .hamburger-icon span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2.5px;
    background-color: #333;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.mobile-menu-btn .hamburger-icon span:nth-child(1) {
    top: 0;
}

.mobile-menu-btn .hamburger-icon span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-btn .hamburger-icon span:nth-child(3) {
    bottom: 0;
}

/* Hamburger to X animation */
.mobile-menu-btn.active .hamburger-icon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-btn.active .hamburger-icon span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Menu Overlay/Backdrop */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Header Styles */
.mobile-header {
    display: none;
    padding: 16px 20px;
    background: #fff;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-header-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mobile-header img {
    height: 32px;
    width: auto;
}

.close-menu {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.2s ease;
}

.close-menu:hover {
    background: #f5f5f5;
    color: #ff6600;
}

.close-menu:active {
    transform: scale(0.95);
}

/* Mobile Navigation Container */
.nav-container {
    position: relative;
}

/* Mobile Menu Styles */
@media (max-width: 768px) {
    /* Desktop topbar mobilde gizlenir */
    .topbar-desktop {
        display: none;
    }

    /* Mobile Top Bar */
    .mobile-topbar {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0;
        padding: 6px 0;
        background: #f5f5f5;
        font-size: 13px;
    }

    .mobile-topbar-item {
        display: inline-flex;
        align-items: center;
        padding: 0 12px;
        color: #4a4a4a;
        text-decoration: none;
        white-space: nowrap;
        transition: color 0.3s;
        line-height: 1.4;
    }

    .mobile-topbar-item:not(:last-child)::after {
        content: '';
        display: inline-block;
        width: 1px;
        height: 14px;
        background-color: #d0d0d0;
        margin-left: 12px;
        vertical-align: middle;
    }

    .mobile-topbar-item:hover {
        color: #1e3a8a;
    }

    /* Main Header Mobile */
    .main-header {
        padding: 10px 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        background-color: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .header-content {
        position: relative;
        display: grid;
        grid-template-columns: 52px 1fr 52px;
        align-items: center;
        gap: 8px;
        min-height: 52px;
    }

    /* Logo centered on mobile – hizalama için */
    .logo {
        grid-column: 2;
        display: flex;
        justify-content: center;
        align-items: center;
        align-self: center;
        padding: 0 8px;
        pointer-events: auto;
    }

    .logo a {
        display: flex;
        align-items: center;
        justify-content: center;
        max-width: 100%;
        line-height: 0;
    }

    .logo img {
        height: 36px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        display: block;
        vertical-align: middle;
    }

    /* Show mobile menu button – hizalama */
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        grid-column: 1;
        justify-self: start;
        align-self: center;
        z-index: 2;
    }

    /* Show mobile CTA button – kısa metin "Hesap Aç", hizalı */
    .mobile-header-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        grid-column: 3;
        justify-self: end;
        align-self: center;
        z-index: 2;
        width: auto;
        min-width: auto;
        height: 38px;
        padding: 7px 12px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 6px;
    }
    .mobile-header-cta .mobile-header-cta-icon {
        display: none;
    }
    .mobile-header-cta .mobile-header-cta-text {
        display: inline;
        white-space: nowrap;
    }

    /* Nav container: no layout space, don't block clicks when menu closed */
    .nav-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 0;
        height: 0;
        overflow: visible;
        z-index: 999;
        pointer-events: none;
    }

    /* Hide desktop nav by default, show when .mobile-active */
    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        padding: 0;
        margin: 0;
        overflow-y: auto;
        overflow-x: hidden;
        z-index: 1000;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
        transition: left 0.3s ease;
        -webkit-overflow-scrolling: touch;
    }

    /* Custom Scrollbar for Mobile Menu */
    .nav-menu::-webkit-scrollbar {
        width: 4px;
    }

    .nav-menu::-webkit-scrollbar-track {
        background: transparent;
    }

    .nav-menu::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 2px;
    }

    .nav-menu::-webkit-scrollbar-thumb:hover {
        background: #ccc;
    }

    /* Show mobile menu when active */
    .nav-menu.mobile-active {
        display: flex;
        left: 0;
        pointer-events: auto;
    }

    /* Mobile header in menu */
    .mobile-header {
        display: flex;
    }

    /* Mobile menu items */
    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #f5f5f5;
    }

    .nav-menu > li:not(.mobile-header):not(.mobile-account-btn) {
        padding: 0;
    }

    .nav-menu > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        font-size: 15px;
        font-weight: 400;
        color: #333;
        width: 100%;
        transition: color 0.2s ease, background-color 0.2s ease;
        position: relative;
    }

    .nav-menu > li > a:hover {
        background-color: #fafafa;
        color: #ff6600;
    }

    .nav-menu > li > a.has-submenu::after {
        content: '\f107';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 12px;
        transition: transform 0.2s ease;
        color: #999;
    }

    .nav-menu > li > a.has-submenu.active {
        color: #ff6600;
        background-color: #fafafa;
    }

    .nav-menu > li > a.has-submenu.active::after {
        transform: rotate(180deg);
        color: #ff6600;
    }

    /* Mobile submenu */
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        min-width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: #fafafa;
    }

    .sub-menu.active {
        max-height: 1000px;
    }

    .sub-menu--biz-kimiz {
        min-width: 100%;
        padding: 0;
    }

    .sub-menu--biz-kimiz > li {
        border-bottom: none;
    }

    .sub-menu--biz-kimiz > li:last-child {
        border-bottom: none;
    }

    .sub-menu--biz-kimiz > li > a {
        display: flex;
        align-items: center;
        padding: 12px 20px 12px 36px;
        font-size: 14px;
        color: #666;
        transition: color 0.2s ease, background-color 0.2s ease;
        position: relative;
    }

    .sub-menu--biz-kimiz > li > a::before {
        content: '•';
        position: absolute;
        left: 24px;
        color: #ccc;
        font-size: 16px;
        line-height: 1;
    }

    .sub-menu--biz-kimiz > li > a:hover {
        background-color: #f0f0f0;
        color: #ff6600;
    }

    .sub-menu--biz-kimiz > li > a:hover::before {
        color: #ff6600;
    }

    .sub-menu--biz-kimiz > li > a:active {
        transform: scale(0.98);
    }

    /* Online Hesap Aç button mobile */
    .desktop-account-btn {
        display: none !important;
    }

    /* Mobile account button in menu – İletişim'in hemen altında */
    .mobile-account-btn {
        display: block;
        padding: 16px 20px;
        border-bottom: none;
        margin-top: 0;
        background: #fff;
        border-top: 1px solid #f0f0f0;
    }

    .mobile-account-btn .btn-primary {
        display: block;
        margin: 0;
        text-align: center;
        padding: 14px 24px;
        font-size: 15px;
        font-weight: 500;
        width: 100%;
        border-radius: 8px;
        transition: all 0.2s ease;
    }

    .mobile-account-btn .btn-primary:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 102, 0, 0.25);
    }

    .mobile-account-btn .btn-primary:active {
        transform: translateY(0);
    }

    /* Footer Mobile */
    .footer-top {
        flex-direction: column;
        gap: 30px;
    }

    .footer-social {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-bottom {
        text-align: center;
    }
}

/* Medium Mobile Devices */
@media (max-width: 600px) {
    .header-content {
        grid-template-columns: 48px 1fr 48px;
        gap: 6px;
        min-height: 48px;
    }

    .logo img {
        height: 34px;
    }
}

/* Small Mobile Devices - Extra optimizations */
@media (max-width: 480px) {
    .nav-menu {
        width: 90%;
    }

    .mobile-header {
        padding: 16px 20px;
    }

    .header-content {
        grid-template-columns: 44px 1fr 44px;
        gap: 4px;
        min-height: 44px;
    }

    .logo {
        padding: 0 4px;
    }

    .logo img {
        height: 30px;
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }

    .mobile-header-cta {
        height: 36px;
        font-size: 12px;
        padding: 6px 10px;
    }

    .nav-menu > li > a {
        padding: 18px 20px;
        font-size: 15px;
    }

    .sub-menu--biz-kimiz > li > a {
        padding: 14px 20px 14px 40px;
        font-size: 14px;
    }

    .mobile-account-btn {
        padding: 20px;
    }

    .mobile-account-btn .btn-primary {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .header-content {
        grid-template-columns: 40px 1fr 40px;
        gap: 4px;
        min-height: 40px;
    }

    .logo {
        padding: 0 2px;
    }

    .logo img {
        height: 26px;
    }

    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        padding: 8px;
    }

    .mobile-header-cta {
        height: 32px;
        font-size: 11px;
        padding: 5px 8px;
    }

    .hamburger-icon {
        width: 20px !important;
        height: 16px !important;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        gap: 20px;
    }

    .nav-menu > li > a {
        font-size: 14px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
