/* ALDENA 4.2 · Menú fijo en toda la web + dos columnas Art Déco sin deformación */
:root { --ald-header-height: 168px; --ald-column-width: clamp(100px, 8.2vw, 158px); }
html { scroll-padding-top: calc(var(--ald-header-height) + 18px) !important; overflow-x: clip; }
body { overflow-x: clip !important; }
[id] { scroll-margin-top: calc(var(--ald-header-height) + 16px); }

/* Sticky on all templates: overrides body>header {position:relative} and the legacy
   .ald-deco-header {position:relative} declarations. No script needed for stickiness. */
body > header.site-header.ald-deco-header {
 position: sticky !important; position: -webkit-sticky !important;
 top: 0 !important; z-index: 500 !important;
 isolation: auto !important;
 width: 100%; max-width: 100%;
 background: #061120 !important;
 box-shadow: 0 8px 30px #0009, 0 1px 0 #c58d42 !important;
}
.ald-deco-header .ald-top-rail { box-sizing: border-box; }
.ald-deco-header .brand { max-width: min(860px,calc(100% - 40px)); }
.ald-deco-header .brand-words strong { letter-spacing: .10em !important; }

/* Respect WordPress admin bar for editors previewing the site. */
body.admin-bar > header.site-header.ald-deco-header { top: 32px !important; }
body.admin-bar > .ald-side-column { top: calc(var(--ald-header-height) + 32px); }
@media (max-width:782px) {
 body.admin-bar > header.site-header.ald-deco-header { top: 46px !important; }
 body.admin-bar > .ald-side-column { top: calc(var(--ald-header-height) + 46px); }
}
/* All desktop entries align in a single row, with consistent heights. */
body .ald-nav-rail { position: relative; z-index: 501; padding: 9px 0 11px; }
body .ald-deco-header .site-navigation.wrap {
 width: min(100%, 1660px) !important;
 max-width: 1660px !important;
 margin: 0 auto !important;
 padding: 0 clamp(18px,2.6vw,45px) !important;
 position: static;
}
body .ald-deco-header .nav-list {
 display: flex !important; flex-wrap: nowrap !important;
 justify-content: center !important; align-items: stretch !important;
 min-height: 48px; gap: clamp(7px, .8vw, 15px) !important;
 padding: 0 !important; margin: 0 !important;
}
body .ald-deco-header .nav-list > li {
 display: flex; flex: 1 1 auto; min-width: 0; margin: 0 !important;
}
body .ald-deco-header .nav-list > li > a {
 width: 100%; min-height: 48px; box-sizing: border-box;
 display: flex !important; align-items: center; justify-content: center;
 padding: 10px clamp(9px,1vw,17px) !important;
 font: 600 clamp(.70rem,.72vw,.88rem)/1.22 Georgia,serif !important;
 letter-spacing: .065em !important; white-space: nowrap;
 border: 1px solid #b68743 !important; border-radius: 0;
 color: #f7e0b3 !important; text-shadow: 0 1px 5px #0009;
 background: linear-gradient(180deg,#12233a 0%,#071323 75%) !important;
 box-shadow: inset 0 0 0 3px #081523, inset 0 0 0 4px #875c2a,0 5px 13px #0006 !important;
}
body .ald-deco-header .nav-list > li > a:hover,
body .ald-deco-header .nav-list > li.current-menu-item > a,
body .ald-deco-header .nav-list > li.current-page-ancestor > a {
 color: #fff3d0 !important; background: linear-gradient(#362718,#101e31) !important;
 border-color:#ffd793 !important; box-shadow:inset 0 0 0 3px #071523,inset 0 0 0 4px #d0a25e,0 0 15px #d99c4266 !important;
}
/* Eliminate the legacy elongated side-strip pseudo-elements. */
body::before, body::after { content: none !important; display: none !important; }

/* Two independent Art Deco columns: continuous frame and original art at its
   real aspect ratio (background-size: contain, never stretched to full height). */
body > .ald-side-column {
 position: fixed; top: var(--ald-header-height); bottom: 0;
 width: var(--ald-column-width); z-index: 11;
 pointer-events: none; overflow: hidden;
 border-block: 2px solid #c68c3b;
 background: linear-gradient(90deg,#020915 0%,#0b1b2d 20%,#061325 78%,#010a14 100%);
 box-shadow: inset 0 0 0 4px #050d17, inset 0 0 0 6px #8e672e, inset 0 0 0 8px #061325, 0 0 23px #0009;
}
body > .ald-side-column--left { left: 0; border-right: 2px solid #d8aa5a; }
body > .ald-side-column--right { right: 0; border-left: 2px solid #d8aa5a; }
body > .ald-side-column::before {
 content: ''; display: block; position: absolute; inset: 9px 6px;
 background-repeat: no-repeat; background-position: center center;
 background-size: contain; opacity:.98;
}
body > .ald-side-column--left::before { background-image: url('../images/ornamento-izquierdo-v4.webp'); }
body > .ald-side-column--right::before { background-image: url('../images/ornamento-derecho-v4.webp'); }
body > .ald-side-column::after {
 content:''; position:absolute; inset: 10px 9px;
 border-left: 1px solid #ab7b37; border-right: 1px solid #ab7b37;
 box-shadow: inset 2px 0 0 #2b241a, inset -2px 0 0 #2b241a;
 opacity:.75;
}
/* Content always sits above the decorative columns, and no book cards are
   hidden behind those rails. They are deliberately omitted on smaller screens. */
@media(min-width:1351px) {
 body main .section > .wrap { max-width: calc(100% - 2*clamp(126px, 10vw, 183px)); }
 body .page-shell > .wrap, body .aldena-illustrations .gallery-container {
   max-width: calc(100% - 2*clamp(116px, 9vw, 172px));
 }
}
@media (max-width:1350px) {
 body > .ald-side-column { display: none !important; }
}
/* At tablet and phone widths the menu remains available as a compact button,
   with an accessible dropdown. We do not wrap into two misaligned rows. */
@media (max-width:1279px) {
 .ald-deco-header .ald-top-rail { justify-content: center !important; min-height: 80px; padding: 10px 70px 10px 18px !important; }
 .ald-deco-header .brand { min-width: 0 !important; max-width: 100% !important; padding: 12px 24px !important; }
 .ald-deco-header .brand-words strong { font-size:clamp(1.02rem,2.6vw,1.8rem) !important; letter-spacing:.07em !important; }
 .ald-deco-header .brand-words small { font-size:.5rem !important; letter-spacing:.13em !important; }
 .ald-deco-header .ald-top-rail:after { display: none !important; }
 body .ald-deco-header .nav-toggle {
  display: block !important; position: absolute !important;
  top: 50% !important; right: 22px !important; transform: translateY(-50%);
  z-index: 530; padding:10px !important; background: #0b1829;
  border:1px solid #d1a05a !important; border-radius:0;
 }
 body .ald-nav-rail { position: relative !important; padding:0 !important; min-height: 0 !important; border-bottom:0 !important; }
 body .ald-deco-header .site-navigation.wrap {
   display: none !important; position: absolute !important;
   top: 100% !important; left: 0 !important; right: 0 !important;
   width: 100% !important; max-width: 100% !important;
   background: #071321 !important;
   padding: 16px clamp(18px,4vw,45px) !important;
   border: 1px solid #b88b47 !important; box-shadow: 0 16px 34px #000c;
   max-height: calc(100vh - var(--ald-header-height) - 10px); overflow-y: auto;
 }
 body .ald-deco-header .site-navigation.is-open { display: block !important; }
 body .ald-deco-header .nav-list { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:9px !important; }
 body .ald-deco-header .nav-list > li { min-width:0; }
 body .ald-deco-header .nav-list > li > a { white-space:normal; font-size:.85rem !important; min-height:46px; }
}
@media(max-width:650px) {
 .ald-deco-header .ald-top-rail { padding-right:63px !important; padding-left:10px !important; min-height:75px; }
 .ald-deco-header .brand { padding:10px 12px !important; }
 .ald-deco-header .brand-words strong { font-size: clamp(.82rem,3.4vw,1.05rem) !important; letter-spacing:.025em !important; }
 .ald-deco-header .brand-words small { font-size:.39rem !important; letter-spacing:.06em !important; }
 body .ald-deco-header .nav-toggle { right:12px !important; }
 body .ald-deco-header .nav-list { grid-template-columns:1fr !important; }
}
@media(prefers-reduced-motion:reduce) {
 html { scroll-behavior:auto !important; }
}
