/* =============================================
   Windlevel — Blog & Trend Haber Sitesi Stilleri
   ============================================= */

:root {
    /* Renk Paleti - Beyaz, Gri ve Elektrik Mavisi */
    --bg-main: #f8fafc;        /* Çok açık gri, göz yormayan arka plan */
    --bg-card: #ffffff;        /* Saf beyaz kartlar */
    --bg-header: #ffffff;      /* Beyaz menü */
    
    --text-dark: #0f172a;      /* Çok koyu lacivert/siyah metin (Başlıklar) */
    --text-body: #334155;      /* Koyu gri okuma metni (Göz yormaz) */
    --text-muted: #64748b;     /* Açık gri alt metinler, tarihler */
    
    --accent: #2563eb;         /* Elektrik Mavisi - Ana Vurgu Rengi */
    --accent-hover: #1d4ed8;   /* Buton hover rengi */
    --accent-light: #eff6ff;   /* Mavi arkaplan vurguları için */
    --accent-gradient: linear-gradient(135deg, #3b82f6, #2563eb);
    
    --border: #e2e8f0;         /* Zarif kart kenarlıkları */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.05);
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    /* Fontlar */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
    
    --max-w: 1200px;
    --nav-h: 70px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    font-family: var(--font-sans); 
    background-color: var(--bg-main); 
    color: var(--text-body); 
    line-height: 1.6;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; display: block; border-radius: var(--radius-sm); }
button, input, select, textarea { font-family: inherit; border: none; outline: none; }
button { cursor: pointer; }

/* ---------------- HEADER VE AÇILIR MENÜ (DROPDOWN) ---------------- */
/* Canlı Veri Bandı (Ticker) */
.live-ticker {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 36px;
    background: #0f172a;
    color: white;
    z-index: 101;
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    border-bottom: 1px solid #1e293b;
}
.ticker-wrapper { width: 100%; overflow: hidden; white-space: nowrap; }
.ticker-content { display: inline-block; padding-left: 100%; animation: ticker 25s linear infinite; }
.ticker-content:hover { animation-play-state: paused; }
@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}
.ticker-item { display: inline-flex; align-items: center; gap: 6px; margin-right: 40px; }
.ticker-val { font-weight: 800; }
.ticker-up { color: #10b981; font-size:10px; }
.ticker-down { color: #ef4444; font-size:10px; }

.navbar {
    position: fixed;
    top: 36px; /* Ticker yüksekliği eklendi */
    left: 0; right: 0;
    height: var(--nav-h);
    background: var(--bg-header);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
}
.brand-logo-img { height: 48px; width: auto; object-fit: contain; }

.nav-links { display: flex; gap: 24px; align-items: center; }

/* Arama Çubuğu */
.nav-search {
    display: flex; align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    margin-right: 16px;
}
.nav-search input { background: transparent; font-size: 14px; color: var(--text-dark); width: 150px; transition: width 0.3s; }
.nav-search input:focus { width: 200px; }
.nav-search button { background: transparent; font-size: 14px; color: var(--text-muted); }
.nav-search button:hover { color: var(--accent); }

.nav-link {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    height: 100%;
}
.nav-link:hover { color: var(--accent); }

/* Açılır Menü (Dropdown) */
.dropdown {
    position: relative;
    display: inline-block;
    height: 100%;
    display: flex;
    align-items: center;
}
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: -20px;
    background-color: var(--bg-card);
    min-width: 260px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    border: 1px solid var(--border);
    border-top: none;
    z-index: 1000;
    padding: 10px 0;
}
.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease;
}
.dropdown-content a {
    color: var(--text-body);
    padding: 12px 20px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}
.dropdown-content a:hover {
    background-color: var(--accent-light);
    color: var(--accent);
    padding-left: 25px; /* Hover animasyonu */
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---------------- ANA SAYFA (INDEX) ---------------- */
.container {
    max-width: var(--max-w);
    margin: calc(var(--nav-h) + 66px) auto 60px; /* 30 + 36px ticker */
    padding: 0 20px;
}

/* Kategori Etiketi */
.category-tag {
    display: inline-block;
    padding: 4px 10px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.category-tag.trend { background: #fef2f2; color: #dc2626; } /* Trend kırmızı */

/* Manşet Gridi (Hero Section) */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 240px 240px;
    gap: 20px;
    margin-bottom: 40px;
}
.hero-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: block;
    box-shadow: var(--shadow-sm);
}
.hero-card.main { grid-row: 1 / -1; }
.hero-card img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.hero-card:hover img { transform: scale(1.05); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.9) 0%, rgba(15,23,42,0) 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}
.hero-title {
    color: white;
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}
.hero-card.main .hero-title { font-size: 32px; margin-bottom: 8px; }
.hero-meta { color: rgba(255,255,255,0.7); font-size: 13px; display: flex; gap: 12px; margin-top: 8px; }

