/* ============================================
   canliborsa24.com - Ana Stil Dosyası
   Hızlı, hafif, mobil uyumlu
   ============================================ */

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #1a237e;
    --primary-light: #283593;
    --accent: #ff6f00;
    --success: #2e7d32;
    --danger: #c62828;
    --warning: #f9a825;
    --bg: #f5f5f5;
    --bg-card: #ffffff;
    --text: #212121;
    --text-light: #757575;
    --border: #e0e0e0;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 12px rgba(0,0,0,0.12);
    --radius: 8px;
    --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    --max-width: 1200px;
}

html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

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

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* Utility */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-muted { color: var(--text-light) !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }

/* ─── Top Bar ─── */
.top-bar {
    background: var(--primary);
    color: #fff;
    font-size: 0.8rem;
    padding: 6px 0;
    overflow: hidden;
}
.top-bar-content {
    display: flex;
    align-items: center;
    gap: 20px;
}
.top-bar-date {
    white-space: nowrap;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}
.top-bar-ticker {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}
.ticker-track {
    display: inline-block;
    animation: ticker 40s linear infinite;
}
.ticker-item { display: inline; }
.tick-up { color: #69f0ae; font-weight: 600; }
.tick-down { color: #ff8a80; font-weight: 600; }

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── Header ─── */
.site-header {
    background: #fff;
    border-bottom: 2px solid var(--primary);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 1.3rem;
}
.logo-icon { font-size: 1.6rem; }
.logo-text small { color: var(--accent); font-weight: 400; }
.logo:hover { color: var(--primary); }

.main-nav {
    display: flex;
    gap: 4px;
    align-items: center;
}
.nav-link {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: #fff;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: 0.3s;
}
.mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* ─── Layout ─── */
.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    padding: 24px 0;
}
.content-area { min-width: 0; }

/* ─── Cards & Sections ─── */
.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); }

.update-time {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: right;
    margin-bottom: 8px;
}
.update-time .pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    margin-right: 4px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ─── Tables ─── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}
.data-table thead {
    background: var(--primary);
    color: #fff;
}
.data-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.data-table tbody tr:hover { background: #f8f9ff; }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .col-name { font-weight: 600; }
.data-table .col-name a { color: var(--text); }
.data-table .col-name a:hover { color: var(--primary); }
.data-table .col-number { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .col-change {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ─── Summary Cards Grid ─── */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.summary-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all 0.2s;
}
.summary-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}
.summary-card.up { border-left-color: var(--success); }
.summary-card.down { border-left-color: var(--danger); }
.summary-card .sc-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 4px;
}
.summary-card .sc-value {
    font-size: 1.2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.summary-card .sc-change {
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 4px;
}

/* ─── Detail Page ─── */
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}
.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
}
.detail-change {
    font-size: 1.1rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
}
.detail-change.up { background: var(--success); }
.detail-change.down { background: var(--danger); }

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.detail-info-item {
    padding: 12px;
    background: var(--bg);
    border-radius: 6px;
}
.detail-info-item .dii-label {
    font-size: 0.78rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.detail-info-item .dii-value {
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 2px;
}

/* ─── Charts ─── */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 16px 0;
}

/* ─── Breadcrumb ─── */
.breadcrumb {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    padding: 8px 0;
}
.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    margin-right: 6px;
    color: var(--text-light);
}
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--text-light); }

/* ─── Sidebar ─── */
.sidebar {}
.widget {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-bottom: 16px;
}
.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border);
}
.widget-more {
    display: block;
    text-align: center;
    padding: 8px;
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    border-top: 1px solid var(--border);
}
.mini-table {
    width: 100%;
    font-size: 0.82rem;
    border-collapse: collapse;
}
.mini-table th {
    text-align: left;
    padding: 6px 4px;
    font-size: 0.75rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}
.mini-table td {
    padding: 6px 4px;
    border-bottom: 1px solid #f0f0f0;
}
.widget-post {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}
.widget-post:last-child { border-bottom: none; }
.widget-post a { font-size: 0.88rem; font-weight: 500; display: block; }
.widget-post small { display: block; margin-top: 2px; }

.sticky-ad { position: sticky; top: 80px; }

/* ─── Ad Slots ─── */
.ad-slot { padding: 8px 0; text-align: center; }
.ad-widget { min-height: 250px; display: flex; align-items: center; justify-content: center; }
.ad-content { padding: 16px 0; text-align: center; }

/* ─── Comments ─── */
.comment-section { margin-top: 30px; }
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    resize: vertical;
    min-height: 100px;
}
.comment-form input[type="text"],
.comment-form input[type="email"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.comment-form .btn-submit {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.comment-form .btn-submit:hover { background: var(--primary-light); }

.comment-list .comment-item {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}
.comment-item .ci-name { font-weight: 600; }
.comment-item .ci-date { font-size: 0.78rem; color: var(--text-light); }
.comment-item .ci-text { margin-top: 6px; font-size: 0.92rem; }

/* ─── Contact Form ─── */
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

/* ─── Footer ─── */
.site-footer {
    background: #1a1a2e;
    color: #ccc;
    padding: 40px 0 20px;
    margin-top: 40px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}
.footer-col h4 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 1rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: #aaa; font-size: 0.9rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: 0.88rem; line-height: 1.6; }

.footer-disclaimer {
    background: rgba(255,255,255,0.05);
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
}
.footer-disclaimer p { font-size: 0.82rem; line-height: 1.5; color: #999; }

.footer-bottom {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.82rem;
    color: #888;
}

/* ─── Responsive ─── */
@media (max-width: 968px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    .sidebar { order: 2; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }
    
    .mobile-toggle { display: flex; }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 12px;
        box-shadow: var(--shadow-hover);
        z-index: 999;
    }
    .main-nav.open { display: flex; }
    .nav-link { padding: 12px 16px; }
    
    .top-bar-date { display: none; }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-header { flex-direction: column; align-items: flex-start; }
    .detail-price { font-size: 1.6rem; }
    
    .data-table { font-size: 0.82rem; }
    .data-table th, .data-table td { padding: 8px 6px; }
    
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .summary-grid { grid-template-columns: 1fr; }
    .detail-info-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
}

/* ─── Print ─── */
@media print {
    .top-bar, .site-header, .sidebar, .site-footer, .ad-slot, .ad-widget { display: none !important; }
    .content-layout { grid-template-columns: 1fr; }
}

