/**
 * Kırıkkale Çölyak Derneği — Ortak Site Altyapısı
 * =================================================
 * Amaç: Tüm sayfalarda aynı Header / Navigation / Wrapper / Footer
 * davranışı ve scrollbar-gutter ile layout shift’in engellenmesi.
 * Tasarım (renk, 960px, logo, kartlar, dark mode) korunur.
 */

/* ---------- CSS Variables (site-wide) ---------- */
:root {
    --primary: #1A7A5A;
    --primary-light: #2A9A7A;
    --primary-dark: #0F5A3E;
    --accent: #E8850C;
    --bg: #e8eeeb;
    --text: #1A2626;
    --text-light: #3A4E4E;
    --white: #FFFFFF;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    --radius: 18px;
    --transition: 0.25s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --site-max: 960px;
    --header-pad-x: 1rem;
    --mobile-pad-x: 0.5rem;
    --site-primary: #1A7A5A;
    --site-primary-light: #2A9A7A;
    --site-primary-dark: #0F5A3E;
    --site-accent: #E8850C;
    --site-dark-nav: #2A2A2A;
    --site-dark-text: #F3F4F6;
    --site-dark-muted: #C5D4CC;

    --primary-glow: rgba(26, 122, 90, 0.15);
    --accent-glow: rgba(232, 133, 12, 0.25);
    --bg-card: #FFFFFF;
    --bg-elevated: #FAFBFB;
    --text-secondary: #3A4E4E;
    --text-muted: #9CA3AF;
    --border: rgba(0,0,0,0.06);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --radius-sm: 8px;
    --radius-lg: 24px;
    --font-display: 'Playfair Display', Georgia, serif;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
}


/* ---------- Reset & Box Model ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ---------- Scrollbar: layout shift kalıcı çözümü ----------
   Tüm sayfalarda aynı: scrollbar her zaman yer kaplar.
   Böylece sayfa geçişlerinde yatay kayma olmaz. */
html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scroll-padding-top: 140px;
    max-width: 100vw;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    min-height: 100vh;
    max-width: 100vw;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

[id] {
    scroll-margin-top: 140px;
}

/* ---------- Site Wrapper (tek standart) ---------- */
.site-wrapper {
    background: #ffffff;
    width: 100%;
    max-width: var(--site-max);
    margin: 1.5rem auto;
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08), 0 4px 20px rgba(0, 0, 0, 0.04);
    padding: 0 var(--header-pad-x);
    min-height: calc(100vh - 3rem);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-sizing: border-box;
    overflow-x: visible;
    position: relative;
}

@media (max-width: 640px) {
    .site-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0 var(--mobile-pad-x);
        border-radius: 0;
        box-shadow: none;
        border: none;
        min-height: 100vh;
        overflow-x: visible;
    }

    body {
        background: #ffffff;
        overflow-x: hidden;
    }
}

/* İç container — site-wrapper ile aynı genişlik mantığı */
.container {
    max-width: var(--site-max);
    margin: 0 auto;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
    overflow-x: visible;
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* ---------- HEADER (ortak yapı) ----------
   DOM: header > .header-top + .header-divider + .nav-overlay + nav.main-nav
   Genişlik: site-wrapper padding’i ile hizalı; margin negatif ile full-bleed. */
header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 2000;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    padding: 0.5rem var(--header-pad-x);
    margin: 0 calc(-1 * var(--header-pad-x));
    width: calc(100% + 2 * var(--header-pad-x));
    box-sizing: border-box;
    border-radius: 28px 28px 0 0;
    isolation: isolate;
}

