/* ============================================================
   CASOLIDARIO MOVILIDAD — Portal Informativo de Movilidad
   ============================================================ */

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

:root {
  --navy:   #0d2117;
  --navy2:  #163521;
  --gold:   #43a047;
  --gold2:  #66bb6a;
  --white:  #ffffff;
  --light:  #f1f8f2;
  --text:   #1a2e1d;
  --muted:  #5a7060;
  --border: #d8ead9;
  --red:    #ef4444;
  --green:  #2e7d32;
  --radius: 12px;
  --shadow: 0 2px 16px rgba(0,0,0,.07);
  --shadow2: 0 8px 32px rgba(0,0,0,.13);
  --font:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.65; }
a    { text-decoration: none; color: inherit; }
img  { max-width: 100%; display: block; }
ul   { list-style: none; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section    { padding: 72px 0; }
.section-sm { padding: 44px 0; }
.section-xs { padding: 24px 0; }

.section-label {
  display: inline-block;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
  background: rgba(67,160,71,.1); border: 1px solid rgba(67,160,71,.25);
  padding: 4px 12px; border-radius: 20px; margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--navy); line-height: 1.2; margin-bottom: 12px;
}
.section-desc { color: var(--muted); font-size: 1.05rem; max-width: 580px; }
.section-header { text-align: center; }
.section-header .section-desc { margin: 0 auto 48px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 26px; border-radius: var(--radius);
  font-size: .9rem; font-weight: 600; cursor: pointer;
  border: 2px solid transparent; transition: all .22s;
}
.btn-primary { background: var(--gold); color: var(--white); }
.btn-primary:hover { background: var(--gold2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(67,160,71,.35); }
.btn-outline { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--white); }
.btn-dark    { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: var(--navy2); }
.btn-sm { padding: 8px 18px; font-size: .82rem; }

.header {
  background: var(--navy);
  position: sticky; top: 0; z-index: 900;
  border-bottom: 2px solid rgba(67,160,71,.2);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 66px; }

.logo { display: flex; align-items: center; gap: 10px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--gold); display: flex; align-items: center; justify-content: center;
}
.logo-mark svg { width: 20px; fill: var(--white); }
.logo-name  { font-size: 1.05rem; font-weight: 800; color: var(--white); letter-spacing: .01em; }
.logo-sub   { font-size: .65rem; color: var(--gold2); letter-spacing: .1em; text-transform: uppercase; margin-top: 1px; display: block; }

.nav-menu { display: flex; align-items: center; gap: 4px; }
.nav-menu a {
  color: rgba(255,255,255,.8); padding: 8px 13px;
  border-radius: 7px; font-size: .88rem; font-weight: 500; transition: all .18s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--white); background: rgba(255,255,255,.09); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 4px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: all .3s; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

.hero {
  position: relative; overflow: hidden;
  min-height: 560px; display: flex; align-items: flex-end;
  background: var(--navy);
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-image: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?auto=format&fit=crop&w=1600&q=80');
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(13,33,23,.95) 0%, rgba(13,33,23,.55) 60%, rgba(13,33,23,.25) 100%);
}
.hero-content {
  position: relative; z-index: 1;
  padding: 80px 0 60px; max-width: 680px;
}
.hero-content h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); font-weight: 800; color: var(--white); line-height: 1.12; margin-bottom: 16px; }
.hero-content h1 em { font-style: normal; color: var(--gold2); }
.hero-content p { font-size: 1.1rem; color: rgba(255,255,255,.78); margin-bottom: 30px; max-width: 520px; }
.hero-meta { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; margin-top: 32px; }
.hero-meta-item { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.65); font-size: .82rem; }
.hero-meta-item svg { width: 14px; fill: var(--gold2); }

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

.article-card {
  border-radius: 16px; overflow: hidden;
  background: var(--white); border: 1px solid var(--border);
  transition: all .28s; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.article-card:hover { transform: translateY(-5px); box-shadow: var(--shadow2); border-color: rgba(67,160,71,.35); }

.article-thumb {
  height: 210px; overflow: hidden; position: relative; background: var(--navy2);
}
.article-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s; display: block;
}
.article-card:hover .article-thumb img { transform: scale(1.04); }
.article-cat {
  position: absolute; top: 14px; left: 14px;
  background: var(--gold); color: var(--white);
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 20px;
}

