/*
 * ANA STİLLER (main.css)
 * Tüm sayfalarda geçerli olacak ortak kodlar.
*/

/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset ve Body */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #FBFAF8;
    color: #1D201F;
}

/* ---------------------------------- */
/* HEADER (Masaüstü)                  */
/* ---------------------------------- */
.site-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(251, 250, 248, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(29, 32, 31, 0.1);
    transition: padding-right 0.3s ease;
}

.header-navigation {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1D201F;
    text-decoration: none;
    z-index: 1002;
}

.nav-menu-list {
    display: flex;
    gap: 1.8rem; /* Aralık azaltılmıştı */
    list-style: none;
}

.nav-menu-item-link {
    color: #1D201F;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.nav-menu-item-link:hover {
    opacity: 0.6;
}

/* Header Dropdown (Masaüstü) */
.nav-menu-item-dropdown {
    position: relative;
}

.dropdown-submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #FBFAF8;
    border: none;
    border-radius: 8px;
    padding: 1.5rem;
    list-style: none;
    min-width: 480px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Sadece Opacity/Visibility geçişi */
    box-shadow: 0 4px 20px rgba(29, 32, 31, 0.1);
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.dropdown-submenu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #FBFAF8;
    z-index: 1;
}

.nav-menu-item-dropdown:hover .dropdown-submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-link-item {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    color: #1D201F;
    text-decoration: none;
    transition: background-color 0.2s;
    border-radius: 6px;
}

.dropdown-link-item:hover {
    background-color: rgba(29, 32, 31, 0.05);
}

.dropdown-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.dropdown-description {
    font-size: 0.75rem;
    color: rgba(29, 32, 31, 0.6);
    font-weight: 400;
}

/* ---------------------------------- */
/* FOOTER (Tüm sayfalarda ortak)      */
/* ---------------------------------- */
.footer-main-section {
    background-color: #1D201F;
    color: #FBFAF8;
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(251, 250, 248, 0.1);
}

.footer-content-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-heading-text {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-brand-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.footer-logo svg {
    width: 100%;
    height: 100%;
}

.footer-brand-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FBFAF8;
}

.footer-paragraph-text {
    color: rgba(251, 250, 248, 0.7);
    margin-bottom: 0.5rem;
}

.footer-social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(251, 250, 248, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
}

.footer-social-link:hover {
    background: rgba(251, 250, 248, 0.2);
    transform: translateY(-3px);
}

.footer-social-link svg {
    stroke: #FBFAF8;
}

.footer-link-item {
    color: rgba(251, 250, 248, 0.7);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: opacity 0.3s;
}

.footer-link-item:hover {
    opacity: 0.6;
}

.footer-bottom-section {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(251, 250, 248, 0.1);
    color: rgba(251, 250, 248, 0.5);
}

/* ---------------------------------- */
/* MOBİL MENÜ STİLLERİ                */
/* ---------------------------------- */

/* Hamburger Buton */
.mobile-nav-toggle {
    display: none; /* Masaüstünde gizli */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Her şeyin üstünde */
    position: relative; /* Animasyon için */
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: #1D201F;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* body.nav-open olduğunda (JS ile eklenir) Hamburger -> X olur */
body.nav-open .mobile-nav-toggle .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}
body.nav-open .mobile-nav-toggle .hamburger-line:nth-child(2) {
    opacity: 0;
}
body.nav-open .mobile-nav-toggle .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Mobil Menü Breakpoint (768px) */
@media (max-width: 768px) {
    
    /* Menü açıkken <html> ve <Body>'nin kaymasını engeller */
    html.nav-open,
    body.nav-open {
        overflow: hidden;
    }
    
    /* Hamburger butonu göster */
    .mobile-nav-toggle {
        display: flex;
    }

    /* Masaüstü menü listesini gizle (ve mobil panel olarak hazırla) */
    .nav-menu-list {
        display: none; 
        position: fixed;
        top: 80px; /* Header yüksekliği kadar aşağıdan başla */
        left: 0;
        width: 100%;
        height: calc(100vh - 80px); /* Kalan tüm yüksekliği kapla */
        background: #FBFAF8;
        flex-direction: column;
        padding: 1rem 2rem; 
        overflow-y: auto;
        z-index: 1000;
        border-top: 1px solid rgba(29, 32, 31, 0.1);
        overscroll-behavior: contain;
    }

    /* body.nav-open olduğunda (JS ile eklenir) Mobil menüyü göster */
    body.nav-open .nav-menu-list {
        display: flex;
    }

    /* Mobil menü linkleri */
    .nav-menu-list li {
        width: 100%;
        text-align: center;
    }

    /* GÜNCELLENDİ: Aralıklar daha da daraltıldı */
    .nav-menu-item-link {
        font-size: 1.2rem; /* 1.3rem'den düşürüldü */
        font-weight: 600;
        padding: 0.5rem 0; /* 0.75rem'den düşürüldü */
        display: block; 
        position: relative;
    }

    /* Mobil menüdeki 'Hizmetler' alt menüsü */
    .nav-menu-list .nav-menu-item-dropdown {
        display: flex;
        flex-direction: column;
    }

    /* 'Hizmetler' ana linkini GÖSTER */
    .nav-menu-list .nav-menu-item-dropdown > .nav-menu-item-link {
        display: block; 
    }

    /* 'Hizmetler' linkine ok ikonu eklendi (Absolute değil) */
    .nav-menu-list .nav-menu-item-dropdown > .nav-menu-item-link::after {
        content: '▼';
        font-size: 0.8rem;
        margin-left: 8px; /* Ok ile yazı arasına boşluk */
        display: inline-block; /* Transform'un çalışması için */
        transition: transform 0.3s ease;
    }
    
    /* Alt menü açıkken oku döndür */
    .nav-menu-list .nav-menu-item-dropdown.submenu-open > .nav-menu-item-link::after {
        transform: rotate(180deg);
    }

    /* Alt menü (dropdown) stillerini sıfırla ve GİZLE */
    .nav-menu-list .dropdown-submenu {
        /* GÜNCELLENDİ: Display yerine max-height ile animasyon */
        /* display: none; */ 
        max-height: 0; /* Başlangıçta yükseklik 0 */
        overflow: hidden; /* Taşmayı engelle */
        transition: max-height 0.4s ease-out; /* Yavaş açılış animasyonu */
        position: static;
        transform: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        background: rgba(29, 32, 31, 0.05); 
        grid-template-columns: 1fr;
        width: 100%; 
        padding: 0; /* Açılınca padding eklenecek */
        margin-top: 0.5rem; /* Üst link ile araya boşluk */
        border-radius: 8px;
        min-width: auto; 
    }

    /* JS ile .submenu-open class'ı eklendiğinde alt menüyü göster */
    .nav-menu-list .nav-menu-item-dropdown.submenu-open .dropdown-submenu {
        /* GÜNCELLENDİ: Yüksekliği ayarla ve padding ekle */
        /* display: grid; */
        max-height: 500px; /* Yeterince büyük bir değer (içeriğe göre ayarlayın) */
        padding: 0.5rem 0;
    }
    
    .dropdown-submenu::before {
        display: none; /* Üçgen oku gizle */
    }

    /* Alt menü linkleri */
    .nav-menu-list .dropdown-link-item {
        padding: 0.75rem 0;
        text-align: center;
    }
    .nav-menu-list .dropdown-title {
        font-size: 1.1rem;
        font-weight: 500;
    }
    .nav-menu-list .dropdown-description {
        display: none; /* Mobil'de açıklamaları gizle */
    }
}