@media (max-width: 640px) {
    header {
        margin: 0 calc(-1 * var(--mobile-pad-x));
        width: calc(100% + 2 * var(--mobile-pad-x));
        padding: 0.4rem var(--mobile-pad-x);
        border-radius: 0;
        background: #ffffff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* header-inner: bazı sayfalarda mevcut; display:contents ile nötrleştir */
.header-inner {
    display: contents;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
    text-decoration: none;
    min-width: 0;
}

.logo img {
    height: 56px;
    width: auto;
    border-radius: 8px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text .city {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

.logo-text .sub {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.header-info {
    display: flex;
    gap: 0.8rem;
    font-size: 0.75rem;
    color: var(--text-light);
    align-items: center;
}

.header-info i {
    margin-right: 0.2rem;
    color: var(--primary);
    font-size: 0.8rem;
}

.header-info span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(26, 122, 90, 0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
}

.header-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

.header-actions button {
    background: none;
    border: none;
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.header-actions button:hover {
    background: rgba(26, 122, 90, 0.08);
}

/* Hamburger — mobil menü tetikleyici */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text);
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2003;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.hamburger:hover {
    background: rgba(26, 122, 90, 0.08);
    color: var(--primary);
}

.hamburger .hamburger-line {
    display: block;
    width: 22px;
    height: 2.5px;
    background: currentColor;
    border-radius: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger .hamburger-line:nth-child(1) { top: 14px; }
.hamburger .hamburger-line:nth-child(2) { top: 21px; }
.hamburger .hamburger-line:nth-child(3) { top: 28px; }

.hamburger.active .hamburger-line:nth-child(1) {
    top: 21px;
    transform: translateX(-50%) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-50%) scaleX(0);
}

.hamburger.active .hamburger-line:nth-child(3) {
    top: 21px;
    transform: translateX(-50%) rotate(-45deg);
}

.header-divider {
    width: 100%;
    height: 2px;
    background: var(--primary-light);
    margin: 0.4rem 0;
    display: block;
    opacity: 0.3;
}

/* ---------- MAIN NAV ---------- */
.main-nav {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.1rem;
    width: 100%;
    position: relative;
    z-index: 2001;
    overflow-x: visible;
}

.main-nav .nav-left {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.1rem;
}

.main-nav .nav-right {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.1rem;
    margin-left: auto;
    flex-shrink: 0;
}

.main-nav a {
    color: var(--text-light);
    font-weight: 500;
    font-size: clamp(0.7rem, 1.1vw, 0.85rem);
    padding: 0.4rem 0.6rem;
    border-radius: 40px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    transition: color 0.25s ease, background-color 0.25s ease;
}

.main-nav a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary);
    border-radius: 40px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
    z-index: -1;
}

.main-nav a:hover::before,
.main-nav a:focus::before {
    transform: scaleX(1);
    transform-origin: left;
}

.main-nav a:hover,
.main-nav a:focus {
    color: #fff;
    background: var(--primary);
}

.main-nav a.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26, 122, 90, 0.25);
}

.nav-cta {
    background: var(--accent) !important;
    color: #fff !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(232, 133, 12, 0.25);
    margin-left: 0.2rem;
    display: inline-block;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
    box-shadow: 0 4px 12px rgba(15, 90, 62, 0.3);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1999;
    opacity: 0;
    pointer-events: none;
    filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: opacity 0.3s ease;
}

.nav-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Desktop: menü her zaman görünür */
@media (min-width: 769px) {
    .main-nav {
        display: flex !important;
        max-height: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
    }

    .nav-overlay {
        display: none !important;
    }

    .hamburger {
        display: none !important;
    }
}

/* Mobil: hamburger + açılır menü (breakpoint 768px — page-controls ile uyumlu) */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
    }

    .header-info {
        display: none;
    }

    .header-actions .header-actions-label {
        display: none;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background: var(--white);
        padding: 0 1rem;
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
        gap: 0.3rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 2002;
        opacity: 0;
        visibility: hidden;
        transform: none;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .main-nav.open {
        display: flex;
        max-height: 80vh;
        padding: 1rem;
        opacity: 1;
        visibility: visible;
        overflow-y: auto;
        background: #ffffff;
    }

    .main-nav a {
        width: 100%;
        text-align: left;
        padding: 0.7rem 1rem;
        border-radius: 12px;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        gap: 0.6rem;
        box-sizing: border-box;
    }

    .main-nav a::before {
        display: none;
    }

    .main-nav a i {
        width: 24px;
        text-align: center;
        color: var(--primary);
    }

    .main-nav a:hover,
    .main-nav a:focus {
        background: rgba(26, 122, 90, 0.08);
        color: var(--primary);
    }

    .main-nav a.active {
        background: var(--primary);
        color: #fff;
    }

    .main-nav a.active i {
        color: #fff;
    }

    .nav-cta {
        margin-top: 0.5rem;
        justify-content: center !important;
        margin-left: 0;
    }

    .main-nav .nav-left,
    .main-nav .nav-right {
        flex-direction: column;
        width: 100%;
        gap: 0.1rem;
        align-items: stretch;
    }

    .main-nav .nav-right {
        margin-left: 0;
    }

    .logo img {
        height: 42px;
    }

    .logo-text .city {
        font-size: 0.95rem;
    }

    .logo-text .sub {
        font-size: 0.6rem;
    }

    .header-divider {
        margin: 0.2rem 0;
    }
}


