/*
Theme Name: SubeAdres Tema
Theme URI: https://subeadres.com
Author: SubeAdres.Com
Description: Şube Bulucu - Hepsi Bir Arada Şube Motoru eklentisi ile tam uyumlu, dinamik ana menülü, Google AdSense uyumlu yasal sayfalar ve sol üst kurumsal menü destekli WordPress teması.
Version: 4.0
Text Domain: subeadres
*/

:root {
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --secondary: #0f172a;
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #334155;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Sol Üst Kurumsal Menü Barı (AdSense & Yasal Sayfalar) */
.top-bar {
    background: var(--secondary);
    color: #cbd5e1;
    font-size: 0.82rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 0;
}
.top-left-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}
.top-left-nav a {
    color: #e2e8f0;
    font-weight: 500;
    transition: color 0.15s;
}
.top-left-nav a:hover {
    color: #60a5fa;
    text-decoration: none;
}
.top-bar-right {
    color: #94a3b8;
    font-size: 0.8rem;
}
.top-bar-right a {
    color: #cbd5e1;
}

/* Header & Dinamik Ana Menü */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; }
.site-logo { font-size: 1.5rem; font-weight: 800; color: var(--secondary); text-decoration: none !important; }
.site-logo span { color: var(--primary); }

.menu-toggle {
    display: none;
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: var(--secondary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.main-nav > ul {
    list-style: none;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.main-nav > ul > li {
    position: relative;
}
.main-nav > ul > li > a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.94rem;
    transition: background 0.15s, color 0.15s;
}
.main-nav > ul > li > a:hover {
    background: #eff6ff;
    color: var(--primary);
    text-decoration: none;
}

/* Açılır Menü (Dropdown) */
.main-nav .has-dropdown > a::after {
    content: "▾";
    font-size: 0.78rem;
    opacity: 0.7;
}
.main-nav .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    max-width: 340px;
    max-height: 380px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    padding: 8px 0;
    list-style: none;
    z-index: 300;
}
.main-nav .has-dropdown:hover > .sub-menu,
.main-nav .has-dropdown:focus-within > .sub-menu,
.main-nav .has-dropdown.open > .sub-menu {
    display: block;
}
.main-nav .sub-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.35;
    border-bottom: 1px solid #f1f5f9;
}
.main-nav .sub-menu li:last-child a { border-bottom: none; }
.main-nav .sub-menu li a:hover {
    background: #eff6ff;
    color: var(--primary);
    text-decoration: none;
}
.menu-count-pill {
    background: #f1f5f9;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    flex-shrink: 0;
}
.sub-menu-footer a {
    font-weight: 700 !important;
    color: var(--primary) !important;
    background: #f8fafc;
}

/* Hero & Arama */
.hero {
    background: linear-gradient(135deg, var(--secondary), var(--primary-dark));
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.hero h1 { font-size: 2.2rem; margin-bottom: 12px; }
.hero p { color: #cbd5e1; max-width: 640px; margin: 0 auto 28px; font-size: 1.05rem; }
.search-box {
    display: flex;
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    padding: 6px;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}
.search-box input {
    flex: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    outline: none;
    border-radius: 50px;
    color: var(--secondary);
}
.search-box button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.search-box button:hover { background: var(--primary-dark); }

/* Filtre Bar (Arşiv Sayfası) */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 26px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.filter-bar select, .filter-bar input[type="text"] {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--secondary);
    background: #fff;
    min-width: 190px;
    flex: 1;
}
.filter-bar button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.filter-bar button:hover { background: var(--primary-dark); }
.filter-reset {
    color: var(--muted);
    font-size: 0.9rem;
    padding: 8px 12px;
}

/* Bölümler ve Izgara */
.section { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; flex-wrap: wrap; gap: 10px; }
.section-title { font-size: 1.5rem; color: var(--secondary); font-weight: 800; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }

/* Kartlar */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15,23,42,0.06); }
.card h3 { font-size: 1.1rem; margin-bottom: 8px; color: var(--secondary); line-height: 1.35; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--primary); }
.badge-group { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--primary);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}
.badge-gray { background: #f1f5f9; color: #475569; }
.meta-row { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }
.card-footer-link { margin-top: auto; padding-top: 12px; font-size: 0.88rem; font-weight: 600; }

/* Şehir Etiketleri */
.city-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.city-pill {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--secondary);
    transition: all 0.2s;
}
.city-pill:hover { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.city-pill span { font-size: 0.78rem; opacity: 0.75; margin-left: 4px; }

/* Tekil Şube, Blog ve Yasal Sayfalar */
.content-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin: 30px 0;
}
.blog-thumb { width: 100%; height: 185px; object-fit: cover; border-radius: 6px; margin-bottom: 14px; }
.post-content h2, .post-content h3 { margin: 24px 0 12px; color: var(--secondary); }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin: 0 0 18px 22px; }
.post-content li { margin-bottom: 8px; }

