/* ===========================================================
   SOTO XTREME · BLOG · SHARED STYLESHEET
   Extends the main site design system (index.html) with
   article typography, TOC, FAQ, article cards, breadcrumbs.
   Keep colour/font tokens identical to the landing page.
   =========================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Karla', sans-serif;
  background: #0c0c0c;
  color: #ffffff;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

:root {
  --red: #fa100d;
  --red-dark: #c50a08;
  --dark: #0c0c0c;
  --surface: #171717;
  --surface2: #222222;
  --surface3: #2a2a2a;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --text: #ffffff;
  --text-soft: rgba(255,255,255,0.85);
  --muted: #888888;
  --light-bg: #f4f4f4;
}

/* ===== NAVBAR (identical to landing) ===== */
#navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
  background: rgba(12,12,12,0.97);
  box-shadow: 0 2px 20px rgba(0,0,0,0.5);
  transition: background 0.3s;
}
.nav-logo { display: inline-flex; align-items: center; }
.nav-logo-fallback {
  font-family: 'Rubik', sans-serif; font-weight: 900;
  font-size: 1.4rem; letter-spacing: -0.5px; color: #fff;
}
.nav-logo-fallback span { color: var(--red); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-family: 'Karla', sans-serif; font-weight: 600;
  font-size: 0.85rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: rgba(255,255,255,0.8); transition: color 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--red); }
.nav-cta {
  background: var(--red); color: #fff !important;
  padding: 0.6rem 1.4rem; border-radius: 4px;
  font-weight: 700 !important; font-size: 0.8rem !important;
  letter-spacing: 1.5px; text-transform: uppercase;
  transition: background 0.2s !important; white-space: nowrap;
}
.nav-cta:hover { background: var(--red-dark) !important; color: #fff !important; }
.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px;
  background: none; border: none;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: #fff; border-radius: 2px; transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu {
  display: none; position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
  background: rgba(10,10,10,0.98); z-index: 999;
  flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 1.8rem;
  color: rgba(255,255,255,0.85); letter-spacing: 1px; transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--red); }

/* ===== SECTION UTILITIES ===== */
.section-label {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--red); margin-bottom: 1rem;
}
.section-label::before {
  content: ''; display: block; width: 24px; height: 2px; background: var(--red);
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  font-size: 0.78rem; color: var(--muted);
  padding: 0 8%; padding-top: 100px; padding-bottom: 1rem;
  letter-spacing: 0.5px;
}
.breadcrumbs a { color: var(--muted); transition: color 0.2s; }
.breadcrumbs a:hover { color: var(--red); }
.breadcrumbs .sep { margin: 0 0.5rem; opacity: 0.5; }
.breadcrumbs .current { color: var(--text-soft); }