/* ---------- FOOTER (index tasarımı — tek kaynak) ---------- */
.footer {
    background: url('https://tmtdpykzmdvxszxwyege.supabase.co/storage/v1/object/public/icerikler/web-footer.png') center/cover no-repeat;
    color: #fff;
    margin-top: 60px;
    margin-left: calc(-1 * var(--header-pad-x));
    margin-right: calc(-1 * var(--header-pad-x));
    width: calc(100% + 2 * var(--header-pad-x));
    border-radius: 0 0 28px 28px;
    overflow: hidden;
    position: relative;
    box-sizing: border-box;
}
.footer::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(67, 205, 128, 0.3);
    z-index: 1;
    border-radius: inherit;
}
.footer > * { position: relative; z-index: 2; }
.footer-container {
    position: relative;
    z-index: 2;
    max-width: 960px;
    margin: auto;
    padding: 35px 25px;
    text-align: center;
}
.footer-logo {
    width: 120px;
    margin: 0 auto 15px;
    display: block;
}
.footer-title { font-size: 24px; font-weight: 700; margin-bottom: 12px; color: #fff; }
.footer-desc { max-width: 620px; margin: auto; color: rgba(255,255,255,0.85); line-height: 1.8; font-size: 15px; }
.footer-menu {
    margin: 28px 0 22px;
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}
.footer-menu a {
    text-decoration: none;
    color: #fff;
    background: rgba(255,255,255,.15);
    padding: 10px 18px;
    border-radius: 30px;
    transition: background-color 0.3s ease;
    font-size: 0.95rem;
}
.footer-menu a:hover { background: var(--accent); }
.footer-menu .footer-bagis-btn {
    background: var(--accent);
    color: #fff;
}
.footer-menu .footer-bagis-btn:hover {
    background: var(--primary-dark);
}
.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 22px;
}
.footer-social a {
    width: 42px; height: 42px;
    display: flex; justify-content: center; align-items: center;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1.1rem;
}
.footer-social a:hover { background: var(--accent); transform: translateY(-4px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.20); padding-top: 18px; }
.footer-bottom p { color: rgba(255,255,255,0.8); font-size: 14px; }
.footer-links {
    margin-top: 10px;
    display: flex; justify-content: center; flex-wrap: wrap; gap: 10px;
}
.footer-links a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 13px; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 768px) {
    .footer {
        border-radius: 0;
        background: url('https://tmtdpykzmdvxszxwyege.supabase.co/storage/v1/object/public/icerikler/mobil-footer.png') center/cover no-repeat;
        margin-left: calc(-1 * var(--mobile-pad-x));
        margin-right: calc(-1 * var(--mobile-pad-x));
        width: calc(100% + 2 * var(--mobile-pad-x));
        margin-top: 40px;
    }
    .footer::before { border-radius: 0; }
    .footer-container { padding: 28px 18px; }
    .footer-logo { width: 100px; }
    .footer-title { font-size: 20px; }
    .footer-desc { font-size: 14px; line-height: 1.7; }
    .footer-menu { gap: 10px; }
    .footer-menu a { padding: 8px 14px; font-size: 14px; }
    .footer-social a { width: 38px; height: 38px; font-size: 1rem; }
    .footer-links { gap: 8px; }
    .footer-links a { font-size: 12px; }
}