.article-body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.article-title {
  font-size: 1.02rem; font-weight: 700; color: var(--navy);
  line-height: 1.35; margin-bottom: 10px;
}
.article-excerpt { font-size: .86rem; color: var(--muted); line-height: 1.65; flex: 1; margin-bottom: 16px; }
.article-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border);
  font-size: .78rem; color: var(--muted);
}
.article-read-more { color: var(--gold); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.article-read-more:hover { color: var(--gold2); }

.article-featured {
  border-radius: 20px; overflow: hidden;
  display: grid; grid-template-columns: 1.2fr 1fr;
  background: var(--white); border: 1px solid var(--border);
  box-shadow: var(--shadow); margin-bottom: 48px;
  transition: all .28s;
}
.article-featured:hover { box-shadow: var(--shadow2); }
.article-featured .article-thumb { height: 100%; min-height: 320px; }
.article-featured .article-body { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.article-featured .article-title { font-size: 1.5rem; margin-bottom: 14px; }
.article-featured .article-excerpt { font-size: .95rem; margin-bottom: 24px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.info-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: 14px; padding: 28px 22px; text-align: center;
  transition: all .25s; box-shadow: var(--shadow);
}
.info-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow2); }
.info-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}
.info-icon svg { width: 26px; fill: var(--gold2); }
.info-title { font-size: .95rem; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.info-desc  { font-size: .84rem; color: var(--muted); line-height: 1.6; }

.article-page-hero {
  background: var(--navy); color: var(--white);
  padding: 64px 0 52px; position: relative; overflow: hidden;
}
.article-page-hero::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(67,160,71,.06) 0%, transparent 60%);
}
.article-page-hero .container { position: relative; max-width: 820px; }
.article-page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.article-page-hero p  { color: rgba(255,255,255,.72); font-size: 1.05rem; }
.article-page-meta   { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; font-size: .82rem; color: rgba(255,255,255,.55); }
.article-page-meta span { display: flex; align-items: center; gap: 5px; }

.article-main-img {
  width: 100%; max-height: 480px; object-fit: cover;
  border-radius: 16px; margin-bottom: 40px;
  box-shadow: var(--shadow2);
}

.article-content { max-width: 820px; }
.article-content h2 {
  font-size: 1.5rem; font-weight: 800; color: var(--navy);
  margin: 40px 0 14px; padding-bottom: 10px;
  border-bottom: 3px solid var(--gold);
}
.article-content h3 { font-size: 1.15rem; font-weight: 700; color: var(--navy2); margin: 28px 0 10px; }
.article-content p  { color: var(--muted); line-height: 1.82; margin-bottom: 18px; font-size: 1.02rem; }
.article-content ul { list-style: none; padding: 0; margin-bottom: 20px; }
.article-content ul li {
  display: flex; gap: 10px; align-items: flex-start;
  color: var(--muted); font-size: 1rem; line-height: 1.75; margin-bottom: 8px;
}
.article-content ul li::before { content: '▸'; color: var(--gold); font-size: .9rem; flex-shrink: 0; margin-top: 3px; }
.article-content strong { color: var(--text); font-weight: 700; }

.callout {
  background: linear-gradient(135deg, var(--navy), var(--navy2));
  border-left: 4px solid var(--gold);
  border-radius: 12px; padding: 22px 24px; margin: 28px 0;
  color: rgba(255,255,255,.85); font-size: .95rem; line-height: 1.7;
}
.callout strong { color: var(--gold2); }

.legal-header { background: var(--navy); color: var(--white); padding: 56px 0 44px; }
.legal-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; }
.legal-header p  { color: rgba(255,255,255,.65); margin-top: 8px; font-size: .95rem; }
.legal-date {
  display: inline-block; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12); border-radius: 6px;
  padding: 6px 14px; font-size: .8rem; color: rgba(255,255,255,.55); margin-top: 14px;
}

