@import url("nav.css");
@import url("footer.css");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background-color: #f8fafc;
    color: #334155;
}

.MAIN-Content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 30px;
}

/* Sayfayı Dolduran Ana Kapsayıcı */
.legal-wrapper {
    display: flex;
    width: 100%;
    max-width: 1400px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    min-height: 600px;
    overflow: hidden;
}

/* Sol Menü */
.legal-sidebar {
    width: 320px;
    background-color: #f1f5f9;
    border-right: 1px solid #e2e8f0;
    padding: 30px 20px;
    flex-shrink: 0;
}

.legal-sidebar h2 {
    font-size: 18px;
    color: #0f172a;
    margin-bottom: 20px;
    font-weight: 700;
    padding-left: 8px;
}

.legal-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: #64748b;
}

.tab-btn:hover {
    background-color: #e2e8f0;
    color: #1e293b;
}

.tab-btn.active {
    background: linear-gradient(90deg, #2563eb, #38bdf8);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.tab-btn.active i {
    color: #ffffff;
}

/* Sağ İçerik Alanı */
.legal-content {
    flex: 1;
    padding: 40px;
    background-color: #ffffff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.tab-content h2 {
    font-size: 22px;
    color: #0f172a;
    font-weight: 700;
}

.divider {
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #2563eb, #38bdf8, #00000000);
    border-radius: 2px;
    margin: 16px 0 24px 0;
}

.tab-content p {
    font-size: 15px;
    line-height: 1.8;
    color: #334155;
    text-align: justify;
    text-justify: inter-word;
    text-indent: 25px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobil ve Tablet İyileştirmeleri */
@media (max-width: 900px) {
    .MAIN-Content {
        padding: 15px 10px;
    }

    .legal-wrapper {
        flex-direction: column;
        border-radius: 12px;
        box-shadow: none;
        background: transparent;
        border: none;
    }

    /* Sol Menüyü Mobilde Yatay Kaydırılabilir Yapıyoruz */
    .legal-sidebar {
        width: 100%;
        background: transparent;
        border-right: none;
        padding: 0 0 15px 0;
    }

    .legal-sidebar h2 {
        display: none; /* Mobilde ekstra başlık yer kaplamasın */
    }

    .legal-nav {
        display: flex;
        flex-direction: row;
        overflow-x: auto; /* Sağa/sola kaydırma özelliği */
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding-bottom: 8px;
    }

    /* Kaydırma çubuğunu gizleyelim */
    .legal-nav::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        white-space: nowrap; /* Metinlerin alt satıra geçmesini engeller */
        padding: 10px 16px;
        font-size: 13px;
        background-color: #ffffff;
        border: 1px solid #e2e8f0;
        flex-shrink: 0;
    }

    .tab-btn.active {
        background: linear-gradient(90deg, #2563eb, #38bdf8);
    }

    /* Sağ İçerik Alanı */
    .legal-content {
        padding: 20px 16px;
        background: #ffffff;
        border-radius: 12px;
        border: 1px solid #e2e8f0;
    }

    .tab-content h2 {
        font-size: 18px;
    }

    .tab-content p {
        font-size: 14px;
        text-indent: 15px;
    }
}

/* Kutuların Gizlenip Açılması */
.info-box {
    display: none !important;
}

.info-box p {
    text-indent: 25px;
    line-height: 1.5em;
    text-align: justify;
}

.info-box.active {
    display: block !important;
    animation: fadeIn 0.3s ease;
}