/* İçerik Düzeni (Sol Akış, Sağ Sidebar) */
.content-layout {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 40px;
}
.section-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.section-title::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

/* Yazı Kartları (List Style) */
.post-list { display: flex; flex-direction: column; gap: 24px; }
.post-card {
    display: flex;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: 0.3s;
}
.post-card:hover { box-shadow: var(--shadow-md); border-color: #cbd5e1; }
.post-img { width: 280px; flex-shrink: 0; position: relative; overflow: hidden; }
.post-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: 0.4s; }
.post-card:hover .post-img img { transform: scale(1.05); }
.post-info { padding: 24px; display: flex; flex-direction: column; justify-content: center; }
.post-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.4;
}
.post-card:hover .post-title { color: var(--accent); }
.post-excerpt { color: var(--text-body); font-size: 15px; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text-muted); font-weight: 500; }

.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}
.sidebar-widget:last-child {
    position: sticky;
    top: 100px;
}
.widget-title { font-family: var(--font-heading); font-size: 18px; font-weight: 700; color: var(--text-dark); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.popular-list { display: flex; flex-direction: column; gap: 16px; }
.popular-item { display: flex; gap: 12px; align-items: center; }
.popular-num { font-family: var(--font-heading); font-size: 32px; font-weight: 800; color: var(--border); line-height: 1; }
.popular-title { font-size: 14px; font-weight: 600; color: var(--text-dark); line-height: 1.4; }
.popular-item:hover .popular-title { color: var(--accent); }

/* ---------------- ÇEREZ BİLDİRİMİ (COOKIE BANNER) ---------------- */
.cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    background: #1a1a1a;
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border: 1px solid #333;
    max-width: 800px;
    margin: 0 auto;
    font-family: var(--font-body);
    transition: opacity 0.3s ease;
}
.cookie-banner h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    margin: 0;
}
.cookie-banner p {
    font-size: 14px;
    color: #a3a3a3;
    line-height: 1.5;
    margin: 0;
}
.cookie-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.btn-cookie {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    background: transparent;
    border: 1px solid #444;
    color: white;
}
.btn-cookie:hover { background: #333; }
.btn-cookie-accept {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
.btn-cookie-accept:hover {
    background: #1d4ed8;
}
@media (max-width: 600px) {
    .cookie-banner { bottom: 0; left: 0; right: 0; border-radius: 20px 20px 0 0; }
    .cookie-actions { justify-content: stretch; }
    .btn-cookie { flex: 1; text-align: center; }
}

/* ---------------- OKUMA SAYFASI (ARTICLE) ---------------- */
.article-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}
.article-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 20px;
}
.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 30px;
}
.article-meta-item { display: flex; align-items: center; gap: 6px; }
.article-hero-img {
    width: 100%;
    max-width: 1000px;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin: 0 auto 40px;
    box-shadow: var(--shadow-md);
}

.article-content {
    max-width: 760px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Dinamik Blok Stilleri */
.block-text { margin-bottom: 24px; }
.block-text p { margin-bottom: 20px; }
.block-text h2 { font-family: var(--font-heading); font-size: 28px; font-weight: 700; margin: 40px 0 16px; color: var(--text-dark); }
.block-text h3 { font-family: var(--font-heading); font-size: 22px; font-weight: 700; margin: 30px 0 16px; color: var(--text-dark); }
.block-text a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-color: transparent; }
.block-text a:hover { text-decoration-color: var(--accent); }

.block-image { margin: 40px 0; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }
.block-image img { width: 100%; height: auto; }
.block-image figcaption { text-align: center; font-size: 14px; color: var(--text-muted); padding: 12px; background: var(--bg-card); border: 1px solid var(--border); border-top: none; }

.block-youtube {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Oran */
    height: 0;
    margin: 40px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.block-youtube iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
}