/* ---------- DARK MODE (tüm site — tek kaynak) ---------- */
body.dark-mode {
    --primary: #1A7A5A;
    --primary-light: #2A9A7A;
    --primary-dark: #0F5A3E;
    --accent: #E8850C;
    --bg: #111827;
    --text: #E5E7EB;
    --text-light: #9CA3AF;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;
    --white: #1E1E1E;
    --bg-card: #1E293B;
    --bg-elevated: #0F172A;
    --border: rgba(255,255,255,0.08);
    background: #111827 !important;
    color: #E5E7EB !important;
}

body.dark-mode .site-wrapper {
    background: #111827 !important;
    border-color: rgba(255,255,255,0.08) !important;
}

body.dark-mode header {
    background: #1E1E1E !important;
    border-bottom-color: rgba(255,255,255,0.12) !important;
}

body.dark-mode .logo-text .city,
body.dark-mode .logo-text .sub {
    color: #4ade80 !important;
}

body.dark-mode .header-info span {
    background: rgba(26, 122, 90, 0.15);
    color: #ccc;
}

body.dark-mode .header-actions button,
body.dark-mode .hamburger {
    color: #F3F4F6 !important;
    border-color: rgba(255,255,255,0.1);
}

body.dark-mode .header-actions button:hover,
body.dark-mode .hamburger:hover {
    background: rgba(26, 122, 90, 0.2);
    color: #4ade80 !important;
}

body.dark-mode .main-nav,
body.dark-mode .main-nav.open {
    background: #2A2A2A !important;
}

body.dark-mode .main-nav a {
    color: #C5D4CC !important;
}

body.dark-mode .main-nav a:hover,
body.dark-mode .main-nav a:focus {
    background: rgba(42, 154, 122, 0.2) !important;
    color: #F3F4F6 !important;
}

body.dark-mode .main-nav a.active {
    background: #1A7A5A !important;
    color: #fff !important;
}

body.dark-mode .main-nav a.active i {
    color: #fff !important;
}

body.dark-mode .main-nav a i {
    color: #4ade80;
}

body.dark-mode .nav-cta,
body.dark-mode .main-nav .nav-cta {
    background: #E8850C !important;
    color: #fff !important;
}

body.dark-mode .nav-cta:hover {
    background: #d97706 !important;
}

/* Genel içerik yüzeyleri */
body.dark-mode .container,
body.dark-mode main,
body.dark-mode main#main {
    color: #E5E7EB;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #F3F4F6;
}

body.dark-mode p,
body.dark-mode li,
body.dark-mode span,
body.dark-mode label {
    color: inherit;
}

/* Kartlar / kutular — yaygın sınıflar */
body.dark-mode [class*="card"]:not([class*="action"]):not(body),
body.dark-mode [class*="panel"],
body.dark-mode .content-section,
body.dark-mode .sidebar-toc,
body.dark-mode .kunye-card,
body.dark-mode .board-member,
body.dark-mode .announcement-card,
body.dark-mode .warning-card,
body.dark-mode .detail-hero,
body.dark-mode .author-posts-section,
body.dark-mode .extra-section,
body.dark-mode .news-card,
body.dark-mode .featured-card,
body.dark-mode .hero-right,
body.dark-mode .manset-wrapper,
body.dark-mode .filter-bar,
body.dark-mode .business-card,
body.dark-mode .stock-card-horizontal,
body.dark-mode .dist-card-new,
body.dark-mode .progress-container,
body.dark-mode .form-step,
body.dark-mode .page-header,
body.dark-mode .breadcrumb {
    background-color: #1E293B;
    border-color: rgba(255,255,255,0.08);
    color: #E5E7EB;
}

body.dark-mode .news-card-body,
body.dark-mode .featured-body,
body.dark-mode .card-body {
    background: #1E293B;
    color: #E5E7EB;
}

body.dark-mode .news-card-title,
body.dark-mode .featured-title,
body.dark-mode .detail-title {
    color: #F3F4F6 !important;
}

body.dark-mode .news-card-meta,
body.dark-mode .detail-meta,
body.dark-mode .breadcrumb,
body.dark-mode .text-muted {
    color: #9CA3AF !important;
}

