/*
Theme Name: AllForex
Theme URI: https://allforex.site/
Author: AllForex Team
Author URI: https://allforex.site/
Description: A fast, SEO-friendly, mobile-first WordPress theme with Dark Mode and social media integration.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: asad-akash-turbo
Tags: blog, two-columns, custom-colors, custom-logo, custom-menu, dark-mode, rtl-language-support
*/

/* =====================================================
   AllForex — base tokens (fallbacks only; the real source
   of truth is the :root / [data-theme="dark"] block in
   header.php, loaded on every page). Keeping the same
   fallback values here means this file still looks right
   even previewed on its own.
===================================================== */
:root{
  --bg:          var(--af-bg, #ffffff);
  --bg-soft:     var(--af-bg-alt, #f3f5f8);
  --text:        var(--af-text, #171b24);
  --text-muted:  var(--af-text-dim, #6b7280);
  --card:        var(--af-bg, #ffffff);
  --border:      var(--af-line, #e6e9ef);
  --primary:     var(--af-gold, #c2900f);
  --primary-dark:var(--af-gold-2, #a67a0c);
  --accent:      var(--af-green, #1aa37a);
  --radius:      var(--af-radius, 16px);
  --radius-sm:   var(--af-radius-sm, 10px);
  --shadow-sm:   0 1px 2px rgba(16,24,40,.06);
  --shadow-md:   0 8px 24px rgba(16,24,40,.08);
  --shadow-lg:   0 20px 48px rgba(16,24,40,.16);
}
html[data-theme="dark"]{
  --shadow-sm:   0 1px 2px rgba(0,0,0,.35);
  --shadow-md:   0 10px 28px rgba(0,0,0,.45);
  --shadow-lg:   0 24px 56px rgba(0,0,0,.55);
}

/* ---------- Reset & base ---------- */
html{ box-sizing:border-box; scroll-behavior:smooth; }
*, *:before, *:after{ box-sizing:inherit; }
body{
  margin:0;
  background: var(--bg-soft);
  color: var(--text);
  font-family: var(--font-display, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; }
a{ color:inherit; text-decoration:none; }
a:hover{ color: var(--primary); }
.container{ max-width:1100px; margin:0 auto; padding:0 18px; }
::selection{ background: var(--primary); color:#fff; }

/* ---------- Layout wrappers ---------- */
.main{ padding:20px 0; }
.section{ padding:6px 0 40px; }
.content-grid{ display:grid; grid-template-columns:1fr; gap:22px; }
.content-layout{ display:grid; grid-template-columns:1fr; gap:22px; }
@media (min-width: 900px){
  .content-grid{ grid-template-columns:2fr 1fr; align-items:start; }
  .content-layout{ grid-template-columns:2fr 1fr; align-items:start; }
}
.primary-content{ min-width:0; }

.section-head{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; margin:4px 0 18px;
}
.section-head h2{
  display:flex; align-items:center; gap:10px;
  font-size:21px; font-weight:800; letter-spacing:-.01em; margin:0;
  color: var(--text);
}
.section-head h2::before{
  content:""; display:block; width:4px; height:22px; border-radius:3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}
.section-head a{
  font-family: var(--font-mono, monospace); font-size:13px; font-weight:700;
  color: var(--accent); white-space:nowrap;
}
.section-head a:hover{ text-decoration:underline; color: var(--primary); }
.page-title{ font-weight:800; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs{
  display:flex; flex-wrap:wrap; align-items:center; gap:6px;
  font-size:13px; color: var(--text-muted); margin: 4px 0 16px;
}
.breadcrumbs a{ color: var(--text-muted); }
.breadcrumbs a:hover{ color: var(--primary); }
.breadcrumbs .sep{ color: var(--border); }
.breadcrumbs .current{ color: var(--text); font-weight:600; }

/* ---------- Post grid (archive / search / blog index) ---------- */
.post-grid{
  display:grid; grid-template-columns:1fr; gap:18px;
}
@media (min-width:640px){ .post-grid{ grid-template-columns:repeat(2,1fr); } }

.post-card{
  display:flex; flex-direction:column;
  background: var(--card); border:1px solid var(--border); border-radius: var(--radius);
  overflow:hidden; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.post-card:hover{ transform:translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.post-card-thumb{ display:block; aspect-ratio:16/10; background: var(--bg-soft); overflow:hidden; }
.post-card-thumb img{ width:100%; height:100%; object-fit:cover; display:block; transition:transform .35s ease; }
.post-card:hover .post-card-thumb img{ transform:scale(1.05); }
.post-card-body{ padding:16px; display:flex; flex-direction:column; gap:8px; flex:1; }
.post-card-cat{
  align-self:flex-start; font-family: var(--font-mono, monospace); font-size:10.5px; font-weight:700;
  letter-spacing:.06em; text-transform:uppercase; color:#fff;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  padding:3px 9px; border-radius:999px;
}
.post-card-title{ margin:2px 0 0; font-size:16.5px; font-weight:800; line-height:1.35; }
.post-card-title a{ color: var(--text); }
.post-card-title a:hover{ color: var(--primary); }
.post-card-more{
  margin-top:auto; align-self:flex-start; font-size:13px; font-weight:700; color: var(--accent);
  display:inline-flex; align-items:center; gap:5px;
}
.post-card-more::after{ content:"→"; transition:transform .18s ease; }
.post-card-more:hover::after{ transform:translateX(3px); }

.post-list-empty{
  text-align:center; padding:40px 20px; color: var(--text-muted);
  border:1px dashed var(--border); border-radius: var(--radius);
}

/* Legacy horizontal post-item (kept for any surviving widget markup) */
.post-list{ display:grid; gap:12px; }
.post-item{
  display:grid; grid-template-columns:106px 1fr; gap:12px; padding:10px;
  border:1px solid var(--border); border-radius: var(--radius-sm); background: var(--card);
}
.post-thumb{ width:106px; height:80px; border-radius:8px; object-fit:cover; background: var(--bg-soft); border:1px solid var(--border); }
.post-info{ display:flex; flex-direction:column; gap:6px; }
.post-title{ font-size:16px; margin:0; font-weight:800; }
.post-title a{ color: var(--text); }
.post-title a:hover{ color: var(--primary); }
.post-excerpt{ margin:0; color: var(--text-muted); font-size:13px; }
.post-meta{ display:flex; gap:10px; color: var(--text-muted); font-size:12px; }
@media (min-width:600px){ .post-item{ grid-template-columns:160px 1fr; } .post-thumb{ width:160px; height:100px; } }

/* ---------- Buttons / forms ---------- */
.btn, .button, button, input[type=submit]{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color:#fff !important; border:none; padding:11px 22px; border-radius:999px;
  font-weight:700; font-size:14px; cursor:pointer; text-decoration:none !important;
  box-shadow: 0 6px 16px rgba(194,144,15,.25);
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
.btn:hover, .button:hover, button:hover, input[type=submit]:hover{
  transform: translateY(-1px); box-shadow: 0 10px 22px rgba(194,144,15,.32); color:#fff !important;
}
.btn:disabled, button:disabled{ opacity:.6; cursor:default; transform:none; }
.btn-outline{
  background:none; box-shadow:none; color: var(--text) !important;
  border:1px solid var(--border);
}
.btn-outline:hover{ border-color: var(--primary); color: var(--primary) !important; }
input, select, textarea{
  width:100%; padding:11px 13px; border:1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text); font-size:14px; font-family:inherit;
}
input:focus, select:focus, textarea:focus{ outline:none; border-color: var(--primary); }
::placeholder{ color: var(--text-muted); opacity:.8; }

.btn-more{
  display:inline-flex; align-items:center; gap:6px; padding:7px 14px;
  border:1px solid var(--border); border-radius:999px; color: var(--text) !important;
  font-weight:700; font-size:13px; background: var(--card);
}
.btn-more:hover{ border-color: var(--primary); color: var(--primary) !important; background: var(--bg-soft); }
.btn-more .ico{ transition: transform .15s ease; }
.btn-more:hover .ico{ transform: translateX(2px); }

/* ---------- Category chips ---------- */
.chips{ display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.chip{
  display:inline-flex; align-items:center; gap:6px; padding:5px 12px;
  background: var(--bg-soft); border:1px solid var(--border); color: var(--text);
  border-radius:999px; font-size:12.5px; font-weight:600;
}
.chip:hover{ border-color: var(--primary); color: var(--primary); }

.chip-cat--bot-strategies-2025{ background:#0f2e24; border-color:#1aa37a; color:#8ff0cf; }
.chip-cat--deposit-bonus-forex-tading-2025{ background:#1c2340; border-color:#5c7cf0; color:#c9d4ff; }
.chip-cat--forex-broker-reviewes{ background:#3a230f; border-color:#e08f3c; color:#ffd9ad; }
.chip-cat--forex-premium-analaysis-signals{ background:#2a1c40; border-color:#9a6ff0; color:#e3d4ff; }
.chip-cat--forex-informetion-daily-news-analysis{ background:#1c2540; border-color:#6f86f0; color:#d4dcff; }
.chip-cat--crypto-loot-offer-new-exchangs-bonus{ background:#123322; border-color:#3fbf76; color:#bdf5d4; }
.chip-cat--funded-account-forex{ background:#3a1428; border-color:#e0568f; color:#ffc7de; }
html[data-theme="dark"] .chip-cat--bot-strategies-2025,
html[data-theme="dark"] .chip-cat--deposit-bonus-forex-tading-2025,
html[data-theme="dark"] .chip-cat--forex-broker-reviewes,
html[data-theme="dark"] .chip-cat--forex-premium-analaysis-signals,
html[data-theme="dark"] .chip-cat--forex-informetion-daily-news-analysis,
html[data-theme="dark"] .chip-cat--crypto-loot-offer-new-exchangs-bonus,
html[data-theme="dark"] .chip-cat--funded-account-forex{ filter:brightness(1); }

/* ---------- Menus (legacy header bits, kept for compatibility) ---------- */
.menu-list{ display:flex; gap:8px; list-style:none; padding:8px 0; margin:0; }
.menu-list a{ display:inline-block; padding:6px 10px; border-radius:8px; color: var(--text); white-space:nowrap; }
.menu-list a:hover{ background: var(--bg-soft); color: var(--primary); }
.chips-row{ display:flex; gap:8px; padding:8px 0; overflow-x:auto; -webkit-overflow-scrolling:touch; }
.search-form{ display:flex; align-items:center; gap:6px; }
.search-field{ height:40px; padding:0 14px; border:1px solid var(--border); border-radius:999px; background: var(--card); color: var(--text); }
.social-row{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.social-row a{ display:inline-flex; align-items:center; justify-content:center; width:30px; height:30px; border:1px solid var(--border); background: var(--card); color: var(--text); border-radius:999px; }
.social-row a:hover{ border-color: var(--primary); color: var(--primary); }

/* ---------- Cards (single / page templates) ---------- */
.card{ background: var(--card); border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; box-shadow: var(--shadow-sm); }
.card-body{ padding:18px; }
.card-title{ margin:0 0 10px; font-size:26px; line-height:1.3; font-weight:800; }
.card-meta{ display:flex; gap:8px; font-size:13px; color: var(--text-muted); margin-bottom:6px; }

/* Article typography */
.content, .entry-content{ font-size:16px; line-height:1.8; color: var(--text); }
.content > *:first-child{ margin-top:0; }
.content h2, .entry-content h2{ font-size:24px; font-weight:800; margin:32px 0 12px; }
.content h3, .entry-content h3{ font-size:20px; font-weight:800; margin:26px 0 10px; }
.content h4, .entry-content h4{ font-size:17px; font-weight:700; margin:20px 0 8px; }
.content p, .entry-content p{ margin:0 0 16px; }
.content a, .entry-content a{ color: var(--primary); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.content a:hover, .entry-content a:hover{ color: var(--accent); }
.content ul, .content ol, .entry-content ul, .entry-content ol{ margin:0 0 16px; padding-left:22px; }
.content li, .entry-content li{ margin:6px 0; }
.content blockquote, .entry-content blockquote{
  margin:20px 0; padding:14px 18px; border-left:4px solid var(--primary);
  background: var(--bg-soft); border-radius:0 var(--radius-sm) var(--radius-sm) 0; color: var(--text-muted); font-style:italic;
}
.content table, .entry-content table{ width:100%; border-collapse:collapse; margin:20px 0; font-size:14px; }
.content th, .content td, .entry-content th, .entry-content td{ border:1px solid var(--border); padding:10px 12px; text-align:left; }
.content th, .entry-content th{ background: var(--bg-soft); font-weight:700; }
.content code, .entry-content code{ background: var(--bg-soft); border:1px solid var(--border); border-radius:4px; padding:2px 6px; font-size:13px; }
.entry-content img{ height:auto; max-width:100%; display:block; border-radius: var(--radius-sm); }

/* ---------- Sidebar / widgets ---------- */
.sidebar .widget, .widget{ background: var(--card); border:1px solid var(--border); border-radius: var(--radius); padding:16px; box-shadow: var(--shadow-sm); }
.sidebar .widget + .widget{ margin-top:16px; }
.widget-title{ margin:0 0 12px; font-size:15px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color: var(--primary); }
.widget ul, .widget ol{ list-style:none; margin:0; padding:0; }
.widget li{ margin:0; padding:9px 0; border-bottom:1px solid var(--border); font-size:14px; }
.widget li:last-child{ border-bottom:none; }
.widget a{ color: var(--text); }
.widget a:hover{ color: var(--primary); }

/* ---------- Pagination ---------- */
.pagination{ display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:8px; margin-top:24px; }
.pagination .page-numbers, .pagination a, .nav-links a.page-numbers{
  display:inline-flex; align-items:center; justify-content:center; min-width:40px; height:40px; padding:0 14px;
  border:1px solid var(--border); border-radius:999px; background: var(--card); color: var(--text) !important;
  font-size:14px; font-weight:700; text-decoration:none !important;
}
.pagination .page-numbers:hover, .pagination a:hover{ border-color: var(--primary); color: var(--primary) !important; }
.pagination .current{ background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color:#fff !important; border-color:transparent; }

/* ---------- Comments ---------- */
.comments-area{ margin-top:28px; }
.comments-area h3{ font-size:19px; font-weight:800; }
.comment-list{ list-style:none; margin:16px 0; padding:0; display:flex; flex-direction:column; gap:12px; }
.comment-body{ background: var(--card); border:1px solid var(--border); border-radius: var(--radius-sm); padding:14px 16px; }
.comment-meta{ font-size:13px; color: var(--text-muted); margin-bottom:6px; }
.comment-text p{ margin:0 0 8px; }
.comment-form p{ margin:0 0 12px; }
.comment-form textarea{ min-height:120px; }

/* ---------- Notices (WP admin — light touch only) ---------- */
.notice{ border-radius:8px; }

/* ---------- Ads ---------- */
.ad-card{ margin:16px 0; padding:10px; background: var(--card); border:1px solid var(--border); border-radius: var(--radius); text-align:center; min-height:280px; }
@media (min-width:900px){ .ad-card{ min-height:250px; } }

/* ---------- AI modal ---------- */
.ai-modal{ position:fixed; inset:0; display:none; z-index:100; }
.ai-modal[aria-hidden="false"]{ display:block; }
.ai-modal__backdrop{ position:absolute; inset:0; background:rgba(6,10,20,.6); }
.ai-modal__dialog{ position:relative; max-width:720px; margin:10vh auto; background: var(--card); color: var(--text); border:1px solid var(--border); border-radius: var(--radius); overflow:hidden; z-index:101; box-shadow: var(--shadow-lg); }
.ai-modal__header{ display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid var(--border); }
.ai-modal__body{ padding:16px; }
.ai-modal__result{ margin-top:12px; padding:14px; background: var(--bg-soft); border:1px solid var(--border); border-radius: var(--radius-sm); white-space:pre-wrap; }
.ai-modal__close{ background:none; border:1px solid var(--border); color: var(--text); border-radius:8px; padding:6px 10px; box-shadow:none; }
.ai-modal__actions{ margin-top:10px; display:flex; justify-content:flex-end; }

/* ---------- Language widget ---------- */
.translate-widget{ position:relative; }
.lang-button{ background: var(--card); border:1px solid var(--border); border-radius:999px; padding:8px 14px; color: var(--text); font-size:14px; box-shadow:none; }
.lang-button:hover{ border-color: var(--primary); }
.lang-menu{ position:fixed; left:50%; top:12vh; transform:translateX(-50%); z-index:1001; max-height:60vh; width:min(92vw,520px); overflow:auto; background: var(--card); border:1px solid var(--border); border-radius: var(--radius); padding:8px; display:none; box-shadow: var(--shadow-lg); }
.lang-menu.open{ display:block; }
.lang-item{ display:block; width:100%; text-align:left; padding:9px 10px; border:none; background:none; color: var(--text); border-radius:8px; box-shadow:none; font-size:14px; }
.lang-item:hover{ background: var(--bg-soft); }
.lang-item.is-active{ background: rgba(194,144,15,.12); font-weight:700; color: var(--primary); }
.lang-backdrop{ position:fixed; inset:0; background:rgba(6,10,20,.5); backdrop-filter:blur(1px); z-index:1000; display:none; }
.lang-backdrop.open{ display:block; }
@media (max-width:680px){ .lang-menu{ top:10vh; width:94vw; max-height:70vh; } }

/* ---------- Loader ---------- */
.aat-loader{ position:fixed; inset:0; display:none; align-items:center; justify-content:center; z-index:9999; background: rgba(6,10,20,.55); }
.aat-loading .aat-loader{ display:flex; }
.aat-spinner{ --dot: var(--primary); --dim: rgba(194,144,15,.22); position:relative; width:56px; height:56px; border-radius:50%; animation:aatRotate .9s linear infinite; }
.aat-spinner::before, .aat-spinner::after{ content:""; position:absolute; inset:0; border-radius:50%; }
.aat-spinner::before{ box-shadow:
  0 -24px 0 0 var(--dim), 12px -21px 0 0 var(--dim), 21px -12px 0 0 var(--dim), 24px 0 0 0 var(--dim),
  21px 12px 0 0 var(--dim), 12px 21px 0 0 var(--dim), 0 24px 0 0 var(--dim), -12px 21px 0 0 var(--dim),
  -21px 12px 0 0 var(--dim), -24px 0 0 0 var(--dim), -21px -12px 0 0 var(--dim), -12px -21px 0 0 var(--dim);
}
.aat-spinner::after{ box-shadow:0 -24px 0 0 var(--dot); }
@keyframes aatRotate{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ .aat-spinner{ animation:none; } }

/* ---------- Title accent underline ---------- */
.page .entry-title, .single .entry-title, .archive .page-title, .search .page-title, .blog .page-title, .home .page-title{
  position:relative; display:inline-block; margin:8px 0 18px; padding-bottom:10px;
  font-weight:800; line-height:1.25; letter-spacing:-.01em; color: var(--text);
}
.page .entry-title::after, .single .entry-title::after, .archive .page-title::after,
.search .page-title::after, .blog .page-title::after, .home .page-title::after{
  content:""; position:absolute; left:0; bottom:0; height:4px; width:64px; border-radius:999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
@media (min-width:768px){
  .page .entry-title, .single .entry-title{ font-size:34px; }
  .archive .page-title, .search .page-title{ font-size:28px; }
}
@media (max-width:767.98px){
  .page .entry-title, .single .entry-title{ font-size:27px; }
  .archive .page-title, .search .page-title{ font-size:23px; }
}

/* ---------- Accessibility ---------- */
.skip-link{ position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus{ position:fixed; left:16px; top:16px; width:auto; height:auto; z-index:9999; background: var(--card); color: var(--text); padding:10px 16px; border-radius:8px; box-shadow: var(--shadow-md); }
.visually-hidden{ position:absolute !important; height:1px; width:1px; overflow:hidden; clip:rect(1px,1px,1px,1px); white-space:nowrap; }

/* ---------- WP core blocks tidy ---------- */
.wp-block-latest-posts__list a, .wp-block-pages-list__item__link{ color: var(--text); text-decoration:none; }
.wp-block-latest-posts__list a:hover, .wp-block-pages-list__item__link:hover{ color: var(--primary); }
.wp-block-pages-list__item{ list-style:none; }
