/* ==============================================
   SegurosClaro — Diseño: Confianza Profesional
   Paleta: Azul marino (#1B2B4B) + Dorado (#C9A84C) + Blanco
   Tipografía: Playfair Display (títulos) + Source Sans 3 (cuerpo)
   ============================================== */

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

:root {
  --navy: #1B2B4B;
  --navy-light: #243660;
  --navy-dark: #111C30;
  --gold: #C9A84C;
  --gold-light: #E8C96A;
  --white: #FFFFFF;
  --off-white: #F8F7F4;
  --gray-100: #F2F1EE;
  --gray-200: #E5E3DC;
  --gray-400: #9B9589;
  --gray-600: #6B6560;
  --gray-800: #3A3630;
  --teal: #1A6B6B;
  --slate: #4A5568;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', system-ui, sans-serif;
  --radius: 8px;
  --shadow-sm: 0 1px 3px rgba(27,43,75,0.08);
  --shadow-md: 0 4px 16px rgba(27,43,75,0.12);
  --shadow-lg: 0 8px 32px rgba(27,43,75,0.16);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--gray-800);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* CONTAINER */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.3px;
}

.logo-icon { font-size: 1.5rem; }

.logo-text span { color: var(--gold); }

.main-nav {
  display: flex;
  gap: 32px;
}

.main-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: color var(--transition);
}

.main-nav a:hover { color: var(--gold); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(17,28,48,0.88) 0%, rgba(17,28,48,0.55) 60%, rgba(17,28,48,0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 3px;
  margin-bottom: 20px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero-content h1 em {
  color: var(--gold);
  font-style: italic;
}

.hero-content p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  max-width: 520px;
}

.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: var(--radius);
  transition: background var(--transition), transform var(--transition);
  letter-spacing: 0.3px;
}

.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
}

/* ---- SECTION TITLE ---- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 40px;
  position: relative;
  padding-bottom: 16px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 56px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
}

/* ---- CATEGORÍAS ---- */
.categorias {
  background: var(--off-white);
  padding: 64px 0;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px 12px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}

.cat-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.cat-icon { font-size: 2rem; }

.cat-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}

/* ---- ARTÍCULOS ---- */
.articulos {
  padding: 80px 0;
  background: var(--white);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.article-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.article-card.featured {
  grid-column: span 1;
}

.card-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .card-img img {
  transform: scale(1.04);
}

.card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-navy { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); }
.bg-gold { background: linear-gradient(135deg, #8B6914 0%, var(--gold) 100%); }
.bg-slate { background: linear-gradient(135deg, #2D3748 0%, var(--slate) 100%); }
.bg-teal { background: linear-gradient(135deg, #0D4F4F 0%, var(--teal) 100%); }

.placeholder-icon { font-size: 3.5rem; opacity: 0.9; }

.card-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 3px;
}

.card-body {
  padding: 22px 22px 20px;
}

.card-body h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 10px;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 14px;
}

.read-more {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.3px;
  transition: color var(--transition);
}

.article-card:hover .read-more { color: var(--navy); }

/* ---- INFO BANNER ---- */
.info-banner {
  background: var(--navy);
  padding: 72px 0;
}

.banner-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

.banner-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
}

.banner-text p {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
}

.banner-stats {
  display: flex;
  gap: 40px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  text-align: center;
  max-width: 80px;
  line-height: 1.3;
}

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy-dark);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo {
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.6;
  max-width: 260px;
}

.footer-links h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-links ul { list-style: none; }

.footer-links li { margin-bottom: 10px; }

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--white); }

.footer-bottom {
  padding: 20px 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ---- ARTICLE PAGE ---- */
.article-hero {
  background: var(--navy);
  padding: 64px 0 48px;
}

.article-breadcrumb {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin-bottom: 20px;
}

.article-breadcrumb a { color: var(--gold); }
.article-breadcrumb a:hover { color: var(--gold-light); }

.article-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  max-width: 760px;
  margin-bottom: 16px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.55);
}

.article-meta .tag {
  background: var(--gold);
  color: var(--navy-dark);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
}

.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  padding: 56px 0 80px;
  align-items: start;
}

.article-featured-img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-lg);
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--gray-800);
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--navy);
  margin: 40px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-200);
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 12px;
}

.article-content p { margin-bottom: 20px; }

.article-content ul, .article-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

.article-content li { margin-bottom: 8px; }

.article-content strong { color: var(--navy); font-weight: 600; }

.info-box {
  background: var(--off-white);
  border-left: 4px solid var(--gold);
  padding: 20px 24px;
  border-radius: 0 8px 8px 0;
  margin: 28px 0;
}

.info-box p { margin: 0; font-size: 0.95rem; }

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.95rem;
}

.comparison-table th {
  background: var(--navy);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.comparison-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gray-200);
}

.comparison-table tr:nth-child(even) td { background: var(--off-white); }

.comparison-table .check { color: #2D6A4F; font-weight: 700; }
.comparison-table .cross { color: #C0392B; font-weight: 700; }

/* SIDEBAR */
.article-sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-widget {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-widget h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold);
}

.sidebar-links { list-style: none; }

.sidebar-links li { margin-bottom: 10px; }

.sidebar-links a {
  font-size: 0.9rem;
  color: var(--gray-600);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-links a::before {
  content: '→';
  color: var(--gold);
  font-weight: 700;
}

.sidebar-links a:hover { color: var(--navy); }

.toc-list { list-style: none; counter-reset: toc; }

.toc-list li {
  counter-increment: toc;
  margin-bottom: 8px;
}

.toc-list a {
  font-size: 0.88rem;
  color: var(--gray-600);
  transition: color var(--transition);
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.toc-list a::before {
  content: counter(toc) ".";
  color: var(--gold);
  font-weight: 700;
  min-width: 18px;
}

.toc-list a:hover { color: var(--navy); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .banner-inner { grid-template-columns: 1fr; gap: 32px; }
  .banner-stats { justify-content: flex-start; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 16px 24px 24px;
    gap: 16px;
    box-shadow: var(--shadow-lg);
  }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .banner-stats { flex-wrap: wrap; gap: 24px; }
  .hero { min-height: 480px; }
}

@media (max-width: 480px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .banner-stats { gap: 20px; }
}
