/*
 Theme Name:   Hello Child
 Theme URI:    https://iptvguided.com
 Description:  IPTVGuided child theme for Hello Elementor
 Author:       IPTVGuided
 Template:     hello-elementor
 Version:      1.0.0
*/

/* ============================================================
   IPTVGUIDED — GLOBAL DESIGN TOKENS
   ============================================================ */
:root {
  --ig-blue:       #2563EB;
  --ig-blue-dark:  #1D4ED8;
  --ig-blue-light: #EFF6FF;
  --ig-blue-mid:   #BFDBFE;
  --ig-text:       #111827;
  --ig-text-2:     #6B7280;
  --ig-text-3:     #9CA3AF;
  --ig-border:     #E5E7EB;
  --ig-bg:         #F9FAFB;
  --ig-white:      #ffffff;
  --ig-radius:     8px;
  --ig-radius-lg:  12px;
  --ig-font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================================
   ARTICLE HEADER
   ============================================================ */
.ig-post-header {
  background: var(--ig-white);
  border-bottom: 1px solid var(--ig-border);
  padding: 48px 24px 40px;
}
.ig-post-header-inner {
  max-width: 1160px;
  margin: 0 auto;
}
.ig-post-breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--ig-text-3);
  margin-bottom: 20px; flex-wrap: wrap;
  font-family: var(--ig-font);
}
.ig-post-breadcrumb a {
  color: var(--ig-text-3); text-decoration: none; transition: color .15s;
}
.ig-post-breadcrumb a:hover { color: var(--ig-blue); }
.ig-post-breadcrumb-sep  { color: var(--ig-border); }
.ig-post-breadcrumb-current { color: var(--ig-text-2); }

.ig-post-category-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--ig-blue-light); color: var(--ig-blue);
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 12px; border-radius: 100px;
  border: 1px solid var(--ig-blue-mid);
  margin-bottom: 16px; text-decoration: none !important;
  font-family: var(--ig-font);
}
.ig-post-category-badge:hover { background: var(--ig-blue); color: #fff; }

.ig-post-title {
  font-size: clamp(26px, 4vw, 40px);
  font-weight: 800; line-height: 1.15;
  letter-spacing: -1px; color: var(--ig-text);
  margin: 0 0 16px; max-width: 820px;
  font-family: var(--ig-font);
}
.ig-post-meta {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: var(--ig-font);
}
.ig-post-meta-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: var(--ig-text-2);
}
.ig-post-meta-item svg { color: var(--ig-text-3); flex-shrink: 0; }
.ig-post-meta-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ig-border); flex-shrink: 0;
}
.ig-post-tag {
  display: inline-flex; align-items: center;
  background: var(--ig-bg); border: 1px solid var(--ig-border);
  color: var(--ig-text-2); font-size: 12px; font-weight: 500;
  padding: 3px 10px; border-radius: 100px;
  text-decoration: none !important; transition: border-color .15s, color .15s;
}
.ig-post-tag:hover { border-color: var(--ig-blue); color: var(--ig-blue); }

/* ============================================================
   ARTICLE BODY LAYOUT — WIDE CONTENT + FLOATING TOC
   ============================================================ */
.ig-post-body-wrap {
  max-width: 1160px; margin: 0 auto;
  padding: 48px 24px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
}

/* ============================================================
   ARTICLE CONTENT TYPOGRAPHY
   ============================================================ */
.ig-post-content {
  min-width: 0;
  font-size: 17px; line-height: 1.75;
  color: var(--ig-text); font-family: var(--ig-font);
}
.ig-post-content h2 {
  font-size: 24px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--ig-text); margin: 2.2em 0 0.7em;
  border-top: 2px solid var(--ig-blue); padding-top: 0.6em;
  line-height: 1.25; font-family: var(--ig-font);
}
.ig-post-content h2:first-child { margin-top: 0; }
.ig-post-content h3 {
  font-size: 19px; font-weight: 700; letter-spacing: -0.3px;
  color: var(--ig-text); margin: 1.8em 0 0.5em;
  line-height: 1.3; font-family: var(--ig-font);
}
.ig-post-content h4 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ig-text-2);
  margin: 1.5em 0 0.4em; font-family: var(--ig-font);
}
.ig-post-content p { margin-bottom: 1.3em; }
.ig-post-content p:last-child { margin-bottom: 0; }
.ig-post-content a {
  color: var(--ig-blue); text-decoration: underline; text-underline-offset: 2px;
}
.ig-post-content a:hover { color: var(--ig-blue-dark); }
.ig-post-content strong { font-weight: 700; color: var(--ig-text); }

