/* ============================================================
   MUSEO DE SAN FRANCISCO — CSS desde cero 2025
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700;900&display=swap');

/* ── RESET & VARIABLES ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --rojo:   #eb2c33;
  --oscuro: #1a1a2e;
  --medio:  #2c3e50;
  --oro:    #f5c518;
  --gris:   #f8f9fa;
  --texto:  #444;
  --borde:  #e8e8e8;
  --nav-h:  116px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Raleway', sans-serif;
  font-size: 15px;
  color: var(--texto);
  background: #fff;
  padding-top: var(--nav-h);
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--rojo); text-decoration: none; }
a:hover { color: #c0111a; }
ul  { list-style: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── HEADER ──────────────────────────────────────────────── */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: var(--oscuro);
  box-shadow: 0 2px 16px rgba(0,0,0,.35);
}

.top-bar {
  border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 12px;
}
.top-bar .container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  padding-top: 9px;
  padding-bottom: 9px;
}
.top-bar a { color: rgba(255,255,255,.55); }
.top-bar a:hover { color: var(--oro); }
.top-bar i { color: var(--rojo); margin-right: 4px; }
.top-bar .social { display: flex; gap: 12px; }

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 20px;
  max-width: 1100px;
  margin: 0 auto;
}

.navbar-brand {
  background: var(--rojo);
  padding: 6px 12px;
  border-radius: 3px;
  flex-shrink: 0;
}
.navbar-brand img { height: 38px; width: auto; }

/* ── NAV MENU ─────────────────────────────────────────────── */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-menu > li > a {
  display: block;
  padding: 8px 13px;
  color: rgba(255,255,255,.85);
  font-size: 13px;
  font-weight: 600;
  border-radius: 3px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li.active > a {
  background: var(--rojo);
  color: #fff;
}

/* ── DROPDOWN ─────────────────────────────────────────────── */
.nav-menu > li.has-dropdown { position: relative; }

.nav-menu > li.has-dropdown > a::after {
  content: ' ▾';
  font-size: 10px;
  opacity: .6;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 215px;
  background: var(--oscuro);
  border-top: 2px solid var(--rojo);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
  z-index: 600;
  padding: 4px 0;
  /* NO transforms, NO transitions that could interfere with pointer events */
}

.dropdown-menu li a {
  display: block;
  padding: 10px 18px;
  color: rgba(255,255,255,.75);
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.dropdown-menu li:last-child a { border-bottom: none; }
.dropdown-menu li a:hover { background: rgba(235,44,51,.2); color: var(--oro); }

/* open class added by JS */
.nav-menu > li.has-dropdown.is-open > .dropdown-menu { display: block; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── PAGE HERO ────────────────────────────────────────────── */
.page-hero {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: var(--medio);
}
.page-hero img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
}
.page-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.55));
}
.page-hero-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 1; text-align: center; color: #fff;
}
.page-hero-content h1 {
  font-size: 30px; font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
  margin-bottom: 10px;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,.65);
}
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: var(--oro); }

/* ── MAIN CONTENT ─────────────────────────────────────────── */
.page-content { padding: 50px 0 60px; }

.page-content h2 {
  font-size: 22px; font-weight: 700;
  color: var(--medio); margin-bottom: 22px;
  padding-bottom: 12px; border-bottom: 2px solid var(--borde);
}
.page-content h3 {
  font-size: 17px; font-weight: 700;
  color: var(--medio); margin: 26px 0 8px;
}
.page-content p {
  line-height: 1.85; color: #555;
  margin-bottom: 16px; text-align: left;
}
.page-content em { font-style: italic; color: #777; }

.content-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px; align-items: start;
  margin-bottom: 36px;
}
.content-grid img {
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,.12);
  width: 100%;
}

/* ── HOME HERO ────────────────────────────────────────────── */
.hero {
  position: relative;
  height: calc(100vh - var(--nav-h));
  min-height: 480px;
  overflow: hidden;
  background: var(--oscuro);
}
.hero-slide {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity .9s ease;
}
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.45);
}
.hero-content {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 0 24px;
}
.hero-content h2 {
  font-size: clamp(26px, 5vw, 54px);
  font-weight: 900; text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
  margin-bottom: 10px;
}
.hero-content p {
  font-size: clamp(13px, 2vw, 17px);
  color: rgba(255,255,255,.75);
  margin-bottom: 30px; letter-spacing: 1px;
}
.hero-dots {
  position: absolute; bottom: 24px;
  left: 0; right: 0; z-index: 2;
  display: flex; justify-content: center; gap: 8px;
}
.hero-dots button {
  width: 10px; height: 10px;
  border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.35);
  transition: background .2s;
}
.hero-dots button.active { background: var(--rojo); }

.btn {
  display: inline-block;
  padding: 12px 30px; border-radius: 4px;
  font-weight: 700; font-size: 14px;
  cursor: pointer; border: none;
  transition: background .2s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--rojo); color: #fff; }
