@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --dark: #0f172a;       /* Slate 900 */
  --dark-hover: #1e293b;
  --blue: #2563eb;       /* Electric Blue */
  --blue-hover: #1d4ed8;
  --blue-light: #eff6ff; /* Indigo tint */
  --text: #1e293b;       /* Slate 800 */
  --text-dark: #0f172a;  /* Slate 900 */
  --text-muted: #64748b; /* Slate 500 */
  --text-light: #94a3b8; /* Slate 400 */
  --bg: #f8fafc;         /* Slate 50 */
  --bg-card: #ffffff;
  --border: #e2e8f0;     /* Slate 200 */
  --green: #10b981;      /* Emerald 500 */
  --green-light: #ecfdf5;
  --amber: #f59e0b;      /* Amber 500 */
  --amber-light: #fef3c7;
  --red: #ef4444;        /* Red 500 */
  --red-light: #fef2f2;
  --radius: 12px;
  --radius-lg: 16px;
  --font-head: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.02), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 32px -10px rgba(15, 23, 42, 0.06);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.75; -webkit-font-smoothing: antialiased; }

a { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-hover); }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

/* ── HEADER ── */
.site-header { background: var(--dark); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.top-bar { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; padding: 16px 20px; }
.site-logo { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: #ffffff; text-decoration: none; letter-spacing: -0.5px; transition: var(--transition); }
.site-logo span { color: var(--blue); }
.site-logo:hover { transform: scale(1.02); }
.main-nav { display: flex; gap: 6px; }
.main-nav a { font-family: var(--font-head); font-size: 13.5px; font-weight: 600; color: rgba(255, 255, 255, 0.7); text-decoration: none; padding: 8px 16px; border-radius: 999px; transition: var(--transition); }
.main-nav a:hover, .main-nav a.active { color: #ffffff; background: rgba(255, 255, 255, 0.08); }

/* ── HERO ── */
.hero { background: var(--dark); padding: 56px 20px 64px; position: relative; overflow: hidden; }
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -50px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 768px) { .hero-inner { grid-template-columns: 1fr; gap: 32px; } }
.hero h1 { font-family: var(--font-head); font-size: clamp(32px, 5vw, 46px); font-weight: 800; color: #ffffff; line-height: 1.15; letter-spacing: -1px; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero p.lead { font-size: 16px; color: rgba(255, 255, 255, 0.65); line-height: 1.7; margin-bottom: 28px; }
.hero-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-family: var(--font-head); font-weight: 600; padding: 6px 12px; border-radius: 50px; }
.badge-gold { background: rgba(37, 99, 235, 0.15); color: var(--blue); border: 1px solid rgba(37, 99, 235, 0.25); }
.badge-white { background: rgba(255, 255, 255, 0.06); color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.1); }

/* ── CALCULADORA ── */
.calc-card { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-lg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.calc-card-title { font-family: var(--font-head); font-size: 13px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--blue); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 480px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-field label { display: block; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.5); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.calc-field input, .calc-field select { width: 100%; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius); padding: 10px 12px; color: #ffffff; font-size: 14px; font-family: var(--font-body); outline: none; transition: var(--transition); }
.calc-field input:focus, .calc-field select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }
.calc-field select option { background: var(--dark); color: #fff; }
.calc-btn { width: 100%; background: var(--blue); color: #ffffff; border: none; border-radius: var(--radius); padding: 13px; font-family: var(--font-head); font-size: 15px; font-weight: 700; cursor: pointer; margin-top: 8px; transition: var(--transition); box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3); }
.calc-btn:hover { background: var(--blue-hover); transform: translateY(-1px); }
.calc-result { margin-top: 16px; padding: 16px; background: rgba(16, 185, 129, 0.08); border-left: 4px solid var(--green); border-radius: 0 var(--radius) var(--radius) 0; display: none; }
.calc-result.show { display: block; }
.calc-result p { font-size: 13.5px; color: rgba(255, 255, 255, 0.9); line-height: 1.6; }
.calc-result strong { color: #ffffff; font-weight: 700; }

/* ── LAYOUT PRINCIPAL ── */
.page-wrap { max-width: 1100px; margin: 0 auto; padding: 48px 20px; }
.content-grid { display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
@media (max-width: 768px) { .content-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ── SECCIÓN LABELS ── */
.section-label { font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 20px; display: inline-block; position: relative; }
.section-label::after { content: ''; display: block; width: 24px; height: 2px; background: var(--blue); margin-top: 6px; }

/* ── SILOS CARDS ── */
.silos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 48px; }
.silo-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; text-decoration: none; display: flex; flex-direction: column; transition: var(--transition); box-shadow: var(--shadow); }
.silo-card:hover { border-color: rgba(37, 99, 235, 0.2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.silo-icon { font-size: 26px; color: var(--blue); margin-bottom: 16px; display: block; }
.silo-tag { font-family: var(--font-head); font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 50px; margin-bottom: 12px; align-self: flex-start; }
.tag-itv { background: #eff6ff; color: #2563eb; }
.tag-pre { background: #ecfdf5; color: #10b981; }
.tag-mec { background: #fef3c7; color: #d97706; }
.tag-ccaa { background: #fdf2f8; color: #db2777; }
.silo-card h3 { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text-dark); line-height: 1.35; margin-bottom: 8px; }
.silo-card p { font-size: 13.5px; color: var(--text-muted); line-height: 1.6; flex-grow: 1; }
.silo-count { font-family: var(--font-head); font-size: 12px; font-weight: 600; color: var(--blue); margin-top: 16px; display: block; }

/* ── ARTICLE LIST ── */
.article-list { display: flex; flex-direction: column; gap: 12px; }
.article-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; display: flex; gap: 16px; align-items: flex-start; text-decoration: none; transition: var(--transition); box-shadow: var(--shadow); }
.article-item:hover { border-color: rgba(37, 99, 235, 0.2); transform: translateX(2px); box-shadow: var(--shadow-lg); }
.article-cat { font-family: var(--font-head); font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 4px 10px; border-radius: 50px; white-space: nowrap; flex-shrink: 0; margin-top: 2px; }
.article-body h4 { font-family: var(--font-head); font-size: 15px; font-weight: 700; color: var(--text-dark); line-height: 1.4; margin-bottom: 6px; }
.article-body p { font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }
.sidebar-card h4 { font-family: var(--font-head); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dark); margin-bottom: 16px; border-left: 3px solid var(--blue); padding-left: 8px; }
.quick-link { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: var(--text); font-size: 13.5px; transition: var(--transition); }
.quick-link:last-child { border-bottom: none; }
.quick-link:hover { color: var(--blue); padding-left: 4px; }
.quick-link i { color: var(--text-light); font-size: 14px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-box { background: var(--bg); border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--border); }
.stat-n { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--blue); display: block; line-height: 1.1; }
.stat-l { font-size: 11px; color: var(--text-muted); margin-top: 4px; display: block; line-height: 1.4; }

/* ── AD PLACEHOLDERS ── */
.ad-slot { background: var(--bg-card); border: 1px dashed var(--border); border-radius: var(--radius); padding: 16px; text-align: center; font-size: 11px; font-weight: 600; color: var(--text-light); font-family: var(--font-head); letter-spacing: 0.5px; text-transform: uppercase; }
.ad-leaderboard { min-height: 90px; display: flex; align-items: center; justify-content: center; margin-bottom: 32px; }
.ad-rectangle { min-height: 250px; display: flex; align-items: center; justify-content: center; }
.ad-incontent { min-height: 90px; display: flex; align-items: center; justify-content: center; margin: 32px 0; }

/* ── ARTÍCULO INTERIOR ── */
.article-header { background: var(--dark); padding: 48px 20px 48px; }
.article-header .breadcrumb { font-size: 12.5px; color: rgba(255, 255, 255, 0.45); margin-bottom: 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.article-header .breadcrumb a { color: rgba(255, 255, 255, 0.45); text-decoration: none; }
.article-header .breadcrumb a:hover { color: #ffffff; }
.article-header h1 { font-family: var(--font-head); font-size: clamp(28px, 4.5vw, 38px); font-weight: 800; color: #ffffff; line-height: 1.2; max-width: 800px; margin-bottom: 16px; letter-spacing: -0.5px; }
.article-header h1 br { display: none; }
@media (min-width: 640px) { .article-header h1 br { display: block; } }
.article-header .meta { font-size: 13px; color: rgba(255, 255, 255, 0.5); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.article-header .meta span { display: flex; align-items: center; gap: 6px; }

.article-wrap { max-width: 1100px; margin: 0 auto; padding: 48px 20px; display: grid; grid-template-columns: 1fr 300px; gap: 40px; }
@media (max-width: 768px) { .article-wrap { grid-template-columns: 1fr; gap: 32px; } }

.article-content h2 { font-family: var(--font-head); font-size: 22px; font-weight: 800; color: var(--text-dark); margin: 36px 0 16px; border-left: 3px solid var(--blue); padding-left: 14px; letter-spacing: -0.3px; }
.article-content h3 { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--text-dark); margin: 28px 0 12px; }
.article-content p { font-size: 15px; line-height: 1.8; color: var(--text); margin-bottom: 18px; }
.article-content ul, .article-content ol { padding-left: 24px; margin-bottom: 18px; }
.article-content li { font-size: 15px; line-height: 1.75; color: var(--text); margin-bottom: 8px; }
.article-content ol li { padding-left: 4px; }

.step-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; display: flex; gap: 16px; align-items: flex-start; box-shadow: var(--shadow); }
.step-num { font-family: var(--font-head); font-size: 16px; font-weight: 800; color: var(--blue); background: var(--blue-light); border-radius: 50%; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.step-body strong { display: block; font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.step-body p { font-size: 13.5px; color: var(--text-muted); margin: 0; line-height: 1.6; }

.alert-box { border-radius: var(--radius); padding: 16px 20px; margin: 24px 0; border-left: 4px solid; box-shadow: var(--shadow); }
.alert-warning { background: #fffbeb; border-color: var(--amber); color: #78350f; }
.alert-danger { background: #fef2f2; border-color: var(--red); color: #7f1d1d; }
.alert-info { background: var(--blue-light); border-color: var(--blue); color: #1e3a8a; }
.alert-box p { font-size: 14.5px; margin: 0; line-height: 1.65; }
.alert-box strong { display: block; margin-bottom: 4px; font-weight: 700; }

.defectos-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 24px 0; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.defectos-table th { font-family: var(--font-head); font-size: 11.5px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 12px 16px; text-align: left; background: var(--bg); border-bottom: 2px solid var(--border); color: var(--text-dark); }
.defectos-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bg-card); vertical-align: middle; line-height: 1.5; color: var(--text); }
.defectos-table tr:last-child td { border-bottom: none; }
.badge-leve { background: #ecfdf5; color: #047857; font-size: 11px; font-family: var(--font-head); font-weight: 700; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(16, 185, 129, 0.2); }
.badge-grave { background: #fffbeb; color: #b45309; font-size: 11px; font-family: var(--font-head); font-weight: 700; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-muygrv { background: #fef2f2; color: #b91c1c; font-size: 11px; font-family: var(--font-head); font-weight: 700; padding: 4px 8px; border-radius: 4px; border: 1px solid rgba(239, 68, 68, 0.2); }

.faq-section { margin-top: 48px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow); }
.faq-q { padding: 16px 20px; font-family: var(--font-head); font-size: 14.5px; font-weight: 700; color: var(--text-dark); cursor: pointer; display: flex; justify-content: space-between; align-items: center; background: var(--bg-card); transition: var(--transition); }
.faq-q:hover { background: var(--bg); }
.faq-q i { font-size: 16px; color: var(--text-muted); transition: transform 0.25s; }
.faq-item.open .faq-q i { transform: rotate(180deg); color: var(--blue); }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.25s; }
.faq-item.open .faq-a { max-height: 300px; padding: 0 20px 18px; }
.faq-a p { font-size: 14px; color: var(--text-muted); line-height: 1.65; margin: 0; }

/* ── FOOTER ── */
.site-footer { background: var(--dark); border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 48px 20px 32px; margin-top: 64px; color: rgba(255, 255, 255, 0.6); }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.footer-logo { font-family: var(--font-head); font-size: 20px; font-weight: 800; color: #ffffff; }
.footer-logo span { color: var(--blue); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; color: rgba(255, 255, 255, 0.6); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: #ffffff; }
.footer-copy { font-size: 12px; color: rgba(255, 255, 255, 0.4); line-height: 1.6; }

/* ── CCAA GRID ── */
.ccaa-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 24px; }
.ccaa-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; display: flex; align-items: center; gap: 12px; transition: var(--transition); box-shadow: var(--shadow); }
.ccaa-card:hover { border-color: rgba(37, 99, 235, 0.2); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.ccaa-card span { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--text-dark); }
.ccaa-card small { font-size: 11.5px; color: var(--text-muted); display: block; margin-top: 2px; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .hero { padding: 40px 16px; }
  .silos-grid { grid-template-columns: 1fr; }
  .ccaa-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-top-btn:hover {
  background: var(--blue-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}
@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}
