/* ============================================================
   Dushi v3 — Chrome (header · topbar · footer)
   Sistema "Editorial" — tinta / papel / rojo del logo
   Se carga en TODAS las páginas v2, después de v2.css.
   Solo re-estila el marco (topbar, header, footer); no toca el
   cuerpo de las páginas internas, que siguen usando v2.css.
   ============================================================ */

:root {
  --paper: #F7F1E6;
  --paper-soft: #FCF9F4;
  --ink: #171310;
  --ink-soft: #4A423B;
  --red: #D23A2A;
  --red-dark: #B02E20;
  --line: #DED3C2;
  --sand: #EAE0D0;
  --gold: #E0A32E;
  --chrome-max: 1200px;
  --chrome-header-h: 72px;
}

/* ---------- Topbar ---------- */
.topbar {
  background: var(--ink);
  color: rgba(247, 241, 230, .82);
  font-size: 12px;
  letter-spacing: .04em;
  padding: 9px 0;
}
.topbar .container {
  max-width: var(--chrome-max);
  margin-inline: auto;
  padding-inline: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 12px;
  text-align: center;
}
.topbar strong { color: var(--paper); font-weight: 600; }
.topbar .tb-dot {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--red); flex: 0 0 auto;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 241, 230, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  max-width: var(--chrome-max);
  margin-inline: auto;
  padding-inline: 24px;
  height: var(--chrome-header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  text-decoration: none !important;
  font-weight: 700; color: var(--ink);
}
.brand img { height: 40px; width: auto; }
.brand-name {
  font-size: 16px; letter-spacing: .12em; line-height: 1;
}
.brand-name small {
  display: block; font-size: 10px; letter-spacing: .34em;
  color: var(--red); font-weight: 600; margin-top: 3px;
}

.menu-toggle {
  display: none; margin-left: auto;
  background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border-radius: 6px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .2s; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.main-nav > a,
.nav-dropdown > button {
  padding: 10px 13px; border-radius: 6px;
  color: var(--ink-soft); font-weight: 600; font-size: 13.5px;
  letter-spacing: .03em; background: none; border: 0; cursor: pointer; font-family: inherit;
  text-decoration: none !important;
}
.main-nav > a:hover,
.nav-dropdown > button:hover { color: var(--ink); text-decoration: none; }
.main-nav > a.active { color: var(--ink); }
.main-nav > a:hover { box-shadow: inset 0 -2px 0 var(--red); }

.nav-dropdown { position: relative; }
.nav-dropdown > button::after { content: '▾'; font-size: 10px; margin-left: 5px; color: var(--red); }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px;
  background: var(--paper-soft); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 18px 50px rgba(23, 19, 16, .16); padding: 8px; display: none;
}
.nav-dropdown.open .dropdown-menu,
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 11px 14px; border-radius: 6px; color: var(--ink-soft); font-weight: 500; font-size: 14px; text-decoration: none !important; }
.dropdown-menu a:hover { background: var(--sand); color: var(--ink); text-decoration: none; }
.dropdown-menu a strong { color: var(--ink); }

.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-soft); padding: 0 6px; }
.lang-switch a { color: var(--ink-soft); font-weight: 600; text-decoration: none; }
.lang-switch a.active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.lang-switch .sep { color: var(--line); }