.btn-primary:hover { background: #c0111a; color: #fff; }
.btn-outline {
  background: transparent; color: #fff;
  border: 2px solid rgba(255,255,255,.55);
}
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ── HOME SECTIONS ───────────────────────────────────────── */
.section { padding: 60px 0; }
.section-alt { background: var(--gris); }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 26px; font-weight: 700; color: var(--medio); margin-bottom: 8px; }
.section-title h2 span { color: var(--rojo); }
.section-title p { color: #888; font-size: 14px; }

.info-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.info-card {
  background: #fff; border: 1px solid var(--borde);
  border-radius: 8px; padding: 28px 22px; text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.info-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.09); transform: translateY(-3px); }
.info-card .icon { font-size: 34px; color: var(--rojo); margin-bottom: 12px; }
.info-card h3 { font-size: 16px; font-weight: 700; color: var(--medio); margin-bottom: 8px; }
.info-card p  { font-size: 13px; color: #777; line-height: 1.6; }

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px,1fr)); gap: 24px; }
.news-card {
  background: #fff; border: 1px solid var(--borde);
  border-radius: 8px; overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.news-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-3px); }
.news-card img { width: 100%; height: 175px; object-fit: cover; }
.news-card-body { padding: 16px 18px; }
.news-date { font-size: 11px; color: #aaa; margin-bottom: 5px; }
.news-card-body h3 { font-size: 15px; font-weight: 700; color: var(--medio); margin-bottom: 7px; line-height: 1.4; }
.news-card-body p  { font-size: 13px; color: #666; line-height: 1.6; }
.read-more { font-size: 12px; color: var(--rojo); font-weight: 700; margin-top: 10px; display: inline-block; }

/* ── PRICING ─────────────────────────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 28px; }
.price-card {
  background: #fff; border: 2px solid var(--borde);
  border-radius: 10px; overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.price-card:hover { border-color: var(--rojo); transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.1); }
.price-card.featured { border-color: var(--rojo); }
.price-card-head {
  background: var(--medio); color: #fff;
  padding: 11px 16px; font-size: 11px;
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
}
.price-card.featured .price-card-head { background: var(--rojo); }
.price-card-amount {
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--borde);
  display: flex; align-items: baseline; gap: 2px;
}
.price-card-amount .sym { font-size: 17px; color: #999; font-weight: 600; }
.price-card-amount .num { font-size: 50px; font-weight: 900; color: var(--medio); line-height: 1; }
.price-card.featured .price-card-amount .num { color: var(--rojo); }
.price-card-amount .per { font-size: 12px; color: #aaa; }
.price-card ul { padding: 12px 16px; }
.price-card ul li {
  padding: 5px 0 5px 16px; font-size: 13px; color: #555;
  border-bottom: 1px solid #f5f5f5; position: relative;
}
.price-card ul li:last-child { border-bottom: none; }
.price-card ul li::before { content:'✓'; position:absolute; left:0; color:#27ae60; font-weight:700; }
.price-card-cta {
  display: block; margin: 0 16px 16px;
  padding: 9px; text-align: center; border-radius: 4px;
  font-size: 12px; font-weight: 700;
  background: var(--gris); color: #555; border: 1px solid var(--borde);
  transition: background .2s, color .2s;
}
.price-card-cta:hover, .price-card.featured .price-card-cta {
  background: var(--rojo); color: #fff; border-color: var(--rojo);
}

/* ── HORARIOS ─────────────────────────────────────────────── */
.horario-block { background: #fff; border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.horario-head { background: var(--medio); color: #fff; padding: 12px 18px; }
.horario-head h3 { font-size: 15px; font-weight: 700; color: #fff; margin: 0; }
.horario-head p { font-size: 12px; color: rgba(255,255,255,.65); margin: 2px 0 0; }
table.horarios { width: 100%; border-collapse: collapse; font-size: 14px; }
table.horarios th { background: var(--gris); padding: 9px 16px; text-align: left; font-weight: 600; color: var(--medio); border-bottom: 1px solid var(--borde); }
table.horarios td { padding: 9px 16px; border-bottom: 1px solid var(--borde); }
table.horarios tr:last-child td { border-bottom: none; }
.horario-note {
  background: #fffde7; border-left: 4px solid var(--oro);
  padding: 11px 16px; font-size: 13px; color: #555; border-radius: 0 4px 4px 0; margin: 4px 0;
}

/* ── LOCATION ─────────────────────────────────────────────── */
.location-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 36px; align-items: start; }
.map-wrap iframe { width: 100%; height: 400px; border-radius: 8px; border: 0; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
.location-boxes { display: flex; flex-direction: column; gap: 16px; }
.location-box { background: var(--oscuro); color: #fff; border-radius: 8px; padding: 18px 20px; }
.location-box h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--oro); margin-bottom: 8px; }
.location-box p { font-size: 13px; color: rgba(255,255,255,.65); line-height: 1.7; }
.location-box a { color: rgba(255,255,255,.65); }
.location-box a:hover { color: var(--oro); }
.location-box i { color: var(--rojo); margin-right: 5px; }

/* ── FOOTER ──────────────────────────────────────────────── */
#footer { background: var(--oscuro); padding: 36px 0 20px; }
.footer-inner {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 30px; align-items: center;
  border-top: 1px solid rgba(255,255,255,.09);
  padding-top: 28px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 2px; }
.footer-links a { color: rgba(255,255,255,.4); font-size: 12px; padding: 2px 6px; }
.footer-links a:hover { color: var(--oro); }
.footer-links a + a::before { content:'·'; color: rgba(255,255,255,.2); margin-right: 6px; }
.footer-addr { color: rgba(255,255,255,.3); font-size: 11px; margin-top: 8px; line-height: 1.8; }
.footer-addr a { color: rgba(255,255,255,.3); }
.footer-logo-wrap { text-align: center; }
.footer-logo-wrap img { height: 42px; opacity: .55; filter: brightness(0) invert(1); margin: 0 auto 14px; }
.footer-top-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.4);
  font-size: 13px; margin: 0 auto;
  transition: background .2s, color .2s;
}
.footer-top-btn:hover { background: var(--rojo); color: #fff; }
.footer-right { text-align: right; }
.footer-social { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 12px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.07); color: rgba(255,255,255,.45);
  display: flex; align-items: center; justify-content: center; font-size: 14px;
  transition: background .2s, color .2s;
}
.footer-social a:hover { background: var(--rojo); color: #fff; }
.footer-copy { color: rgba(255,255,255,.28); font-size: 11px; }

/* ── COOKIE BANNER ───────────────────────────────────────── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #222; color: #fff; padding: 13px 22px;
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  z-index: 9998; font-size: 13px;
  box-shadow: 0 -2px 12px rgba(0,0,0,.3);
}
#cookie-banner a { color: var(--oro); }
.cookie-btns { display: flex; gap: 8px; margin-left: auto; }
.cookie-btns button { padding: 7px 16px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: 700; }
#cookie-accept { background: var(--oro); color: #222; }
#cookie-reject { background: #555; color: #fff; }

/* ── UTILITIES ────────────────────────────────────────────── */
.gap-40 { height: 40px; }
.gap-60 { height: 60px; }
.text-center { text-align: center; }
.info-note {
  background: var(--gris); border-left: 4px solid var(--oro);
  border-radius: 0 6px 6px 0; padding: 14px 18px;
  font-size: 13px; color: #555; margin-top: 20px;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: repeat(2,1fr); }
  .content-grid  { grid-template-columns: 1fr; }
  .info-grid     { grid-template-columns: repeat(2,1fr); }
  .location-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .top-bar { display: none; }

  .nav-menu {
    display: none; flex-direction: column;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    background: var(--oscuro); padding: 8px 0 20px; gap: 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
    z-index: 499;
  }
  .nav-menu.is-open { display: flex; }
  .nav-menu > li > a { padding: 12px 20px; border-radius: 0; }

  .dropdown-menu {
    position: static; display: none;
    box-shadow: none; border-top: none; border-radius: 0;
    background: rgba(255,255,255,.05); padding: 0;
    z-index: auto;
  }
  .nav-menu > li.has-dropdown.is-open > .dropdown-menu { display: block; }
  .dropdown-menu li a { padding: 10px 20px 10px 34px; }

  .nav-toggle { display: flex; }
  .pricing-grid { grid-template-columns: repeat(2,1fr); }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-links { justify-content: center; }
  .footer-social { justify-content: center; }
  .footer-right { text-align: center; }
  .info-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .page-hero { height: 160px; }
  .page-hero-content h1 { font-size: 20px; }
}

/* ── BIBLIOTECA DOC CARDS ────────────────────────────────── */
.doc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--borde);
  border-radius: 8px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, border-color .2s, transform .15s;
}
.doc-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  border-color: var(--rojo);
  transform: translateY(-2px);
  color: inherit;
}
.doc-icon-wrap {
  width: 40px; height: 46px;
  background: var(--rojo);
  border-radius: 5px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #fff; flex-shrink: 0;
  font-size: 16px; gap: 1px;
}
.doc-icon-wrap span {
  font-size: 7px; font-weight: 700;
  letter-spacing: .5px;
  background: var(--oscuro);
  padding: 1px 3px; border-radius: 2px;
}
.doc-info { flex: 1; min-width: 0; }
.doc-title {
  font-size: 13px; font-weight: 600;
  color: var(--medio); line-height: 1.4;
  margin: 0 0 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.doc-meta { font-size: 11px; color: #aaa; margin: 0; }
.doc-meta i { margin-right: 3px; }
.doc-dl {
  flex-shrink: 0; color: #ccc;
  font-size: 14px;
  transition: color .2s;
}
.doc-card:hover .doc-dl { color: var(--rojo); }
