/*
  Custom utilities (Tailwind esintili) + tema değişkenleri
  - Renk paleti, ışık/karanlık tema
  - Spacing, grid, display, radius, shadow
*/

:root {
  --bg: #ffffff;
  --surface: #f8f9fb;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #6c5ce7;
  --primary-600: #5b4de0;
  --success: #22c55e;
  --info: #0ea5e9;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #e5e7eb;
}

.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.breadcrumb a:focus-visible { outline: 2px solid color-mix(in oklab, var(--primary) 60%, transparent); outline-offset: 2px; border-radius: 4px; }

html[data-theme="dark"] {
  --bg: #0b1220;
  --surface: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #8b7bff;
  --primary-600: #7b6ef6;
  --success: #22c55e;
  --info: #38bdf8;
  --warning: #fbbf24;
  --danger: #f87171;
  --border: #1f2a44;
}

/* Base */
.font-inter { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji', sans-serif; }
.bg-surface { background: var(--surface); }
.bg-body-blur { backdrop-filter: saturate(120%) blur(6px); background: color-mix(in oklab, var(--surface) 80%, transparent); }
html[data-theme="dark"] .bg-body-blur { background: color-mix(in oklab, var(--surface) 92%, transparent); }
.bg-gradient-subtle { background: linear-gradient(180deg, color-mix(in oklab, var(--primary) 3%, transparent), transparent 40%); }
.bg-gradient-subtle, .bg-muted-subtle { color: var(--text); }
.bg-checker { background: repeating-linear-gradient(45deg, rgba(0,0,0,.07) 0 8px, transparent 8px 16px); }
.text-main { color: var(--text); }
.text-muted { color: var(--muted) !important; }
.card h1, .card h2, .card h3, .card h4, .card h5, .card h6,
section h1, section h2, section h3, section h4, section h5, section h6 { color: var(--text); }
.link-underline { text-decoration: none; }
.link-underline:hover { text-decoration: underline; }

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {font-weight: 700;}
.table>:not(caption)>*>* {background-color: inherit !important;}

.form-check-input:checked {background-color:var(--primary);border-color:var(--primary);}
.form-check-input {width:1.1rem;height:1.1rem;}
.form-check-input:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(108, 92, 231, .25);
}

/* Borders and subtle backgrounds mapped to Bootstrap tokens */
.border-top { border-top: 1px solid var(--border) !important; }
.border-bottom { border-bottom: 1px solid var(--border) !important; }
.bg-muted-subtle { background: color-mix(in oklab, var(--surface) 90%, var(--text) 2%); }
.bg-darker {background: color-mix(in oklab, transparent, var(--text) 3%); }
.bg-primary-subtle { background: color-mix(in oklab, var(--primary) 14%, var(--surface) 86%) !important; }
.bg-success-subtle { background: color-mix(in oklab, var(--success) 14%, var(--surface) 86%) !important; }
.bg-info-subtle { background: color-mix(in oklab, var(--info) 14%, var(--surface) 86%) !important; }
.bg-warning-subtle { background: color-mix(in oklab, var(--warning) 14%, var(--surface) 86%) !important; }
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-info { color: var(--info) !important; }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger) !important; }

/* Spacing (subset) */
:root { --sp-1: .25rem; --sp-2: .5rem; --sp-3: .75rem; --sp-4: 1rem; --sp-5: 1.5rem; --sp-6: 2rem; --sp-8: 3rem; }
.p-4 { padding: var(--sp-4) !important; }
.py-5 { padding-top: var(--sp-5) !important; padding-bottom: var(--sp-5) !important; }
.py-6 { padding-top: var(--sp-6) !important; padding-bottom: var(--sp-6) !important; }
.py-8 { padding-top: var(--sp-8) !important; padding-bottom: var(--sp-8) !important; }
.mt-4 { margin-top: var(--sp-4) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: .75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.gap-1 { gap: var(--sp-2) !important; }
.gap-2 { gap: var(--sp-3) !important; }
.gap-3 { gap: var(--sp-4) !important; }
.gap-4 { gap: var(--sp-5) !important; }
.gap-5 { gap: var(--sp-6) !important; }

/* Grid utilities */
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.d-grid { display: grid !important; }
.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }

/* Responsive helpers */
@media (min-width: 768px) {
  .grid-cols-md-3 { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .grid-cols-lg-2 { grid-template-columns: repeat(2, 1fr); }
}

/* Cards */
.rounded { border-radius: .5rem; }
.shadow-soft { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.02); }
.hover-lift { transition: transform .2s ease, box-shadow .2s ease; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 0, 0, 0.05); }
.border-0 { border: 0 !important; }

/* Typography */
.lh-tight { line-height: 1.15; }
.small { font-size: .875rem; }

/* Navbar shadow on scroll */
.shadow-nav { box-shadow: 0 0 0 1px var(--border), 0 6px 18px rgba(0,0,0,.08); }
.transition-all { transition: all .2s ease; }

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary-600); }
.btn-primary:hover { background: var(--primary-600) !important; border-color: var(--primary-600); }
.btn-primary:disabled, .btn-primary.disabled { background: var(--primary-600) !important; border-color: var(--primary-600); }

.btn-outline-primary {border-color: var(--primary-600); color: var(--primary-600);}
.btn-outline-primary:hover {color: #fff !important; border-color: var(--border); !important;background: var(--primary-600) !important; border-color: var(--primary-600);}
.btn-outline-primary:disabled, .btn-outline-primary.disabled {color: #fff !important; border-color: var(--border); !important;background: var(--primary-600) !important; border-color: var(--primary-600);}

.btn-outline-secondary { color: color-mix(in oklab, var(--text) 88%, var(--muted) 12%); border-color: var(--border); }
.btn-outline-secondary:hover { color: var(--primary) !important; border-color: var(--primary-600); background: color-mix(in oklab, var(--primary) 10%, var(--surface) 90%) !important; }

/* Badges (subtle) text colors respect theme vars */
.badge.text-primary { color: var(--primary) !important; }
.badge.text-success { color: var(--success) !important; }
.badge.text-info { color: var(--info) !important; }
.badge.text-warning { color: var(--warning) !important; }

/* Container width tweaks */
.container-xl { max-width: 1200px; }

/* Fix Bootstrap body bg in dark */
body {
  background: var(--surface);
  color: var(--text);
}

/* Navbar link contrast */
.navbar .nav-link { color: color-mix(in oklab, var(--text) 92%, var(--muted) 8%) !important; }
.navbar .nav-link:hover { color: var(--primary) !important; }
.navbar .btn-outline-secondary { --bs-btn-color: inherit; --bs-btn-border-color: var(--border); }

/* Ratio placeholder corners */
.ratio { background-color: color-mix(in oklab, var(--surface) 88%, var(--text) 2%); }

/* Ticker */
.ticker { position: static; top: auto; z-index: auto; padding: .7rem 0;}
.ticker-viewport { overflow: hidden; mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%); }
.ticker-track { display: inline-flex; gap: 2rem; white-space: nowrap; will-change: transform; animation: ticker-scroll 28s linear infinite; }
.ticker-item { color: var(--text); opacity: .92; text-decoration: none; }
.html[data-theme="dark"] .ticker-item, html[data-theme="dark"] .ticker-item { opacity: 1; }
.ticker-item:hover { text-decoration: underline; }

/* Ticker accent background to reduce whiteness */
.ticker-accent {
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--primary) 30%, var(--surface) 70%),
    color-mix(in oklab, var(--primary) 15%, var(--surface) 85%)
  );
}
.ticker-accent .ticker-item { color: color-mix(in oklab, var(--text) 92%, #000 8%); }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}

/* Kategoriler ikonları */
.cat-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: .75rem; font-size: 1.25rem; }

/* Newsletter card */
.newsletter-card { border: 1px solid var(--border); border-radius: 1rem; background: color-mix(in oklab, var(--surface) 96%, var(--text) 4%); }
.newsletter-bullets li { display: flex; gap: .5rem; align-items: flex-start; }
.newsletter-bullets i { margin-top: .2rem; }

/* Footer bottom bar */
.footer-bottom { background: color-mix(in oklab, var(--surface) 94%, var(--text) 6%); border-top: 1px solid var(--border); padding: .75rem 0; }

/* Newsletter responsive grid */
.newsletter-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) {
  .newsletter-grid { grid-template-columns: 1.2fr .8fr; }
}

