/* ============================================================
   Ekonomik Döviz — Ana Stil Dosyası
   ============================================================ */

:root {
    --primary:       #15539e;
    --primary-dark:  #0e3d7a;
    --primary-light: #e8f0fc;
    --success:       #198754;
    --danger:        #dc3545;
    --warning:       #f59e0b;
    --bg:            #f5f7fa;
    --white:         #ffffff;
    --text:          #1e293b;
    --text-muted:    #64748b;
    --border:        #e2e8f0;
    --card-shadow:   0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.06);
    --radius:        10px;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 52px; /* ticker yüksekliği */
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ============================================================
   NAVBAR
   ============================================================ */
#mainNav {
    background: var(--white);
    border-bottom: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(21,83,158,.10);
    z-index: 1040;
}

/* Logo */
.logo-icon {
    width: 40px; height: 40px;
    background: var(--primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    font-size: 18px;
    flex-shrink: 0;
}
.logo-icon-sm {
    width: 32px; height: 32px;
    font-size: 14px;
    border-radius: 6px;
}
.logo-text {
    font-size: 1.15rem;
    color: var(--primary);
    letter-spacing: -.2px;
}
.logo-text strong { color: var(--primary-dark); }
.footer-brand {
    font-size: 1rem;
    color: var(--primary);
}
.footer-brand strong { color: var(--primary-dark); }

/* Nav links */
.navbar-nav .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: .5rem .8rem;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: var(--primary-light);
    color: var(--primary) !important;
}
.navbar-toggler { border-color: var(--primary); }
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%2315539e' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 56px 0 48px;
}
.hero h1 { font-size: 2rem; font-weight: 700; }
.hero p  { opacity: .88; font-size: 1.05rem; }
.hero .badge-source {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: .8rem;
}
.hero .badge-source .dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}
.dot-live { background: #4ade80; }
.dot-tcmb { background: #93c5fd; }
@keyframes pulse {
    0%,100% { opacity: 1; }
    50%      { opacity: .4; }
}

/* ============================================================
   KART / GENEL
   ============================================================ */
.card-custom {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
}
.card-custom .card-header-custom {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.card-custom .card-header-custom h5 {
    margin: 0; font-size: .95rem; font-weight: 700; color: var(--text);
}

/* ============================================================
   KUR TABLOSU
   ============================================================ */
.rates-table {
    width: 100%;
    border-collapse: collapse;
}
.rates-table thead th {
    background: var(--primary);
    color: var(--white);
    padding: 12px 14px;
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
}
.rates-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.rates-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.rates-table tbody tr {
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background .15s;
}
.rates-table tbody tr:last-child { border-bottom: none; }
.rates-table tbody tr:hover { background: var(--primary-light); }
.rates-table tbody td {
    padding: 11px 14px;
    font-size: .92rem;
}
.rates-table .code-cell {
    font-weight: 700;
    color: var(--primary);
    font-size: .88rem;
    white-space: nowrap;
}
.rates-table .desc-cell {
    color: var(--text-muted);
    font-size: .85rem;
}
.rates-table .bid-cell,
.rates-table .ask-cell {
    font-weight: 600;
    font-family: 'Courier New', monospace;
    font-size: .9rem;
    white-space: nowrap;
}
.rates-table .bid-cell { color: var(--success); }
.rates-table .ask-cell { color: var(--danger); }

/* Direction arrows */
.dir { font-size: .8rem; font-weight: 700; }
.dir.up   { color: var(--success); }
.dir.down { color: var(--danger); }
.dir.same { color: var(--text-muted); }

/* Flash animations */
@keyframes flashUp {
    0%   { background-color: transparent; }
    30%  { background-color: rgba(25, 135, 84, .18); }
    100% { background-color: transparent; }
}
@keyframes flashDown {
    0%   { background-color: transparent; }
    30%  { background-color: rgba(220, 53, 69, .18); }
    100% { background-color: transparent; }
}
.flash-up   { animation: flashUp   1.2s ease; }
.flash-down { animation: flashDown 1.2s ease; }

/* Kategori başlığı (tablo içi grup) */
.rates-table .category-row td {
    background: #f1f5fb;
    color: var(--primary);
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 7px 14px;
    cursor: default;
}
.rates-table .category-row:hover { background: #f1f5fb; }

/* ============================================================
   KUR DETAY SAYFASI
   ============================================================ */
.detail-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 36px 0 32px;
}
.detail-hero .rate-code  { font-size: 1rem; opacity: .8; }
.detail-hero .rate-desc  { font-size: 1.6rem; font-weight: 700; }
.detail-hero .bid-big    { font-size: 2.2rem; font-weight: 800; font-family: monospace; }
.detail-hero .ask-big    { font-size: 1.3rem; font-weight: 600; font-family: monospace; opacity: .85; }
.detail-hero .rate-meta  { font-size: .82rem; opacity: .7; }
.detail-hero .text-success { color: #4ade80 !important; }
.detail-hero .text-danger  { color: #f87171 !important; }
.detail-hero .text-muted   { color: rgba(255,255,255,.6) !important; }

.bid-label, .ask-label {
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    opacity: .7;
    display: block;
}

/* Hesaplama kutusu */
.calc-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    padding: 24px;
}
.calc-box h2 { font-weight: 700; color: var(--primary); margin-bottom: 1.2rem; }
.calc-result {
    background: var(--primary-light);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    display: none;
}
.calc-result .result-amount {
    font-size: 2rem; font-weight: 800;
    color: var(--primary); font-family: monospace;
}
.calc-result .result-label { font-size: .85rem; color: var(--text-muted); }

/* Form */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(21,83,158,.2);
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 42px;
    background: var(--primary);
    display: flex;
    align-items: center;
    z-index: 1030;
    overflow: hidden;
}
.ticker-label {
    background: var(--primary-dark);
    color: var(--white);
    padding: 0 14px;
    height: 100%;
    display: flex; align-items: center;
    font-size: .78rem; font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .5px;
}
.ticker-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.ticker-content {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: tickerScroll 40s linear infinite;
    padding-left: 20px;
}
.ticker-content:hover { animation-play-state: paused; }
@keyframes tickerScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.ticker-item {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--white);
    font-size: .82rem; font-weight: 500;
    padding: 0 18px 0 0;
    border-right: 1px solid rgba(255,255,255,.2);
    margin-right: 18px;
}
.ticker-item .t-code  { font-weight: 700; }
.ticker-item .t-bid   { color: #86efac; }
.ticker-item .t-ask   { color: #fca5a5; }
.ticker-item .t-up    { color: #4ade80; font-size: .7rem; }
.ticker-item .t-down  { color: #f87171; font-size: .7rem; }
.ticker-loading { color: rgba(255,255,255,.6); font-size: .82rem; padding-left: 12px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 0 24px;
    margin-top: auto;
}
.site-footer .text-muted { color: #94a3b8 !important; }
.site-footer img{filter: brightness(0) invert(1);}
.footer-heading {
    color: var(--white);
    font-size: .85rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
    margin-bottom: .8rem;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: .35rem; }
.footer-links a {
    color: #94a3b8;
    font-size: .88rem;
    transition: color .2s;
}
.footer-links a:hover { color: var(--white); }
.footer-divider { border-color: #334155; margin: 1.5rem 0 1rem; }

/* ============================================================
   SAYFALAR (Kurumsal vb.)
   ============================================================ */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 48px 0;
    text-align: center;
}
.page-hero h1 { font-size: 2rem; font-weight: 700; }
.page-hero p  { opacity: .85; }

.feature-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    padding: 28px 24px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(21,83,158,.15);
}
.feature-card .icon-wrap {
    width: 56px; height: 56px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary);
    font-size: 1.4rem;
}
.feature-card h5 { font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.feature-card p  { color: var(--text-muted); font-size: .9rem; margin: 0; }

.value-card {
    border-left: 4px solid var(--primary);
    padding: 20px;
    background: var(--white);
    border-radius: 0 var(--radius) var(--radius) 0;
    box-shadow: var(--card-shadow);
}
.value-card h5 { color: var(--primary); font-weight: 700; }

/* İletişim formu */
.contact-form-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 32px;
}
.contact-info-item {
    display: flex; align-items: flex-start; gap: 14px;
    margin-bottom: 1.2rem;
}
.contact-info-item .ci-icon {
    width: 42px; height: 42px;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

/* Haberler */
.news-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform .2s;
}
.news-card:hover { transform: translateY(-3px); }
.news-card-img {
    width: 100%; height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), #dbeafe);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-size: 2rem;
}
.news-card-body { padding: 18px; }
.news-card-body h5 { font-size: .95rem; font-weight: 700; line-height: 1.4; }
.news-card-body p  { font-size: .85rem; color: var(--text-muted); }
.news-meta { font-size: .78rem; color: var(--text-muted); }

/* ============================================================
   YARDIMCI
   ============================================================ */
.section { padding: 60px 0; }
.section-title {
    font-size: 1.6rem; font-weight: 800;
    color: var(--text); margin-bottom: .5rem;
}
.section-title span { color: var(--primary); }
.section-subtitle { color: var(--text-muted); font-size: .95rem; }
.divider-blue {
    width: 48px; height: 4px;
    background: var(--primary);
    border-radius: 2px;
    margin: .75rem 0 1.5rem;
}

/* Kaynak badge */
.source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.source-ws   { background: #dcfce7; color: #166534; }
.source-tcmb { background: #dbeafe; color: #1e40af; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1          { font-size: 1.5rem; }
    .rates-table td, .rates-table th { padding: 9px 10px; }
    .detail-hero .bid-big { font-size: 1.7rem; }
    .section { padding: 40px 0; }
}