.header-cta {
  margin-left: 10px;
  background: var(--red); color: #fff;
  padding: 13px 22px; border-radius: 6px;
  font-weight: 700; font-size: 13.5px; letter-spacing: .04em;
  box-shadow: none; border: 0;
  transition: background .15s ease, transform .15s ease;
}
.header-cta:hover { background: var(--red-dark); color: #fff; box-shadow: none; transform: translateY(-1px); }

/* Ocultar topbar al hacer scroll */
body.scrolled .topbar { display: none; }

/* ---------- Header móvil ---------- */
@media (max-width: 900px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed; inset: var(--chrome-header-h) 0 auto 0; z-index: 99;
    background: var(--paper-soft);
    flex-direction: column; align-items: stretch;
    padding: 18px 24px 28px; gap: 2px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 30px 60px rgba(23, 19, 16, .22);
    display: none;
    overflow-y: auto; max-height: calc(100vh - var(--chrome-header-h));
  }
  .main-nav.open { display: flex; }
  .main-nav > a, .nav-dropdown > button {
    padding: 15px 4px; text-align: left; font-size: 17px;
    border-bottom: 1px solid var(--line); border-radius: 0; color: var(--ink);
  }
  .main-nav > a:hover { box-shadow: none; color: var(--red); }
  .dropdown-menu { position: static; box-shadow: none; border: 0; padding: 0 0 4px 12px; background: none; }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .dropdown-menu a { font-size: 15.5px; padding: 11px 4px; }
  .header-cta { margin: 14px 0 0; text-align: center; }
  .lang-switch { padding: 14px 4px; font-size: 14px; }
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(247, 241, 230, .74);
  padding-top: 64px;
}
.site-footer .container { max-width: var(--chrome-max); margin-inline: auto; padding-inline: 24px; }
.site-footer a { color: rgba(247, 241, 230, .8); text-decoration: none; }
.site-footer a:hover { color: var(--paper); }
.site-footer ul { list-style: none; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-grid h4 {
  color: var(--paper); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 18px; font-weight: 600;
}
.footer-grid p, .footer-grid li { font-size: 14px; line-height: 1.7; margin-bottom: 9px; }
.footer-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: var(--paper); margin-bottom: 16px; }
.footer-brand img { height: 42px; width: auto; filter: brightness(0) invert(1); }
.footer-brand .brand-name { color: var(--paper); }
.footer-brand .brand-name small { color: var(--red); }
.footer-about { font-size: 14px; line-height: 1.7; color: rgba(247, 241, 230, .66); max-width: 34ch; }

.social-links { display: flex; gap: 10px; margin-top: 18px; }
.social-links a {
  display: inline-flex; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(247, 241, 230, .08); align-items: center; justify-content: center;
  color: var(--paper); transition: background .15s ease, color .15s ease;
}
.social-links a:hover { background: var(--red); color: #fff; }

.contact-line { display: flex; gap: 10px; align-items: flex-start; }
.contact-line svg { flex: 0 0 auto; margin-top: 3px; color: var(--red); }
.contact-line a { color: rgba(247, 241, 230, .8); }

.footer-map { padding-bottom: 40px; }
.footer-map h4 {
  color: var(--paper); text-align: center; font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; margin-bottom: 18px; font-weight: 600;
}
.map-facade {
  border-radius: 8px; overflow: hidden; height: 360px; position: relative;
  cursor: pointer; background: #1c1916; border: 1px solid rgba(247, 241, 230, .14);
}
.map-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .62; }
.map-facade .cta {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--paper); padding: 13px 28px; border-radius: 6px;
  font-weight: 700; color: var(--ink); font-size: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

.footer-legal {
  font-size: 12.5px; color: rgba(247, 241, 230, .5); line-height: 1.6;
  padding: 0 0 24px; border-bottom: 1px solid rgba(247, 241, 230, .12);
}
.footer-legal strong { color: rgba(247, 241, 230, .68); }
.footer-bottom {
  padding: 22px 0; font-size: 12.5px; color: rgba(247, 241, 230, .5);
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between;
}
.footer-bottom a { color: rgba(247, 241, 230, .6); }
.footer-bottom a:hover { color: var(--paper); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; }
}

/* ---------- Accesibilidad ---------- */
.chrome a:focus-visible,
.site-header a:focus-visible,
.site-footer a:focus-visible,
.menu-toggle:focus-visible,
.nav-dropdown > button:focus-visible {
  outline: 2px solid var(--red); outline-offset: 2px; border-radius: 4px;
}