/* Lists */
.ig-post-content ul,
.ig-post-content ol {
  margin: 0 0 1.3em; padding-left: 0; list-style: none;
}
.ig-post-content ul li,
.ig-post-content ol li {
  position: relative; padding-left: 24px;
  margin-bottom: 0.55em; font-size: 17px;
}
.ig-post-content ul li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--ig-blue);
}
.ig-post-content ol { counter-reset: ig-ol; }
.ig-post-content ol li { counter-increment: ig-ol; }
.ig-post-content ol li::before {
  content: counter(ig-ol);
  position: absolute; left: 0; top: 1px;
  font-size: 11px; font-weight: 700; color: var(--ig-blue);
  background: var(--ig-blue-light);
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Images */
.ig-post-content img {
  width: 100%; border-radius: var(--ig-radius-lg);
  border: 1px solid var(--ig-border); margin: 1.5em 0;
}
.ig-post-content figure { margin: 1.5em 0; }
.ig-post-content figcaption {
  font-size: 13px; color: var(--ig-text-3);
  text-align: center; margin-top: 8px; font-style: italic;
}

/* Code */
.ig-post-content code {
  background: var(--ig-bg); border: 1px solid var(--ig-border);
  padding: 2px 6px; border-radius: 4px;
  font-size: 14px; font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--ig-blue-dark);
}
.ig-post-content pre {
  background: #0F172A; border-radius: var(--ig-radius);
  padding: 20px; overflow-x: auto; margin: 1.5em 0;
}
.ig-post-content pre code {
  background: none; border: none; padding: 0;
  color: #E2E8F0; font-size: 14px; line-height: 1.6;
}

/* Blockquote */
.ig-post-content blockquote {
  border-left: 3px solid var(--ig-blue);
  margin: 1.8em 0; padding: 16px 20px;
  background: var(--ig-blue-light);
  border-radius: 0 var(--ig-radius) var(--ig-radius) 0;
}
.ig-post-content blockquote p {
  font-size: 16px; color: var(--ig-text);
  font-style: italic; margin: 0;
}