/* ===== ARTICLE HERO ===== */
.article-hero {
  position: relative;
  padding: 2rem 8% 5rem;
  overflow: hidden;
  min-height: 60vh;
  display: flex; align-items: flex-end;
}
.article-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.55) contrast(1.05);
}
.article-hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,12,12,0.4) 0%, rgba(12,12,12,0.95) 90%);
}
.article-hero-content { position: relative; z-index: 2; max-width: 900px; }
.article-eyebrow {
  display: inline-block;
  font-family: 'Karla', sans-serif;
  font-weight: 700; font-size: 0.75rem;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--red);
  background: rgba(250,16,13,0.12);
  border: 1px solid rgba(250,16,13,0.3);
  padding: 0.35rem 1rem; border-radius: 2px;
  margin-bottom: 1.2rem;
}
.article-title {
  font-family: 'Rubik', sans-serif; font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 1.05; letter-spacing: -1.5px;
  color: #fff; margin-bottom: 1rem;
}
.article-subtitle {
  font-family: 'Karla', sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: rgba(255,255,255,0.75);
  max-width: 700px; line-height: 1.65;
  margin-bottom: 1.5rem;
}
.article-meta {
  display: flex; align-items: center; gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 0.82rem; color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
}
.article-meta .dot { opacity: 0.4; }
.article-meta .author { color: #fff; font-weight: 600; }

/* Red diagonal slash (signature element from landing) */
.article-slash {
  position: absolute; bottom: -2px; left: 0; right: 0;
  height: 80px; overflow: hidden;
}
.article-slash::before {
  content: ''; position: absolute; bottom: 0; left: -5%; right: -5%;
  height: 200%; background: #0c0c0c;
  transform: skewY(-2deg); transform-origin: bottom left;
}
.article-slash::after {
  content: ''; position: absolute; bottom: 0; left: -5%; right: 70%;
  height: 200%; background: var(--red);
  transform: skewY(-2deg); transform-origin: bottom left;
}

/* ===== ARTICLE BODY LAYOUT ===== */
.article-wrap {
  padding: 4rem 8% 5rem;
  background: var(--dark);
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* TOC sidebar */
.toc {
  position: sticky; top: 90px;
  align-self: start;
  padding: 1.5rem 1.2rem;
  background: var(--surface);
  border-left: 2px solid var(--red);
  border-radius: 0 6px 6px 0;
  font-size: 0.85rem;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.toc-title {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--red); margin-bottom: 1rem;
}
.toc ul { list-style: none; }
.toc li { margin-bottom: 0.7rem; line-height: 1.4; }
.toc a {
  color: rgba(255,255,255,0.7); transition: color 0.2s, padding-left 0.2s;
  display: block; border-left: 2px solid transparent; padding-left: 0.5rem;
}
.toc a:hover, .toc a.active {
  color: var(--red); border-left-color: var(--red);
}

/* Article main body */
.article-body {
  min-width: 0;
  max-width: 780px;
  font-family: 'Karla', sans-serif;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}
.article-body h2 {
  font-family: 'Rubik', sans-serif; font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  color: #fff;
  margin: 3rem 0 1.2rem;
  letter-spacing: -0.5px; line-height: 1.15;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  color: #fff;
  margin: 2rem 0 0.9rem;
  letter-spacing: -0.3px;
}
.article-body p { margin-bottom: 1.2rem; }
.article-body strong { color: #fff; font-weight: 700; }
.article-body a {
  color: var(--red); border-bottom: 1px solid rgba(250,16,13,0.4);
  transition: border-color 0.2s, color 0.2s;
}
.article-body a:hover { color: #fff; border-bottom-color: #fff; }
.article-body ul, .article-body ol {
  margin: 0 0 1.4rem 1.5rem;
}
.article-body ul li, .article-body ol li {
  margin-bottom: 0.6rem;
  padding-left: 0.3rem;
}
.article-body ul li::marker { color: var(--red); }
.article-body ol li::marker { color: var(--red); font-weight: 700; }

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.5rem;
  background: var(--surface);
  border-left: 4px solid var(--red);
  border-radius: 0 6px 6px 0;
  font-style: normal;
  color: rgba(255,255,255,0.9);
  font-size: 0.98rem;
  position: relative;
}
.article-body blockquote::before {
  content: 'CONSEJO';
  position: absolute; top: -10px; left: 1.4rem;
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 0.65rem; letter-spacing: 2px;
  background: var(--red); color: #fff;
  padding: 3px 8px; border-radius: 3px;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8rem 0;
  font-size: 0.92rem;
  background: var(--surface);
  border-radius: 6px;
  overflow: hidden;
}
.article-body th {
  background: var(--surface2);
  padding: 0.9rem 1rem;
  text-align: left;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  border-bottom: 2px solid var(--red);
}
.article-body td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  vertical-align: top;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:hover td { background: rgba(255,255,255,0.02); }

/* Inline images */
.article-figure {
  margin: 2rem 0;
  border-radius: 8px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.article-figure img {
  width: 100%; height: auto; display: block;
}
.article-figure figcaption {
  padding: 0.9rem 1.2rem;
  font-size: 0.82rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-style: italic;
}

/* ===== FAQ ===== */
.faq-section {
  background: var(--surface);
  padding: 4rem 8%;
  border-top: 1px solid var(--border);
}
.faq-wrap { max-width: 900px; margin: 0 auto; }
.faq-header { margin-bottom: 2.5rem; }
.faq-title {
  font-family: 'Rubik', sans-serif; font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: #fff; letter-spacing: -0.5px; line-height: 1.1;
}
.faq-item {
  background: var(--surface2);
  border-radius: 6px;
  margin-bottom: 0.8rem;
  overflow: hidden;
  border-left: 3px solid transparent;
  transition: border-color 0.2s;
}
.faq-item[open] { border-left-color: var(--red); }
.faq-item summary {
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 1rem;
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-size: 1.4rem; color: var(--red);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .answer {
  padding: 0 1.5rem 1.3rem;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ===== ARTICLE FOOTER CTA ===== */
.article-cta {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  padding: 4rem 8%;
  text-align: center;
}
.article-cta h3 {
  font-family: 'Rubik', sans-serif; font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  color: #fff; letter-spacing: -0.5px;
  margin-bottom: 0.8rem; line-height: 1.15;
}
.article-cta p {
  color: rgba(255,255,255,0.9); font-size: 1.05rem;
  max-width: 620px; margin: 0 auto 1.8rem; line-height: 1.65;
}
.article-cta .cta-buttons {
  display: inline-flex; gap: 1rem; flex-wrap: wrap; justify-content: center;
}
.article-cta .btn-wa {
  background: #fff; color: var(--red);
  padding: 0.95rem 2rem;
  font-family: 'Karla', sans-serif; font-weight: 800;
  font-size: 0.88rem; letter-spacing: 1.5px; text-transform: uppercase;
  border-radius: 4px;
  transition: transform 0.15s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.article-cta .btn-wa:hover { transform: translateY(-2px); }
.article-cta .btn-outline {
  background: transparent; color: #fff;
  padding: 0.95rem 2rem;
  border: 2px solid #fff;
  font-family: 'Karla', sans-serif; font-weight: 700;
  font-size: 0.88rem; letter-spacing: 1.5px; text-transform: uppercase;
  border-radius: 4px;
  transition: background 0.2s;
}
.article-cta .btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ===== RELATED POSTS ===== */
.related-posts {
  background: var(--dark);
  padding: 5rem 8%;
  border-top: 1px solid var(--border);
}
.related-header { margin-bottom: 2.5rem; }
.related-title {
  font-family: 'Rubik', sans-serif; font-weight: 900;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #fff; letter-spacing: -0.5px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ===== ARTICLE CARD (blog index + related) ===== */
.post-card {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  border-top: 2px solid transparent;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  display: flex; flex-direction: column;
}
.post-card:hover {
  border-top-color: var(--red);
  transform: translateY(-3px);
  background: var(--surface2);
}
.post-card-image {
  aspect-ratio: 16/9;
  background-size: cover; background-position: center;
  background-color: var(--surface2);
}
.post-card-body { padding: 1.4rem 1.5rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.post-card-tag {
  font-family: 'Karla', sans-serif; font-weight: 700;
  font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--red); margin-bottom: 0.7rem;
}
.post-card-title {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 1.15rem; line-height: 1.25;
  color: #fff; margin-bottom: 0.8rem;
  letter-spacing: -0.3px;
}
.post-card-excerpt {
  font-size: 0.9rem; color: rgba(255,255,255,0.65);
  line-height: 1.55; margin-bottom: 1rem;
  flex: 1;
}
.post-card-meta {
  font-size: 0.75rem; color: var(--muted);
  letter-spacing: 0.5px;
  display: flex; gap: 0.8rem; align-items: center;
}

/* ===== BLOG INDEX HERO ===== */
.blog-index-hero {
  padding: 8rem 8% 4rem;
  background: linear-gradient(180deg, #0c0c0c 0%, #171717 100%);
  border-bottom: 1px solid var(--border);
}
.blog-index-hero .section-label { margin-bottom: 1rem; }
.blog-index-hero h1 {
  font-family: 'Rubik', sans-serif; font-weight: 900;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: #fff; letter-spacing: -1.5px; line-height: 1.05;
  margin-bottom: 1.2rem;
}
.blog-index-hero p {
  color: rgba(255,255,255,0.7);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  max-width: 720px; line-height: 1.7;
}
.blog-index-grid {
  padding: 4rem 8% 6rem;
  background: var(--dark);
}
.blog-index-grid .grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1300px;
  margin: 0 auto;
}

/* ===== FOOTER ===== */
footer {
  background: #000; padding: 3rem 8%; border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.5rem; max-width: 1300px; margin: 0 auto;
}
.footer-logo {
  font-family: 'Rubik', sans-serif; font-weight: 900;
  font-size: 1.3rem; color: #fff; letter-spacing: -0.5px;
}
.footer-logo span { color: var(--red); }
.footer-copy { font-size: 0.82rem; color: var(--muted); }
.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid var(--border); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.footer-social a:hover { border-color: var(--red); background: rgba(250,16,13,0.1); }
.footer-social svg { width: 16px; height: 16px; fill: rgba(255,255,255,0.7); }
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-links a {
  font-size: 0.82rem; color: var(--muted); transition: color 0.2s;
}
.footer-links a:hover { color: #fff; }

/* ===== WHATSAPP FLOATING ===== */
#wa-btn {
  position: fixed; bottom: 1.8rem; right: 1.8rem; z-index: 900;
  width: 56px; height: 56px;
  background: #25d366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
#wa-btn:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37,211,102,0.6); }
#wa-btn svg { width: 28px; height: 28px; fill: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1000px) {
  .article-wrap {
    grid-template-columns: 1fr;
    padding: 3rem 6% 4rem;
    gap: 2rem;
  }
  .toc { position: static; max-height: none; }
}
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .article-hero { padding: 2rem 6% 4rem; }
  .breadcrumbs { padding: 100px 6% 1rem; }
  .article-cta, .faq-section, .related-posts, .blog-index-grid, .blog-index-hero {
    padding-left: 6%; padding-right: 6%;
  }
  footer { padding: 2.5rem 6%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .blog-index-hero { padding-top: 6rem; }
  .article-title { letter-spacing: -1px; }
  .article-body { font-size: 1rem; }
}
