/* =============================================== */
/* ŞUBELER BÖLÜMÜ - SADE VE DÜZENLİ TASARIM      */
/* =============================================== */

/* Dinamik border stilleri */
:root {
    --branch-border-color: #e2e8f0;
    --branch-border-hover: var(--color-primary);
    --branch-bg-color: #ffffff;
    --branch-content-border: #f1f5f9;
    --color-primary-rgb: 220, 38, 38; /* #dc2626 RGB değeri */
}

html.dark-mode {
    --branch-border-color: #334155;
    --branch-border-hover: var(--color-primary);
    --branch-bg-color: #1e293b;
    --branch-content-border: #334155;
}

/* Şubeler ana container */
.branches-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid var(--branch-border-color);
}

/* Şube accordion kartları */
.branch-accordion {
    background: var(--branch-bg-color);
    border: 1px solid var(--branch-border-color);
    border-radius: var(--border-radius-base);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.branch-accordion:hover {
    border-color: var(--branch-border-hover);
}

.branch-accordion.active {
    border-color: var(--branch-border-hover);
}

/* Şube accordion başlık butonu */
.branch-accordion-btn {
    width: 100%;
    padding: 1.5rem;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.branch-accordion-btn:hover {
    background: rgba(0, 0, 0, 0.02);
}

html.dark-mode .branch-accordion-btn:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Şube ikonu */
.branch-icon {
    width: 2rem;
    height: 2rem;
    background: var(--color-primary);
    border-radius: var(--border-radius-base);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.branch-icon i {
    font-size: 0.875rem;
    color: #ffffff;
}

/* Şube başlık bilgileri */
.branch-header-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin: 0 0 0.5rem 0;
}

.branch-header-info p {
    color: var(--color-text-body);
    margin: 0;
    font-size: 0.875rem;
}

/* Chevron ikonu */
.branch-chevron {
    font-size: 1.25rem;
    color: var(--color-primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.branch-accordion.active .branch-chevron {
    transform: rotate(180deg);
}

/* Accordion içerik alanı */
.branch-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.branch-content-inner {
    padding: 0 1.5rem 1.5rem 1.5rem;
    border-top: 1px solid var(--branch-content-border);
}

/* =============================================== */
/* SADE İÇ TASARIM - GRID BAZLI                   */
/* =============================================== */

/* İletişim bilgileri grid container */
.branch-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 320px));
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: start;
}

/* Responsive grid - ekran boyutuna göre ayarlama */
@media (min-width: 768px) {
    .branch-contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 350px));
    }
}

@media (min-width: 1024px) {
    .branch-contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 380px));
    }
}

/* İletişim kategorisi */
.branch-contact-category {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-base);
    padding: 1rem;
    transition: border-color 0.2s ease;
}

.branch-contact-category:hover {
    border-color: var(--color-primary);
}

/* Kategori başlığı */
.branch-contact-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--color-text-heading);
    font-size: 0.875rem;
}

.branch-contact-header i {
    font-size: 1rem;
    color: var(--color-primary);
    width: 1.125rem;
    text-align: center;
}

/* İletişim linkleri container */
.branch-contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* İletişim linkleri */
.branch-contact-link {
    display: block;
    padding: 0.625rem 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-base);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s ease;
}

.branch-contact-link:hover {
    border-color: var(--color-primary);
}

.contact-name {
    display: block;
    font-size: 0.8125rem;
    color: var(--color-text-body);
    margin-bottom: 0.25rem;
    opacity: 0.8;
    font-weight: 500;
}

.contact-number {
    display: block;
    font-weight: 600;
    color: var(--color-text-heading);
    font-size: 0.9375rem;
}

/* Adres bilgisi */
.branch-address {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-base);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.branch-address-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--color-text-heading);
    font-size: 1rem;
}

.branch-address-header i {
    font-size: 1.125rem;
    color: var(--color-primary);
    width: 1.25rem;
    text-align: center;
    background: rgba(var(--color-primary-rgb), 0.1);
    padding: 0.5rem;
    border-radius: 50%;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.branch-address-content {
    color: var(--color-text-body);
    line-height: 1.6;
    font-size: 0.9375rem;
    padding-left: 0.5rem;
    font-weight: 500;
}

/* Harita - tam genişlik */
.branch-map {
    width: 100%;
    height: 250px;
    border-radius: var(--border-radius-base);
    overflow: hidden;
    border: 1px solid var(--branch-border-color);
    margin-top: 0;
}

/* İletişim grid'i varsa haritaya boşluk */
.branch-contact-grid + .branch-map {
    margin-top: 1.5rem;
}

.branch-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .branches-section {
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .branch-accordion-btn {
        padding: 1.25rem;
    }

    .branch-icon {
        width: 2.25rem;
        height: 2.25rem;
    }

    .branch-icon i {
        font-size: 1rem;
    }

    .branch-header-info h3 {
        font-size: 1.125rem;
    }

    .branch-header-info p {
        font-size: 0.8125rem;
    }

    .branch-content-inner {
        padding: 0 1rem 1rem 1rem;
    }

    .branch-contact-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .branch-contact-category {
        padding: 0.75rem;
    }

    .branch-contact-header {
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }

    .branch-contact-links {
        gap: 0.375rem;
    }

    .branch-contact-link {
        padding: 0.5rem 0.625rem;
    }

    .contact-name {
        font-size: 0.75rem;
        margin-bottom: 0.1875rem;
    }

    .contact-number {
        font-size: 0.875rem;
    }

    .branch-address {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .branch-address-header {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
        gap: 0.625rem;
    }

    .branch-address-header i {
        font-size: 1rem;
        width: 2rem;
        height: 2rem;
        padding: 0.375rem;
    }

    .branch-address-content {
        font-size: 0.875rem;
        padding-left: 0.25rem;
    }

    .branch-map {
        height: 200px;
    }

    .branch-contact-links {
        gap: 0.375rem;
    }

    .branch-contact-link {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.25rem;
    }
}

/* =============================================== */
/* DARK MODE STİLLERİ                              */
/* =============================================== */

html.dark-mode .branch-header-info h3 {
    color: #f1f5f9;
}

html.dark-mode .branch-header-info p {
    color: #cbd5e1;
}

html.dark-mode .branch-contact-category {
    background: #0f172a;
    border-color: #334155;
}

html.dark-mode .branch-contact-category:hover {
    border-color: var(--color-primary);
}

html.dark-mode .branch-contact-header {
    color: #f1f5f9;
}

html.dark-mode .branch-contact-header i {
    color: #ffffff;
}

html.dark-mode .branch-contact-link {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

html.dark-mode .branch-contact-link:hover {
    border-color: var(--color-primary);
}

html.dark-mode .contact-name {
    color: #94a3b8;
}

html.dark-mode .contact-number {
    color: #f1f5f9;
}

html.dark-mode .branch-address {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-color: #334155;
}

html.dark-mode .branch-address-header {
    color: #f1f5f9;
}

html.dark-mode .branch-address-header i {
    color: #ffffff;
    background: rgba(var(--color-primary-rgb), 0.2);
}

html.dark-mode .branch-address-content {
    color: #cbd5e1;
}