/*
Theme Name: Haber Bilim
Theme URI: https://haberbilim.com
Author: Antigravity AI
Author URI: https://haberbilim.com
Description: Haber Bilim - Güncel Bilim, Teknoloji ve Gelecek Haberleri Portalı Resmi Teması. Google News, Geo SEO ve bbPress tam uyumlu, ultra hızlı ve modern yayıncılık mimarisi.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: haberbilim
*/

:root {
    --hb-bg: #080c14;
    --hb-surface: #0f172a;
    --hb-surface-card: #131d33;
    --hb-surface-hover: #1e293b;
    --hb-border: #1e293b;
    --hb-border-light: #334155;
    
    --hb-primary: #06b6d4; /* Electric Cyan */
    --hb-primary-dark: #0891b2;
    --hb-accent: #0284c7;  /* Quantum Blue */
    --hb-accent-glow: rgba(6, 182, 212, 0.25);
    
    --hb-text: #f8fafc;
    --hb-text-muted: #94a3b8;
    --hb-text-dim: #64748b;
    
    --hb-font: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --hb-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    
    --hb-radius: 8px;
    --hb-radius-lg: 12px;
    --hb-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --hb-container: 1240px;
}

/* Light Theme Variables */
body.hb-light {
    --hb-bg: #f8fafc;
    --hb-surface: #ffffff;
    --hb-surface-card: #ffffff;
    --hb-surface-hover: #f1f5f9;
    --hb-border: #e2e8f0;
    --hb-border-light: #cbd5e1;
    --hb-text: #0f172a;
    --hb-text-muted: #475569;
    --hb-text-dim: #94a3b8;
    --hb-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--hb-bg);
    color: var(--hb-text);
    font-family: var(--hb-font);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease, opacity 0.2s ease;
}

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

.hb-container {
    width: 100%;
    max-width: var(--hb-container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.hb-header {
    background: var(--hb-surface);
    border-bottom: 1px solid var(--hb-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hb-topbar {
    background: #04060a;
    border-bottom: 1px solid #131b2c;
    padding: 6px 0;
    font-size: 12px;
    color: var(--hb-text-muted);
}

.hb-topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hb-ticker {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.hb-ticker-badge {
    background: var(--hb-primary);
    color: #04060a;
    padding: 2px 8px;
    font-weight: 800;
    font-size: 10px;
    letter-spacing: 0.5px;
    border-radius: 4px;
    text-transform: uppercase;
}

.hb-ticker-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 600px;
}

.hb-header-main {
    padding: 14px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hb-logo-link {
    display: flex;
    align-items: center;
}

.hb-logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

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

.hb-nav-link {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
    color: var(--hb-text);
    padding: 6px 0;
    position: relative;
}

.hb-nav-link:hover, .hb-nav-link.active {
    color: var(--hb-primary);
}

.hb-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--hb-primary);
}

.hb-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hb-theme-toggle {
    background: var(--hb-surface-hover);
    border: 1px solid var(--hb-border);
    color: var(--hb-text);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.hb-theme-toggle:hover {
    border-color: var(--hb-primary);
    color: var(--hb-primary);
}

/* Hero Grid (Science Vitrin) */
.hb-hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.hb-main-hero {
    position: relative;
    border-radius: var(--hb-radius-lg);
    overflow: hidden;
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    min-height: 460px;
    display: flex;
    box-shadow: var(--hb-shadow);
}

.hb-main-hero a {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    position: relative;
}

.hb-main-hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hb-main-hero:hover img {
    transform: scale(1.03);
}

.hb-hero-overlay {
    position: relative;
    z-index: 2;
    padding: 32px;
    background: linear-gradient(180deg, rgba(8, 12, 20, 0) 0%, rgba(8, 12, 20, 0.95) 80%);
}

.hb-cat-badge {
    display: inline-block;
    background: var(--hb-primary);
    color: #04060a;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.hb-hero-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
    color: #ffffff;
}

.hb-hero-excerpt {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
    max-width: 90%;
}

.hb-side-headlines {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hb-side-card {
    display: flex;
    gap: 14px;
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    padding: 12px;
    transition: transform 0.2s, border-color 0.2s;
    height: 100%;
}

.hb-side-card:hover {
    transform: translateY(-2px);
    border-color: var(--hb-border-light);
}

.hb-side-thumb {
    width: 110px;
    height: 85px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.hb-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hb-side-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hb-side-title {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
    color: var(--hb-text);
}

.hb-meta-info {
    font-size: 11px;
    color: var(--hb-text-dim);
}

/* Surmanset 1-12 Bar */
.hb-surmanset {
    margin-top: 28px;
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    padding: 16px;
}

.hb-surmanset-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hb-border);
}

.hb-surmanset-title {
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--hb-primary);
    letter-spacing: 0.5px;
}

.hb-surmanset-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.hb-surmanset-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    background: var(--hb-surface-card);
    border: 1px solid var(--hb-border);
    transition: all 0.2s;
}

.hb-surmanset-item:hover {
    background: var(--hb-surface-hover);
    border-color: var(--hb-primary);
}

.hb-surmanset-num {
    font-family: var(--hb-font-mono);
    font-size: 14px;
    font-weight: 900;
    color: var(--hb-primary);
    background: rgba(6, 182, 212, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1;
}

.hb-surmanset-text {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--hb-text);
}

/* Main Layout & Feed */
.hb-layout-split {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    margin-top: 36px;
}

.hb-feed-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.hb-news-card {
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.hb-news-card:hover {
    transform: translateY(-3px);
    border-color: var(--hb-primary);
    box-shadow: 0 6px 20px var(--hb-accent-glow);
}

.hb-news-card-img {
    height: 190px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.hb-news-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hb-news-card:hover .hb-news-card-img img {
    transform: scale(1.05);
}

.hb-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hb-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--hb-text);
}

.hb-card-excerpt {
    font-size: 13px;
    color: var(--hb-text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
    flex-grow: 1;
}

.hb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--hb-text-dim);
    padding-top: 10px;
    border-top: 1px solid var(--hb-border);
}

/* Sidebar Widgets */
.hb-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hb-widget {
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    padding: 20px;
}

.hb-widget-title {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hb-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hb-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hb-forum-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hb-forum-item {
    display: flex;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--hb-border);
}

.hb-forum-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.hb-forum-icon {
    color: var(--hb-primary);
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.hb-forum-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--hb-text);
}