.block-audio {
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}
.block-audio audio { width: 100%; height: 40px; }
.audio-icon { width: 48px; height: 48px; background: var(--accent-light); color: var(--accent); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 24px; }


/* ---------------- ADMIN PANEL ---------------- */
.admin-container { max-width: 900px; margin: calc(var(--nav-h) + 66px) auto 60px; padding: 0 20px; }
.admin-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 32px; box-shadow: var(--shadow-sm); }
.admin-title { font-family: var(--font-heading); font-size: 24px; font-weight: 800; margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-dark); margin-bottom: 8px; }
.form-control { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; font-family: inherit; background: var(--bg-main); transition: 0.2s; }
.form-control:focus { border-color: var(--accent); background: white; box-shadow: 0 0 0 3px var(--accent-light); }

/* Blok Düzenleyici */
.builder-area { margin-top: 32px; padding-top: 24px; border-top: 1px dashed var(--border); }
.builder-toolbar { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.btn-block { padding: 10px 16px; background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; color: var(--text-body); display: flex; align-items: center; gap: 8px; transition: 0.2s; }
.btn-block:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); transform: translateY(-2px); }

.blocks-container { display: flex; flex-direction: column; gap: 20px; }
.editor-block { background: white; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; position: relative; display: flex; gap: 16px; animation: slideIn 0.3s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.block-handle { cursor: grab; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.block-content-edit { flex: 1; }
.block-type-label { font-size: 11px; font-weight: 700; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; display: inline-block; padding: 2px 8px; background: var(--accent-light); border-radius: 4px; }
.btn-remove-block { color: #dc2626; background: #fef2f2; border: none; padding: 6px; border-radius: 4px; cursor: pointer; transition: 0.2s; }
.btn-remove-block:hover { background: #fee2e2; }

.btn-primary { background: var(--accent); color: white; border: none; padding: 14px 24px; border-radius: var(--radius-sm); font-size: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; transition: 0.2s; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37,99,235,0.3); }

#exportArea { margin-top: 24px; display: none; }
#exportCode { width: 100%; height: 200px; font-family: monospace; font-size: 13px; padding: 16px; background: #0f172a; color: #38bdf8; border-radius: var(--radius-md); border: none; resize: vertical; }

/* Responsive */
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .hero-card.main { grid-row: auto; height: 350px; }
    .hero-card:not(.main) { height: 200px; }
    .content-layout { grid-template-columns: 1fr; }
    .post-card { flex-direction: column; }
    .post-img { width: 100%; height: 200px; }
}
/* Hamburger Menü İkonu (Masaüstünde Gizli) */
.hamburger { display: none; background: transparent; border: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 110; padding: 10px; margin-left: auto; }
.hamburger span { width: 25px; height: 3px; background: var(--text-dark); border-radius: 3px; transition: 0.3s; }
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Mobil Menü Karartması */
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 98; }
.mobile-overlay.active { display: block; }

@media (max-width: 600px) {
    .hamburger { display: flex; }
    
    /* Yandan Açılan Mobil Menü */
    .nav-links { 
        position: fixed;
        top: 0; right: -100%;
        width: 280px; height: 100vh;
        background: var(--bg-card);
        flex-direction: column;
        align-items: flex-start;
        padding: 90px 24px 24px;
        box-shadow: -5px 0 25px rgba(0,0,0,0.15);
        transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 100;
        gap: 16px;
    }
    .nav-links.active { right: 0; }
    
    .nav-search { width: 100%; margin-right: 0; margin-bottom: 12px; }
    .nav-search input { width: 100%; }
    .nav-search input:focus { width: 100%; }
    
    /* Kompakt Haber Kartları (Yatay ve Küçük) */
    .post-card { flex-direction: row; align-items: center; padding: 12px; gap: 16px; height: auto; }
    .post-img { width: 100px; height: 100px; border-radius: var(--radius-sm); }
    .post-info { padding: 0; flex: 1; }
    .post-title { font-size: 15px; margin-bottom: 6px; line-height: 1.3; }
    .post-excerpt { display: none; /* Mobilde yerden tasarruf için özeti gizle */ }
    .post-meta { font-size: 12px; gap: 10px; }

    .article-title { font-size: 26px; }
    .article-hero-img { height: 220px; margin-bottom: 24px; }
}