/* Tables */
.ig-post-content table {
  width: 100%; border-collapse: collapse;
  margin: 1.5em 0; font-size: 15px;
  border: 1px solid var(--ig-border); border-radius: var(--ig-radius-lg);
  overflow: hidden;
}
.ig-post-content th {
  background: var(--ig-bg); padding: 12px 16px;
  text-align: left; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--ig-text-2); border-bottom: 1px solid var(--ig-border);
}
.ig-post-content td {
  padding: 12px 16px; border-bottom: 1px solid var(--ig-border);
  color: var(--ig-text); vertical-align: top;
}
.ig-post-content tr:last-child td { border-bottom: none; }
.ig-post-content tr:nth-child(even) td { background: #FAFAFA; }

/* Callout boxes */
.ig-callout {
  display: flex; gap: 14px; padding: 16px 20px;
  border-radius: var(--ig-radius); margin: 1.8em 0;
  font-size: 15px; line-height: 1.6;
}
.ig-callout-icon { flex-shrink: 0; margin-top: 1px; }
.ig-callout-body strong { font-weight: 700; display: block; margin-bottom: 3px; }
.ig-callout-tip     { background: var(--ig-blue-light); border: 1px solid var(--ig-blue-mid); }
.ig-callout-tip     .ig-callout-icon { color: var(--ig-blue); }
.ig-callout-warning { background: #FFFBEB; border: 1px solid #FDE68A; }
.ig-callout-warning .ig-callout-icon { color: #D97706; }
.ig-callout-success { background: #F0FDF4; border: 1px solid #BBF7D0; }
.ig-callout-success .ig-callout-icon { color: #16A34A; }

/* ============================================================
   FLOATING TOC SIDEBAR
   ============================================================ */
.ig-toc-sidebar {
  position: sticky; top: 80px;
  background: var(--ig-bg); border: 1px solid var(--ig-border);
  border-radius: var(--ig-radius-lg); padding: 20px;
  max-height: calc(100vh - 120px); overflow-y: auto;
  font-family: var(--ig-font);
}
.ig-toc-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--ig-text-3);
  margin-bottom: 14px; display: flex; align-items: center; gap: 6px;
}
.ig-toc-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.ig-toc-item a {
  display: block; padding: 6px 10px;
  font-size: 13px; color: var(--ig-text-2);
  text-decoration: none !important; border-radius: 6px;
  line-height: 1.4; border-left: 2px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
}
.ig-toc-item a:hover {
  color: var(--ig-blue); background: var(--ig-blue-light);
  border-left-color: var(--ig-blue-mid);
}
.ig-toc-item.ig-toc-active a {
  color: var(--ig-blue); font-weight: 600;
  background: var(--ig-blue-light); border-left-color: var(--ig-blue);
}
.ig-toc-item-h3 a { padding-left: 22px; font-size: 12px; }
.ig-toc-progress {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ig-border);
}
.ig-toc-progress-label {
  font-size: 11px; color: var(--ig-text-3);
  display: flex; justify-content: space-between; margin-bottom: 6px;
}
.ig-toc-progress-bar {
  height: 3px; background: var(--ig-border); border-radius: 100px; overflow: hidden;
}
.ig-toc-progress-fill {
  height: 100%; background: var(--ig-blue);
  border-radius: 100px; width: 0%; transition: width .1s;
}

/* ============================================================
   RELATED ARTICLES
   ============================================================ */
.ig-related-wrap {
  background: var(--ig-bg); border-top: 1px solid var(--ig-border);
  padding: 56px 24px;
}
.ig-related-inner { max-width: 1160px; margin: 0 auto; }
.ig-related-title {
  font-size: 20px; font-weight: 700; letter-spacing: -0.4px;
  color: var(--ig-text); margin-bottom: 24px; font-family: var(--ig-font);
}
.ig-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.ig-related-card {
  background: var(--ig-white); border: 1px solid var(--ig-border);
  border-radius: var(--ig-radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  text-decoration: none !important;
  transition: border-color .15s, transform .15s;
}
.ig-related-card:hover { border-color: var(--ig-blue); transform: translateY(-2px); }
.ig-related-thumb {
  width: 100%; height: 130px; background: var(--ig-blue-light);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.ig-related-badge {
  position: absolute; top: 8px; left: 8px;
  background: var(--ig-blue); color: #fff;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  padding: 3px 8px; border-radius: 100px;
}
.ig-related-body {
  padding: 16px; flex: 1;
  display: flex; flex-direction: column; gap: 6px;
}
.ig-related-card-title {
  font-size: 14px; font-weight: 700; color: var(--ig-text);
  line-height: 1.35; font-family: var(--ig-font);
}
.ig-related-card:hover .ig-related-card-title { color: var(--ig-blue); }
.ig-related-meta {
  font-size: 12px; color: var(--ig-text-3);
  display: flex; align-items: center; gap: 6px;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--ig-border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .ig-post-body-wrap {
    grid-template-columns: 1fr;
    padding: 28px 16px;
  }
  .ig-toc-sidebar {
    position: static; order: -1; max-height: none;
  }
}
@media (max-width: 600px) {
  .ig-post-header    { padding: 28px 16px 24px; }
  .ig-post-title     { font-size: 24px; }
  .ig-post-content   { font-size: 16px; }
  .ig-post-content h2 { font-size: 20px; }
  .ig-post-content h3 { font-size: 17px; }
  .ig-related-wrap   { padding: 32px 16px; }
}