/* ===== Konya Ereğli Portalı - Sade Tema ===== */
:root {
    --primary: #1a5f3f;
    --primary-dark: #124a30;
    --accent: #d9a441;
    --text: #232323;
    --muted: #6b7280;
    --bg: #f6f7f5;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --radius: 10px;
}
* { box-sizing: border-box; }
html { overflow-x: hidden; }
body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    max-width: 100vw;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { background: var(--primary); color: #fff; position: sticky; top: 0; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 16px; }
.logo { font-size: 22px; font-weight: 700; color: #fff; white-space: nowrap; flex-shrink: 0; }
.logo-k { font-weight: 400; text-transform: lowercase; }
.logo-e { font-weight: 700; }
.main-nav { display: flex; align-items: center; gap: 16px; flex-wrap: nowrap; }
.main-nav a { color: #eaf3ee; font-size: 14px; white-space: nowrap; }
.main-nav a:hover { color: var(--accent); }
.main-nav .btn-nav { background: var(--accent); color: #1a1a1a; padding: 7px 14px; border-radius: 20px; font-weight: 600; }
.nav-search-icon { font-size: 16px; opacity: .85; }
.nav-search-icon:hover { opacity: 1; }
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; flex-shrink: 0; }

/* Hizmetler açılır (dropdown) menü */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
    background: none; border: none; color: #eaf3ee; font: inherit; font-size: 14px;
    cursor: pointer; padding: 0; white-space: nowrap; display: flex; align-items: center; gap: 4px;
}
.nav-dropdown-toggle:hover { color: var(--accent); }
.nav-dropdown-toggle .caret { font-size: 11px; transition: transform .15s; }
.nav-dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0; margin-top: 12px;
    background: #fff; min-width: 200px; border-radius: 8px; overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 200;
}
.nav-dropdown-menu a { display: block; padding: 11px 16px; color: var(--text); font-size: 14px; white-space: nowrap; }
.nav-dropdown-menu a:hover { background: #f0f2f0; color: var(--primary); }
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.nav-dropdown.open .caret { transform: rotate(180deg); }

/* Hero */
.hero { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; text-align: center; padding: 40px 16px; }
.hero h1 { margin: 0 0 8px; font-size: 30px; }
.hero p { margin: 0; color: #cfe6da; }

.trust-badges { display: flex; justify-content: center; gap: 40px; padding: 20px 16px; flex-wrap: wrap; }
.trust-badge { text-align: center; }
.trust-badge strong { display: block; font-size: 26px; color: var(--primary); font-weight: 700; }
.trust-badge span { font-size: 13px; color: var(--muted); }

/* Üstte kayan yazı (haber şeridi) */
.ticker-bar { display: flex; align-items: center; background: #16321f; color: #fff; overflow: hidden; }
.ticker-label { flex-shrink: 0; background: var(--accent); color: #1a1a1a; font-weight: 700; font-size: 12px; padding: 8px 14px; white-space: nowrap; }
.ticker-track { flex: 1; overflow: hidden; white-space: nowrap; }
.ticker-content { display: inline-flex; animation: ticker-scroll 25s linear infinite; }
.ticker-content span { padding-right: 70px; font-size: 13px; }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-content { animation: none; } }

.top-ad-wrap, .bottom-ad-wrap { margin-top: 14px; text-align: center; }
.inline-ad { margin: 20px 0; text-align: center; }
.ad-box img { margin: 0 auto; border-radius: 8px; }
.ad-box { min-height: 0; }

/* Layout */
.main-content { padding: 24px 16px 50px; }
.page-title { font-size: 26px; margin: 20px 0 16px; }
.page-grid { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }
.page-sidebar { position: sticky; top: 78px; display: flex; flex-direction: column; gap: 16px; }

.section-block { margin-bottom: 34px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 21px; }
.see-all { color: var(--primary); font-weight: 600; font-size: 14px; }

/* Cards */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.business-grid, .classified-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

.news-card, .business-card, .classified-card {
    background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: box-shadow .15s, transform .15s; position: relative;
}
.news-card:hover, .business-card:hover, .classified-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }

/* Haber kartı: hangi oranda/boyutta görsel yüklenirse yüklensin, kart hep aynı düzgün
   görünümde kalır (object-fit: cover ile otomatik kırpma, kenarlarda boşluk/bozulma olmaz). */
.news-card-img { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: #eee; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-img .badge { position: absolute; left: 10px; bottom: 10px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.breaking-badge {
    position: absolute; top: 10px; right: 10px; background: #dc2626; color: #fff;
    font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,.25); animation: breaking-pulse 1.6s ease-in-out infinite;
}
@keyframes breaking-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

/* Türkiye Gündemi widget'ı (Anadolu Ajansı) */
.gundem-source-note { color: var(--muted); font-size: 12px; }
.gundem-list { display: flex; flex-direction: column; gap: 12px; }
.gundem-item {
    display: flex; gap: 12px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px; transition: box-shadow .15s, transform .15s;
}
.gundem-item:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-2px); }
.gundem-thumb { width: 84px; height: 84px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: #eee; }
.gundem-body { flex: 1; min-width: 0; }
.gundem-source {
    display: inline-block; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 20px; margin-bottom: 5px; letter-spacing: .3px;
}
.gundem-title { font-size: 14.5px; font-weight: 700; margin: 0 0 4px; line-height: 1.35; }
.gundem-excerpt {
    font-size: 12.5px; color: var(--muted); margin: 0; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.gundem-meta { font-size: 11px; color: var(--muted); margin-top: 6px; }
.gundem-meta .goto { color: var(--primary); font-weight: 600; }
@media (max-width: 700px) {
    .gundem-thumb { width: 64px; height: 64px; }
}
.news-card-body { padding: 14px; }
.news-card-body .badge { display: none; } /* kategori etiketi artık görsel üzerinde gösteriliyor, iki kere tekrar etmesin */
.news-card-body h3 { font-size: 17px; margin: 4px 0 6px; line-height: 1.3; font-weight: 700; }

.business-card img, .classified-card img { width: 100%; height: 150px; object-fit: cover; background: #eee; }
.business-card-body, .classified-card-body { padding: 12px 14px; }
.business-card-body h3, .classified-card-body h3 { font-size: 16px; margin: 6px 0; }

.badge { display: inline-block; background: var(--primary); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 20px; }
.badge-outline { display: inline-block; border: 1px solid var(--primary); color: var(--primary); font-size: 11px; padding: 2px 9px; border-radius: 20px; margin-top: 4px; }
.news-date { color: var(--muted); font-size: 12px; display: block; margin-top: 6px; }
.price { display: block; color: var(--accent); font-weight: 700; margin-top: 4px; }
.featured-tag { position: absolute; top: 8px; right: 8px; background: var(--accent); color: #1a1a1a; font-size: 11px; padding: 3px 8px; border-radius: 20px; font-weight: 700; z-index: 2; }
.empty-msg { color: var(--muted); padding: 20px 0; }
.muted { color: var(--muted); font-size: 13px; }

/* Sidebar boxes */
.sidebar-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.sidebar-box h3 { margin-top: 0; font-size: 16px; }
.sidebar-box ul { list-style: none; padding: 0; margin: 0; }
.sidebar-box ul li { margin-bottom: 8px; }
.sidebar-box ul a { color: var(--primary); font-weight: 600; }

.most-read-list { list-style: none; padding: 0; margin: 0; }
.most-read-list li { margin-bottom: 10px; }
.most-read-list a { display: flex; gap: 10px; align-items: baseline; font-size: 13px; color: var(--text); font-weight: 500; }
.most-read-rank { flex-shrink: 0; font-weight: 700; color: var(--accent); font-size: 15px; }

/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filter-bar a { background: #fff; border: 1px solid var(--border); padding: 6px 14px; border-radius: 20px; font-size: 13px; }
.filter-bar a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Search bar */
.search-bar { display: flex; gap: 8px; margin-bottom: 16px; }
.search-bar input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; }
.search-bar button { background: var(--primary); color: #fff; border: none; padding: 0 20px; border-radius: 8px; cursor: pointer; }

/* Pagination */
.pagination { display: flex; gap: 6px; margin-top: 20px; }
.pagination a { border: 1px solid var(--border); padding: 6px 12px; border-radius: 6px; background: #fff; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Detail pages */
.detail-box, .news-detail { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.detail-img, .news-detail-img { width: 100%; max-height: 420px; object-fit: cover; border-radius: 8px; margin-bottom: 16px; }

.news-video-wrap { position: relative; width: 100%; aspect-ratio: 16/9; margin: 16px 0; border-radius: 8px; overflow: hidden; background: #000; }
.news-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.news-meta { color: var(--muted); font-size: 13px; margin: 6px 0 16px; }
.news-content { font-size: 16px; white-space: pre-line; }
.info-list { list-style: none; padding: 0; margin-top: 18px; }
.info-list li { margin-bottom: 8px; }
.price-big { font-size: 24px; color: var(--accent); font-weight: 700; margin: 10px 0; }

.share-buttons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.share-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.share-btn { font-size: 13px; padding: 6px 14px; border-radius: 20px; color: #fff; font-weight: 600; }
.share-whatsapp { background: #25D366; }
.share-facebook { background: #1877F2; }
.share-x { background: #000; }

.gallery-strip { display: flex; gap: 8px; overflow-x: auto; margin: 14px 0; padding-bottom: 4px; }
.gallery-strip img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }

.report-link { margin-top: 14px; }
.report-link a { color: var(--muted); font-size: 13px; }
.report-link a:hover { color: #b91c1c; }

.gallery-manage { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.gallery-manage-item { text-align: center; }
.gallery-manage-item img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }

/* Forms */
.form-page { max-width: 640px; }
.form-narrow { max-width: 420px; margin: 0 auto; }
.site-form { display: flex; flex-direction: column; gap: 4px; background: var(--card-bg); border: 1px solid var(--border); padding: 22px; border-radius: var(--radius); }
.site-form label { font-size: 13px; font-weight: 600; margin-top: 10px; }
.site-form input, .site-form select, .site-form textarea {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; font-family: inherit; width: 100%;
}
.btn-full { display: inline-block; text-align: center; background: var(--primary); color: #fff; border: none; padding: 12px; border-radius: 8px; font-weight: 700; cursor: pointer; margin-top: 16px; font-size: 15px; }
.btn-full:hover { background: var(--primary-dark); }
.btn-alt { background: var(--accent); color: #1a1a1a; }
.form-alt-link { text-align: center; margin-top: 14px; color: var(--muted); }
.form-box { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.payment-box { background: #fff8ec; border: 1px solid #f0dcae; border-radius: 8px; padding: 14px 16px; margin-top: 16px; }
.img-hint { display: block; font-size: 12px; color: var(--muted); margin: -8px 0 6px; }
.duty-pharmacy-card { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: var(--radius); padding: 24px; }
.duty-pharmacy-card h2 { margin: 10px 0; font-size: 24px; }
.duty-pharmacy-card .info-list a { color: #fff; text-decoration: underline; }
.duty-pharmacy-card .muted { color: #cfe6da; }
.duty-widget {
    display: flex; flex-direction: column; gap: 4px; background: var(--card-bg);
    border: 1px solid var(--border); border-left: 4px solid var(--accent);
    border-radius: var(--radius); padding: 14px 16px;
}
.duty-widget strong { font-size: 15px; color: var(--text); }
.form-section-title { font-size: 16px; margin: 22px 0 4px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--primary); }
.site-form .form-section-title:first-of-type { border-top: none; padding-top: 0; margin-top: 4px; }
.color-row { display: flex; gap: 20px; margin-top: 10px; }
.color-row input[type="color"] { width: 60px; height: 40px; padding: 2px; cursor: pointer; }
.checkbox-label { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; margin-top: 16px !important; }
.checkbox-label input { width: auto !important; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.alert-error { background: #fde8e8; color: #9b1c1c; border: 1px solid #f8b4b4; }
.alert-success { background: #e6f6ea; color: #17663b; border: 1px solid #a7e3bb; }

/* Tables (profile/admin) */
.simple-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.simple-table th, .simple-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
.simple-table th { background: #f0f2f0; font-size: 13px; }

/* Dar ekranlarda (mobil) etiketlenmemiş tablolar yatay kaydırılabilir kalır (yedek çözüm) */
@media (max-width: 700px) {
    .simple-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
}

/* .responsive-table: mobilde YATAY KAYDIRMA OLMADAN kart görünümüne döner. Her <td>'nin
   data-label="..." özniteliği, o hücrenin başlığını (örn. "Ad", "Durum") gösterir. */
@media (max-width: 700px) {
    .responsive-table { display: block; white-space: normal; overflow-x: visible; }
    .responsive-table tr { display: block; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
    .responsive-table tr:first-child { display: none; } /* başlık satırını (th) gizle, her hücre kendi etiketini gösterecek */
    .responsive-table td {
        display: flex; justify-content: space-between; align-items: center; gap: 8px;
        padding: 6px 10px; border-bottom: 1px solid var(--border); text-align: right;
        white-space: normal; font-size: 13px; min-height: 28px;
    }
    .responsive-table td:last-child { border-bottom: none; }
    .responsive-table td::before {
        content: attr(data-label); font-weight: 600; color: var(--muted); font-size: 11px;
        text-align: left; flex-shrink: 0;
    }
    /* İşlemler hücresi: butonlar tek satırda yan yana, küçük ve kompakt */
    .responsive-table td.actions-cell { flex-wrap: wrap; justify-content: flex-start; gap: 4px 10px; padding: 8px 10px; }
    .responsive-table td.actions-cell::before { width: 100%; margin-bottom: 2px; }
    .responsive-table .inline-form { display: inline-block; margin: 0; }
    .responsive-table td.actions-cell a,
    .responsive-table td.actions-cell .link-btn { font-size: 12.5px; padding: 3px 0; }
}
.status-pending { color: #a16207; font-weight: 600; }
.status-approved { color: #15803d; font-weight: 600; }
.status-rejected { color: #b91c1c; font-weight: 600; }
.unread-row { background: #fff8ec; font-weight: 600; }
.actions-cell a { margin-right: 10px; color: var(--primary); font-weight: 600; font-size: 13px; }
.danger-link { color: #b91c1c !important; }
.profile-section { margin-bottom: 30px; }

/* Footer (genişletilmiş) */
.site-footer { background: var(--primary-dark); color: #cfe6da; padding: 34px 16px 18px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-grid h4 { color: #fff; font-size: 15px; margin: 0 0 10px; }
.footer-desc { font-size: 13px; color: #a9c9b8; }
.footer-links { font-size: 13px; line-height: 2; }
.footer-links a { color: #cfe6da; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { text-align: center; font-size: 12px; padding-top: 14px; color: #a9c9b8; }
.logo-img { max-height: 38px; }

/* Popup Reklam - tam ekrana yakın, geri sayımlı "Reklamı Atla" tarzı */
.popup-ad-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.85);
    z-index: 999; align-items: center; justify-content: center; flex-direction: column;
}
.popup-ad-overlay.visible { display: flex; }
.popup-ad-topbar {
    width: 100%; max-width: 480px; display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: var(--accent); color: #1a1a1a; font-weight: 600; font-size: 14px;
}
.popup-ad-skip {
    background: #fff; border: none; padding: 8px 16px; border-radius: 6px; font-weight: 700;
    font-size: 13px; cursor: pointer; color: #1a1a1a;
}
.popup-ad-box {
    position: relative; background: #fff; width: 100%; max-width: 480px; max-height: 75vh;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}
/* Hangi oranda görsel yüklenirse yüklensin kutuyu düzgün doldurur, taşmaz/bozulmaz. */
.popup-ad-box img { width: 100%; height: 100%; max-height: 75vh; object-fit: cover; display: block; }
.popup-ad-box iframe { width: 100%; aspect-ratio: 16/9; border: none; }

/* Sabit (sticky) WhatsApp butonu */
.whatsapp-float {
    position: fixed; bottom: 20px; right: 20px; z-index: 500;
    width: 56px; height: 56px; border-radius: 50%; background: #25D366;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.whatsapp-float:hover { background: #1ebe5a; }

.not-found-box { text-align: center; padding: 60px 16px; }
.not-found-box h1 { font-size: 96px; color: var(--primary); margin: 0; line-height: 1; }
.not-found-text { color: var(--muted); font-size: 16px; margin: 16px 0 28px; }
.not-found-links { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.not-found-links a { width: auto; padding: 12px 24px; margin: 0; }

@media (max-width: 700px) {
    .footer-grid { grid-template-columns: 1fr; }
    .whatsapp-float { bottom: 16px; right: 16px; width: 50px; height: 50px; }
}

@media (max-width: 900px) {
    .page-grid { grid-template-columns: 1fr; }
    .page-sidebar { position: static; }
    .news-grid, .business-grid, .classified-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .main-nav {
        display: none; position: absolute; top: 62px; left: 0; right: 0;
        background: var(--primary); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 0;
        max-height: calc(100vh - 62px); overflow-y: auto;
    }
    .main-nav.open { display: flex; }
    .main-nav > a { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
    .nav-toggle { display: block; }
    .news-grid, .business-grid, .classified-grid { grid-template-columns: 1fr; }

    /* Mobilde Hizmetler dropdown'u akordeon gibi davranır */
    .nav-dropdown { border-bottom: 1px solid rgba(255,255,255,.12); }
    .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 12px 0; color: #eaf3ee; }
    .nav-dropdown-menu {
        display: none; position: static; margin: 0 0 8px; box-shadow: none; border-radius: 6px;
        background: rgba(255,255,255,.06);
    }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
    .nav-dropdown-menu a { color: #eaf3ee; padding: 10px 14px; }
    .nav-dropdown-menu a:hover { background: rgba(255,255,255,.08); color: var(--accent); }
    .nav-dropdown:hover .nav-dropdown-menu { display: none; } /* mobilde hover değil, tıklama ile açılır */
    .nav-dropdown.open:hover .nav-dropdown-menu { display: block; }
}