/* SSS (FAQ) Akordeon */
.faq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}
.faq-item summary {
    padding: 16px 20px;
    font-weight: 700;
    color: var(--secondary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::after {
    content: "+";
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 700;
}
.faq-item[open] summary::after {
    content: "−";
}
.faq-answer {
    padding: 0 20px 18px;
    color: var(--text);
    border-top: 1px solid var(--border);
    padding-top: 14px;
    background: #fff;
}

/* İletişim Sayfası & Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 28px;
    margin-top: 20px;
}
.contact-info-box {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.contact-info-item {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed var(--border);
}
.contact-info-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.contact-info-item strong { display: block; color: var(--secondary); margin-bottom: 4px; }
.contact-form .form-group { margin-bottom: 16px; }
.contact-form label { display: block; font-weight: 600; color: var(--secondary); margin-bottom: 6px; font-size: 0.92rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--secondary);
    background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}
.contact-submit-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 26px;
    border-radius: 8px;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
}
.contact-submit-btn:hover { background: var(--primary-dark); }
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}
.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 600;
}

/* Yakındaki Noktalar Shortcode */
.yakinimda-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.yakinimda-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}
.yakinimda-card a { font-weight: 700; color: var(--secondary); display: block; margin-bottom: 4px; }
.yakinimda-card a:hover { color: var(--primary); }
.yakinimda-card small { color: var(--muted); display: block; font-size: 0.84rem; }

/* Sayfalama */
.navigation.pagination { margin-top: 32px; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.nav-links .page-numbers {
    padding: 8px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--secondary);
    font-weight: 600;
}
.nav-links .page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Footer */
.site-footer {
    background: var(--secondary);
    color: #94a3b8;
    padding: 44px 0 28px;
    margin-top: 40px;
    font-size: 0.9rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 20px;
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: #cbd5e1; }
.footer-col a:hover { color: #60a5fa; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.84rem;
}

/* Çerez Bildirim Çubuğu (AdSense / KVKK) */
.cookie-banner {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 960px;
    margin: 0 auto;
    background: #0f172a;
    color: #e2e8f0;
    padding: 14px 20px;
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.28);
    display: none;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    z-index: 999;
    font-size: 0.86rem;
}
.cookie-banner a { color: #60a5fa; text-decoration: underline; }
.cookie-accept-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .menu-toggle { display: inline-block; }
    .main-nav {
        display: none;
        width: 100%;
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }
    .main-nav.is-open { display: block; }
    .main-nav > ul { flex-direction: column; align-items: stretch; gap: 4px; }
    .main-nav > ul > li > a { width: 100%; justify-content: space-between; }
    .main-nav .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: #f8fafc;
        max-width: 100%;
        margin-top: 4px;
        border-radius: 8px;
    }
    .contact-grid, .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 1.7rem; }
    .content-shell { padding: 20px; }
    .sube-detay-row { flex-direction: column; gap: 4px; }
    .sube-detay-label { width: 100% !important; }
    .top-bar-right { display: none; }
    .cookie-banner { flex-direction: column; text-align: center; }
}
