/* ================================================================
   AYTEM KURUMSAL — HEADER CSS
   Glassmorphism sticky header + top-bar + mobil menü
================================================================ */

/* --- Top Bar --- */
.top-bar {
    background: var(--color-dark);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    padding: var(--space-2) 0;
    position: relative;
    z-index: calc(var(--z-header) + 1);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.top-bar .contact-info {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.top-bar .contact-info a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition-fast);
    font-size: var(--font-size-sm);
}

.top-bar .contact-info a:hover {
    color: var(--color-primary);
}

.top-bar .contact-info a i {
    font-size: 0.8rem;
    color: var(--color-primary);
    width: 14px;
}

/* Eski span yapısı için geriye uyumluluk */
.top-bar .contact-info span {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: rgba(255,255,255,0.8);
    font-size: var(--font-size-sm);
}

.top-bar .contact-info img {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    opacity: 0.85;
    filter: brightness(0) invert(1);
}

.top-bar .social-icons {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.top-bar .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-full);
    color: rgba(255,255,255,0.7);
    transition: var(--transition-fast);
    background: rgba(255,255,255,0.06);
}

.top-bar .social-icons a:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.1);
}

.top-bar .social-icons a img {
    width: 16px;
    height: 16px;
    display: block;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: var(--transition-fast);
}

.top-bar .social-icons a:hover img {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* --- Ana Header --- */
header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    padding: 0;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
    background: rgba(26, 46, 69, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Sayfada aşağı scroll edilince header daha belirgin olur */
header.scrolled {
    background: rgba(22, 38, 58, 0.97);
    box-shadow: 0 4px 30px rgba(0,0,0,0.25);
    border-bottom-color: rgba(0, 159, 227, 0.15);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    transition: padding 0.3s ease;
}

header.scrolled .container {
    padding: var(--space-3) 0;
}

/* --- Logo --- */
header .logo {
    flex-shrink: 0;
    line-height: 0;
}

header .logo a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

header .logo img {
    height: 52px;
    width: auto;
    object-fit: contain;
    transition: var(--transition-base);
}

header.scrolled .logo img {
    height: 44px;
}

/* --- Navigasyon --- */
header nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

header nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

header nav ul li {
    position: relative;
}

header nav ul li a {
    display: block;
    color: rgba(255,255,255,0.85);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    text-decoration: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    transition: var(--transition-base);
    letter-spacing: 0.01em;
    position: relative;
}

header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

header nav ul li a:hover {
    color: var(--color-white);
    background: rgba(255,255,255,0.08);
}

header nav ul li a:hover::after {
    width: calc(100% - 2rem);
}

header nav ul li a.active {
    color: var(--color-primary);
    background: rgba(0, 159, 227, 0.1);
}

header nav ul li a.active::after {
    width: calc(100% - 2rem);
}

/* Son menü öğesi — İletişim CTA görünümü */
header nav ul li:last-child a {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-5);
    box-shadow: var(--shadow-primary);
    font-weight: var(--font-weight-semibold);
}

header nav ul li:last-child a::after {
    display: none;
}

header nav ul li:last-child a:hover {
    background: linear-gradient(135deg, var(--color-primary-dark), #006fa0);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-lg);
}

/* --- Hamburger Menü Butonu (JS tarafından ekleniyor) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    cursor: pointer;
    gap: 5px;
    transition: var(--transition-base);
    flex-shrink: 0;
    padding: 0;
}

.menu-toggle:hover {
    background: rgba(255,255,255,0.15);
}

/* Eski .menu-toggle için geriye uyumluluk (JS innerHTML ile oluşturulan) */
.menu-toggle-icon {
    font-size: 1.4rem;
    color: var(--color-white);
    line-height: 1;
}

/* --- WhatsApp Sabit Butonu --- */
.whatsapp-icon {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: var(--z-whatsapp);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #25d366, #128c7e);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    transition: var(--transition-spring);
}

.whatsapp-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    background: rgba(37, 211, 102, 0.4);
    animation: whatsapp-pulse 2.5s ease-in-out infinite;
}

@keyframes whatsapp-pulse {
    0%   { transform: scale(1);   opacity: 0.8; }
    50%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1);   opacity: 0; }
}

.whatsapp-icon img {
    width: 30px;
    height: 30px;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    z-index: 1;
}

.whatsapp-icon:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.55);
}

.whatsapp-icon:hover img {
    box-shadow: none;
    transform: none;
}

/* --- Mobil Responsive --- */
@media (max-width: 992px) {
    header nav ul li:last-child a {
        display: none; /* Mobilde ayrı gösterilecek */
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    header nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(22, 38, 58, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid rgba(255,255,255,0.08);
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                    opacity 0.3s ease;
        opacity: 0;
        justify-content: flex-start;
    }

    header nav.active {
        max-height: 480px;
        opacity: 1;
    }

    header nav ul {
        flex-direction: column;
        gap: 0;
        padding: var(--space-4) 0;
        width: 100%;
        align-items: stretch;
    }

    header nav ul li {
        width: 100%;
    }

    header nav ul li a {
        padding: var(--space-4) var(--space-8);
        border-radius: 0;
        font-size: var(--font-size-base);
        border-bottom: 1px solid rgba(255,255,255,0.04);
    }

    header nav ul li a::after {
        display: none;
    }

    header nav ul li:last-child a {
        display: block;
        margin: var(--space-4) var(--space-6);
        border-radius: var(--radius-lg);
        text-align: center;
    }

    .top-bar .container {
        flex-direction: column;
        gap: var(--space-2);
        text-align: center;
    }

    .top-bar .contact-info {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-4);
    }

    .whatsapp-icon {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-icon img {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .top-bar .contact-info span:not(:first-child) {
        display: none; /* Küçük ekranda sadece telefon */
    }
}