/* Sidebar & footer links */
.sidebar-links a,
footer a,
.footer-bottom a {
  color: inherit;
  text-decoration: none;
  transition: color .15s ease, text-decoration-color .15s ease;
}

/* Card links inherit color for readability */
.card a:not(.btn) { color: inherit; }
.card a:not(.btn):hover { color: var(--primary); }

.sidebar-links a:hover,
footer a:hover,
.footer-bottom a:hover {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-links a:focus-visible,
footer a:focus-visible,
.footer-bottom a:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--primary) 60%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Reading progress bar */
#readingProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--primary-600));
  z-index: 1031; /* above navbar (1020s) */
  box-shadow: 0 1px 0 rgba(0,0,0,.05);
}

/* ToC sticky and list styles */
.toc-sticky { position: sticky; top: 80px; }
.toc-list { list-style: none; padding-left: 0; margin: 0; }
.toc-list li { margin: .25rem 0; }
.toc-list a { color: inherit; text-decoration: none; }
.toc-list a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* Helper for cover images */
.of-cover { object-fit: cover; }

/* Post content typography */
.post-content p { font-size: .98rem; line-height: 1.7; color: var(--text); }
.post-content .lead { font-size: 1.05rem; line-height: 1.75; color: color-mix(in oklab, var(--text) 92%, var(--muted) 8%); }
.post-content h1 { font-size: 1.6rem; line-height: 1.25; }
.post-content h2 { font-size: 1.4rem; line-height: 1.4; }
.post-content h3 { font-size: 1.35rem; line-height: 1.35; }
.post-content h4 { font-size: 1.25rem; line-height: 1.25; }
.post-content h5 { font-size: 1.15rem; line-height: 1.15; }
.post-content ul, .post-content ol { padding-left: 1.25rem; }
.post-content li { margin: .35rem 0; }
.post-content blockquote { font-size: .95rem; }

@media (min-width: 992px) {
  .post-content p { font-size: 1rem; }
  .post-content .lead { font-size: 1.1rem; }
  .post-content h1 { font-size: 1.8rem; }
  .post-content h2 { font-size: 1.4rem; }
}

/* Pagination modern */
.pagination {
  display: flex;
  justify-content: center;
  gap:4px;
}
.pagination .page-link {
  border-radius: 999px !important;
  border: 1px solid var(--border);
  color: inherit;
}
.pagination .page-item.active .page-link {
  background: var(--primary);
  border-color: var(--primary-600);
  color: #fff;
}
.pagination .page-link:hover {
  background: color-mix(in oklab, var(--primary) 8%, var(--surface) 92%);
  color: var(--primary);
}
nav#pagination .mt-4.mb-3 {font-size:14px;color:var(--muted);}

/* Small helpers */
.w-fit { width: fit-content; }