.legal-body { padding: 60px 0; }
.legal-content { max-width: 820px; }
.legal-content h2 {
  font-size: 1.2rem; font-weight: 700; color: var(--navy);
  margin: 36px 0 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
}
.legal-content h3 { font-size: 1rem; font-weight: 700; color: var(--navy2); margin: 22px 0 8px; }
.legal-content p  { color: var(--muted); line-height: 1.8; margin-bottom: 14px; font-size: .95rem; }
.legal-content ul { list-style: disc; padding-left: 22px; color: var(--muted); font-size: .95rem; line-height: 1.8; margin-bottom: 14px; }
.legal-content ul li { margin-bottom: 6px; }
.legal-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .9rem; }
.legal-content table th, .legal-content table td { padding: 10px 14px; border: 1px solid var(--border); text-align: left; }
.legal-content table th { background: var(--navy); color: var(--white); }
.legal-content table tr:nth-child(even) td { background: var(--light); }

.about-hero { background: var(--navy); color: var(--white); padding: 72px 0; }
.about-hero h1 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; margin-bottom: 16px; }
.about-hero p  { color: rgba(255,255,255,.72); font-size: 1.1rem; max-width: 540px; }

.footer { background: #040d07; color: rgba(255,255,255,.6); padding: 56px 0 0; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.footer-brand-desc { font-size: .86rem; line-height: 1.8; margin-top: 14px; color: rgba(255,255,255,.45); }
.footer-col h5 {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--white); margin-bottom: 16px;
}
.footer-col a { display: block; font-size: .86rem; color: rgba(255,255,255,.5); margin-bottom: 9px; transition: color .18s; }
.footer-col a:hover { color: var(--gold2); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 0; font-size: .8rem; flex-wrap: wrap; gap: 8px;
}
.footer-bottom a { color: var(--gold2); }

#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: rgba(4,13,7,.97);
  border-top: 3px solid var(--gold);
  padding: 18px 0; display: none;
  box-shadow: 0 -8px 40px rgba(0,0,0,.4);
  backdrop-filter: blur(8px);
}
.cookie-wrap {
  max-width: 1180px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: space-between;
}
.cookie-text { flex: 1; min-width: 260px; color: rgba(255,255,255,.82); font-size: .88rem; line-height: 1.6; }
.cookie-text strong { color: var(--white); }
.cookie-text a { color: var(--gold2); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }

#cookie-modal {
  display: none; position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,.65); align-items: center; justify-content: center; padding: 20px;
}
#cookie-modal.open { display: flex; }
.cookie-modal-box {
  background: var(--white); border-radius: 18px;
  padding: 36px; max-width: 530px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
}
.cookie-modal-box h3 { color: var(--navy); font-size: 1.15rem; font-weight: 800; margin-bottom: 22px; }
.cookie-opt {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 10px;
}
.cookie-opt input[type=checkbox] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex-shrink: 0; }
.cookie-opt-text strong { display: block; font-size: .88rem; color: var(--navy); margin-bottom: 2px; }
.cookie-opt-text span   { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.cookie-opt.locked      { opacity: .55; }
.cookie-modal-footer    { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; flex-wrap: wrap; }

#cm-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 99999;
  background: var(--navy); color: var(--white);
  padding: 14px 20px; border-radius: 10px; font-size: .88rem; font-weight: 500;
  border-left: 4px solid var(--gold); box-shadow: var(--shadow2);
  opacity: 0; transform: translateY(12px); transition: all .32s;
  max-width: 300px; line-height: 1.5;
}

@media (max-width: 960px) {
  .articles-grid       { grid-template-columns: repeat(2, 1fr); }
  .article-featured    { grid-template-columns: 1fr; }
  .article-featured .article-thumb { min-height: 240px; }
  .footer-grid         { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .nav-menu {
    display: none; position: absolute; top: 66px; left: 0; right: 0;
    background: var(--navy); flex-direction: column;
    padding: 12px 16px; gap: 2px;
    border-bottom: 2px solid rgba(67,160,71,.2);
  }
  .nav-menu.open    { display: flex; }
  .nav-toggle       { display: flex; }
  .articles-grid    { grid-template-columns: 1fr; }
  .footer-grid      { grid-template-columns: 1fr; }
  .cookie-wrap      { flex-direction: column; }
  .hero             { min-height: 440px; }
  .hero-content     { padding: 60px 0 40px; }
}