.hb-forum-title:hover {
    color: var(--hb-primary);
}

/* Single Article Styling */
.hb-single-article {
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius-lg);
    padding: 36px;
    margin-top: 28px;
    max-width: 880px;
    margin-left: auto;
    margin-right: auto;
}

.hb-single-header {
    margin-bottom: 24px;
}

.hb-single-title {
    font-size: 32px;
    font-weight: 900;
    line-height: 1.25;
    color: var(--hb-text);
    margin-bottom: 16px;
}

.hb-single-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--hb-text-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hb-border);
}

.hb-single-featured {
    border-radius: var(--hb-radius);
    overflow: hidden;
    margin-bottom: 28px;
}

.hb-single-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--hb-text);
}

.hb-single-content p {
    margin-bottom: 20px;
}

.hb-single-content h2, .hb-single-content h3 {
    margin: 32px 0 16px;
    font-weight: 800;
    color: var(--hb-primary);
}

.hb-single-content ul, .hb-single-content ol {
    margin: 16px 0 24px 24px;
}

.hb-single-content li {
    margin-bottom: 8px;
}

.hb-single-content blockquote {
    border-left: 4px solid var(--hb-primary);
    padding: 12px 20px;
    background: var(--hb-surface-hover);
    margin: 24px 0;
    font-style: italic;
    border-radius: 0 var(--hb-radius) var(--hb-radius) 0;
}

/* bbPress Forum Overrides */
#bbpress-forums {
    background: var(--hb-surface);
    border: 1px solid var(--hb-border);
    border-radius: var(--hb-radius);
    padding: 24px;
    color: var(--hb-text);
}

#bbpress-forums li.bbp-header {
    background: var(--hb-surface-card);
    border-color: var(--hb-border);
    color: var(--hb-primary);
    font-weight: 700;
}

#bbpress-forums li.bbp-body ul.forum, #bbpress-forums li.bbp-body ul.topic {
    border-color: var(--hb-border);
}

#bbpress-forums a.bbp-forum-title, #bbpress-forums a.bbp-topic-permalink {
    font-size: 15px;
    font-weight: 700;
    color: var(--hb-text);
}

#bbpress-forums a.bbp-forum-title:hover, #bbpress-forums a.bbp-topic-permalink:hover {
    color: var(--hb-primary);
}

/* Footer */
.hb-footer {
    background: #04060a;
    border-top: 1px solid var(--hb-border);
    margin-top: 60px;
    padding: 48px 0 24px;
    color: var(--hb-text-muted);
}

.hb-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 36px;
}

.hb-footer-brand p {
    font-size: 13px;
    line-height: 1.6;
    margin-top: 12px;
}

.hb-footer-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--hb-text);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.hb-footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}

.hb-footer-links a:hover {
    color: var(--hb-primary);
}

.hb-footer-bottom {
    padding-top: 24px;
    border-top: 1px solid #131b2c;
    text-align: center;
    font-size: 12px;
    color: var(--hb-text-dim);
}

/* Responsive */
@media (max-width: 992px) {
    .hb-hero-grid, .hb-layout-split {
        grid-template-columns: 1fr;
    }
    .hb-surmanset-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hb-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .hb-feed-grid, .hb-surmanset-grid {
        grid-template-columns: 1fr;
    }
    .hb-footer-grid {
        grid-template-columns: 1fr;
    }
    .hb-hero-title {
        font-size: 20px;
    }
    .hb-single-article {
        padding: 20px;
    }
}