/* Footer dark variant */
.footer-dark { background: #0b1220; color: #e5e7eb; border-top: 1px solid #1f2a44; }
.footer-dark a { color: inherit; text-decoration: none; }
.footer-dark a:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* Header dark variant */
.header-dark { background: #0b1220; border-bottom: 1px solid #1f2a44; }
.header-dark .navbar-brand span { color: #e5e7eb; }
.header-dark .nav-link { color: color-mix(in oklab, #e5e7eb 92%, #94a3b8 8%) !important; }
.header-dark .nav-link:hover { color: var(--primary) !important; }
.header-dark .btn-outline-secondary { color: #e5e7eb; border-color: #1f2a44; }
.header-dark .btn-outline-secondary:hover { color: var(--primary); border-color: var(--primary-600); background: color-mix(in oklab, var(--primary) 10%, #0b1220 90%); }

/* Line clamp utilities */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-clamp: 2; }

/* Component backgrounds and borders (unify for both themes, esp. dark) */
.card, .dropdown-menu, .offcanvas, .modal-content {
  background-color: color-mix(in oklab, var(--surface) 98%, var(--bg) 2%) !important;
  border-color: var(--border) !important;
}

article.card, .mega-popular .card {overflow:hidden;}

.dropdown-menu {
  border: 1px solid var(--bs-border-color);
  border-radius:0;
}


.border, .form-control, .input-group-text, .list-group-item, .accordion-item, .accordion-button, .pagination .page-link {
  border-color: var(--border) !important;
}
.accordion-button:not(.collapsed) {
  background-color: color-mix(in oklab, var(--surface) 96%, var(--text) 4%);
}
.form-control, .input-group-text {
  color: var(--text);
}
.form-control:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 .2rem color-mix(in oklab, var(--primary) 25%, transparent);
}

/* Breadcrumb custom */
.breadcrumb {display: inline-flex;align-items: center;gap: .1rem;font-size:15px;}

/* Modal link normalization */
.modal .btn-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
.modal .btn-link:hover { color: var(--primary); }
.modal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.modal a:hover { color: var(--primary); }

/* Profile helpers */
.avatar-64 { width: 64px; height: 64px; border-radius: 999px; object-fit: cover; }
.avatar-ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }

.grid-profile { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); align-items: start; }

.profile-nav { gap: .75rem; }
.profile-nav .nav-link { border: none; padding: 0; }

.profile-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1rem;
  border-radius: 1rem;
  border: 1px solid color-mix(in oklab, var(--border) 88%, transparent 12%);
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.profile-link:hover {
  transform: translateY(-2px);
  border-color: color-mix(in oklab, var(--primary) 40%, transparent);
}

.profile-link.active {
  border-color: color-mix(in oklab, var(--primary) 45%, transparent);
}

.profile-link.active .profile-link-icon {
  background: color-mix(in oklab, var(--primary) 60%, var(--surface) 40%);
  color: #fff;
}

.profile-link-icon {
  width: 42px;
  height: 42px;
  display: flex;
  place-items: center;
  border-radius: 14px;
  background: color-mix(in oklab, var(--primary) 18%, var(--surface) 82%);
  color: var(--primary);
  font-size: 1.05rem;
  line-height: 1.05rem;
  align-items: center;
  justify-content: center;
}

.profile-link-text { flex: 1; display: grid; gap: .1rem; text-align: left; }
.profile-link-title { font-weight: 600; }
.profile-link-sub { font-size: .8rem; color: var(--muted); }

.profile-link > i.bi-chevron-right { color: var(--muted); font-size: .85rem; transition: transform .2s ease; }
.profile-link:hover > i.bi-chevron-right { transform: translateX(3px); }

.profile-content .card { background-color: color-mix(in oklab, var(--surface) 50%, #fff 50%) !important;}

.card,.alert {border-radius:.6rem;}

@media (max-width: 991.98px) {
  .grid-profile {display: flex; flex-direction: column;}
  .profile-link:hover {
    transform: none !important;
  }
  .profile-link:hover > i.bi-chevron-right { transform: none !important; }
}

@media (max-width: 991.98px) {
  .profile-nav { flex-direction: row; overflow-x: auto; padding-bottom: .25rem; }
}

/* Referral banner */
.ref-banner { 
  border: 1px solid var(--border); 
  border-radius: 1rem; 
  padding: 1rem 1.25rem; 
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--primary) 10%, var(--surface) 90%),
    color-mix(in oklab, var(--primary) 6%, var(--surface) 94%) 60%,
    color-mix(in oklab, var(--primary) 2%, var(--surface) 98%)
  );
}
.ref-banner .ref-icon { 
  width: 40px; height: 40px; border-radius: 10px; 
  display: grid; place-items: center; 
  background: color-mix(in oklab, var(--primary) 18%, var(--surface) 82%);
  color: #fff;
}
.ref-banner .ref-text { line-height: 1.4; }
.ref-banner .ref-cta { white-space: nowrap; }
@media (max-width: 575.98px) {
  .ref-banner { padding: .75rem; }
}

/* Dark theme variant */
.html[data-theme="dark"] .ref-banner {
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--primary) 10%, #0b1220 90%),
    color-mix(in oklab, var(--primary) 6%, #0b1220 94%) 60%,
    color-mix(in oklab, var(--primary) 2%, #0b1220 98%)
  );
}
.html[data-theme="dark"] .ref-banner .ref-icon {
  background: color-mix(in oklab, var(--primary) 18%, #0b1220 82%);
}

@media (min-width: 992px) {
  .dropdown-hover:hover > .dropdown-menu,
  .dropdown-hover:focus-within > .dropdown-menu { display: block; }
  .dropdown-mega .dropdown-menu { width: 100%; left: 0; right: 0; top: 100%; z-index: 991;}
}

.mega-dropdown { border-top: 1px solid var(--border) !important; margin-top: 0 !important; }
.mega-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 992px) { .mega-grid { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; } }
.mega-popular { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
@media (min-width: 768px) { .mega-popular { grid-template-columns: repeat(5, 1fr); gap: 1.25rem; } }
.dropdown-link { color: inherit; text-decoration: none; }
.dropdown-link:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* Backdrop when mega menu is open */
.nav-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s ease; z-index: 990; }
.nav-backdrop.show { opacity: 1; visibility: visible; }

.offcanvas-body ul div {margin-bottom:}
.offcanvas-body ul {list-style-type:none;margin:0;padding:0;}
.offcanvas-body > ul > li {margin-bottom:1.45rem;}
.offcanvas-body ul li a {font-size:18px;}


.blog-list-2col { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 992px) { .blog-list-2col { grid-template-columns: 1fr 1fr; gap: 1.25rem; } }
.post-h { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; border: 1px solid var(--border); border-radius: var(--bs-border-radius); background: color-mix(in oklab, var(--surface) 98%, var(--text) 2%); overflow: hidden; }
@media (min-width: 1200px) { .post-h { grid-template-columns: 200px 1fr; } }
.post-h .thumb { width: 100%; height: 100%; background: color-mix(in oklab, var(--surface) 88%, var(--text) 2%); }
.post-h .body { padding: .75rem; display: grid; gap: .5rem; }

/* Post split layout: sticky left media, content right */
.post-split { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 992px) {
  .post-split { grid-template-columns: 1fr 1.2fr; }
  .post-split .sticky-media { position: sticky; top: 90px; }
}

.fs-11 {font-size:11px;}
.fs-12 {font-size:12px;}
.fs-13 {font-size:13px;}

.alt-pricing-badge {
  background: color-mix(in oklab, var(--primary) 12%, var(--surface) 88%) !important;
  color: var(--primary) !important;
  border: 1px solid color-mix(in oklab, var(--primary) 25%, transparent);
  font-weight: 600;
}

.alt-pricing-card {
  background: color-mix(in oklab, var(--surface) 96%, #ffffff 4%) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.alt-pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.alt-pricing-card-accent {
  border-color: color-mix(in oklab, var(--primary) 40%, transparent) !important;
  box-shadow: 0 18px 48px rgba(76, 29, 149, 0.18) !important;
  background: linear-gradient(135deg,
    color-mix(in oklab, var(--primary) 6%, #ffffff 94%),
    color-mix(in oklab, var(--primary-600) 8%, #ffffff 92%)
  ) !important;
}

.alt-pricing .badge.bg-primary-subtle {
  background: color-mix(in oklab, var(--primary) 16%, #ffffff 84%) !important;
}

.alt-pricing .btn-outline-primary {
  border-color: color-mix(in oklab, var(--primary) 35%, transparent);
  color: var(--primary-600);
}
.alt-pricing .btn-outline-primary:hover {
  background: color-mix(in oklab, var(--primary) 10%, #ffffff 90%);
}