body.dark-mode a:not(.nav-cta):not(.main-nav a):not(.footer a):not(.btn-primary) {
    color: #4ade80;
}

/* Form elemanları */
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: #1F2937 !important;
    color: #F3F4F6 !important;
    border-color: rgba(255,255,255,0.16) !important;
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #9CA3AF !important;
}

body.dark-mode .modal-box,
body.dark-mode .modal-overlay .modal-box,
body.dark-mode #modalOverlay .modal-box,
body.dark-mode #bagisModalOverlay .modal-box,
body.dark-mode #genelModalTitle {
    background: #1E293B;
    color: #E5E7EB;
}

body.dark-mode .modal-header,
body.dark-mode .modal-body {
    background: #1E293B;
    color: #E5E7EB;
    border-color: rgba(255,255,255,0.1);
}

/* Tablolar */
body.dark-mode table,
body.dark-mode th,
body.dark-mode td {
    border-color: rgba(255,255,255,0.1);
    color: #E5E7EB;
}

body.dark-mode th {
    background: #0F172A;
}

body.dark-mode tr:nth-child(even) {
    background: rgba(255,255,255,0.03);
}

/* Info boxes */
body.dark-mode .info-box.green { background: #1a3a2a; color: #a8d5b5; }
body.dark-mode .info-box.orange { background: #3a2a1a; color: #f5cba0; }
body.dark-mode .info-box.red { background: #3a1a1a; color: #f5a0a0; }
body.dark-mode .info-box.blue { background: #1a2a3a; color: #a0c5f5; }
body.dark-mode .info-box.purple { background: #2a1a3a; color: #c5a0f5; }

/* Footer */
body.dark-mode .footer {
    background: #1E1E1E !important;
    border-top: 1px solid rgba(255,255,255,0.12);
}
body.dark-mode .footer::before {
    opacity: 0.25;
}

@media (max-width: 768px) {
    body.dark-mode header {
        background: #1e1e1e !important;
    }
    body.dark-mode .main-nav.open {
        background: #2a2a2a !important;
    }
}

@media (max-width: 640px) {
    body.dark-mode {
        background: #111827 !important;
    }
    body.dark-mode .site-wrapper {
        background: #111827 !important;
    }
}


/* ---------- Breadcrumb (ortak) ---------- */
.breadcrumb,
.page-breadcrumb {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.6rem 0 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted, var(--text-light));
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.breadcrumb a,
.page-breadcrumb a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}
.breadcrumb a:hover,
.page-breadcrumb a:hover {
    text-decoration: underline;
}
.breadcrumb i {
    font-size: 0.6rem;
    color: #aaa;
}
.page-breadcrumb .sep {
    opacity: 0.5;
    color: #999;
}
.page-breadcrumb .current {
    font-weight: 600;
    color: var(--text);
}
body.dark-mode .breadcrumb,
body.dark-mode .page-breadcrumb {
    color: #999;
}
body.dark-mode .breadcrumb a,
body.dark-mode .page-breadcrumb a {
    color: var(--primary-light);
}
body.dark-mode .page-breadcrumb .current {
    color: #ddd;
}
@media (max-width: 640px) {
    .breadcrumb,
    .page-breadcrumb {
        padding: 1rem 0.25rem 0.5rem;
    }
}


/* ---------- Modal & Toast (ortak) ---------- */
.modal-overlay{
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-y: auto;
}
.modal-overlay.active{
    display: flex;
}
.modal-box{
    background: #fff;
    max-width: 800px;
    width: 100%;
    border-radius: var(--radius);
    padding: 1.5rem 1.5rem 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalFade 0.3s ease;
    transition: background 0.3s ease;
}
@keyframes modalFade {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.modal-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    margin-bottom: 0.8rem;
    flex-shrink: 0;
    transition: border-color 0.3s ease;
}
.modal-header h3{
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-dark);
    transition: color 0.3s ease;
}
.modal-header h3 i{
    color: var(--accent);
}
.modal-close{
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-light);
    transition: 0.2s;
    padding: 0 0.3rem;
    line-height: 1;
}
.modal-close:hover{
    color: var(--primary-dark);
    transform: rotate(90deg);
}
.modal-body{
    overflow-y: auto;
    flex: 1;
    padding-right: 0.2rem;
}
.modal-body::-webkit-scrollbar{
    width: 4px;
}
.modal-body::-webkit-scrollbar-track{
    background: #e2e8f0;
    border-radius: 4px;
}
.modal-body::-webkit-scrollbar-thumb{
    background: var(--primary);
    border-radius: 4px;
}

.modal-iban-box{
    background: linear-gradient(135deg, #f8fafc, #eef2f1);
    border-radius: var(--radius);
    padding: 1.5rem 1.8rem;
    border: 2px solid var(--accent);
    border-left: 6px solid var(--accent);
    box-shadow: 0 4px 20px rgba(232, 133, 12, 0.1);
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}
.modal-iban-box .modal-logo{
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 0.8rem;
    display: block;
    border: 3px solid var(--primary-light);
    padding: 4px;
    background: #fff;
}
.modal-iban-box .modal-iban-title{
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.modal-iban-box .modal-iban-number{
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    font-family: 'Inter', monospace;
    letter-spacing: 0.5px;
    word-break: break-all;
    background: rgba(255,255,255,0.6);
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 0.2rem;
}
.modal-iban-box .modal-iban-detail{
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.8rem;
}
.modal-iban-box .modal-iban-copy-btn{
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.4rem 1.6rem;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.modal-iban-box .modal-iban-copy-btn:hover{
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 122, 90, 0.25);
}
.modal-iban-box .modal-iban-divider{
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 0.5rem auto;
    border-radius: 4px;
}

.toast-msg{
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--primary-dark);
    color: #fff;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    pointer-events: none;
}
.toast-msg.show{
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.toast-msg i{
    margin-right: 0.4rem;
}

body.dark-mode .modal-box {
    background: #1E293B;
    color: #E5E7EB;
}
body.dark-mode .modal-header {
    border-bottom-color: rgba(255,255,255,0.1);
}
body.dark-mode .modal-header h3 {
    color: #F3F4F6;
}
body.dark-mode .modal-close {
    color: #9CA3AF;
}


/* ---------- Video Modal (ortak) ---------- */
.video-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 3000; /* header (2000) üstünde */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}
.video-modal.active {
    opacity: 1;
    visibility: visible;
}
.video-modal .modal-content {
    width: 100%;
    max-width: 900px;
    position: relative;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.video-modal .modal-content > iframe,
.video-modal .modal-content > img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    background: #000;
    display: block;
    max-height: 70vh;
}
.video-modal .modal-content > img {
    aspect-ratio: auto;
    object-fit: contain;
    margin: 0 auto;
}
.video-modal .modal-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff !important;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.35rem 0.55rem;
    z-index: 10;
    opacity: 0.9;
    border-radius: 8px;
    line-height: 1;
    transition: opacity 0.2s, background 0.2s;
}
.video-modal .modal-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.75);
    color: #fff !important;
    transform: none;
}
/* Footer: logo sol, altında marka + video bilgisi */
.video-modal .modal-footer {
    background: #0a0a0a;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
}
.video-modal .modal-footer .modal-footer-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: block;
    flex-shrink: 0;
}
.video-modal .modal-footer .modal-footer-brand {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
    line-height: 1.3;
}
.video-modal .modal-footer .modal-footer-brand span {
    color: var(--accent, #E8850C);
}
.video-modal .modal-footer .modal-footer-title {
    display: block;
    font-size: 0.8rem;
    color: #aaa;
    font-weight: 400;
    line-height: 1.4;
}
@media (max-width: 640px) {
    .video-modal {
        padding: 0.5rem;
    }
    .video-modal .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1.25rem;
    }
    .video-modal .modal-footer {
        padding: 0.85rem 1rem;
    }
    .video-modal .modal-footer .modal-footer-logo-img {
        width: 40px;
        height: 40px;
    }
    .video-modal .modal-footer .modal-footer-brand {
        font-size: 0.85rem;
    }
    .video-modal .modal-footer .modal-footer-title {
        font-size: 0.75rem;
    }
}

/* ---------- Focus visible ---------- */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
