/* Ajustes visuales de la cabecera y el bloque principal. */
@media (min-width: 1200px) {
  body > .atlas-masthead {height: clamp(220px, 16.85vw, 282px) !important;}
  #inicio .atlas-home-hero h1 {font-size: clamp(46px, 3.5vw, 58px) !important; line-height: .95 !important; margin: 0 0 12px !important;}
  #inicio .atlas-home-hero__sky {background-size: cover, cover, 130% auto !important; background-position: center, center, right 38% !important;}
}
.nav .brand img {object-fit: contain;}
@media (max-width: 700px) {
  #inicio .atlas-home-hero__inner {min-height: 340px !important; padding-top: 28px !important;}
}
@media (min-width: 701px) {
  .top .nav .userbar #loginOpen + button.secondary {background: linear-gradient(180deg, #c71922, #8e0710); border-color: #c64a4f; color: #fff;}
}
/* Ambos emblemas utilizan un único archivo, a tamaños adecuados para cada lugar. */
body > .atlas-masthead {background-image:url('/assets/backgrounds/cabecera-limpia.webp')!important;background-size:100% 215%!important;background-position:center!important;}
.atlas-masthead__identity {display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;}
.atlas-masthead__identity img {display:block!important;position:absolute!important;top:50%!important;left:50%!important;width:min(500px,75vw)!important;height:auto!important;max-height:none!important;opacity:1!important;overflow:visible!important;transform:translate(-50%,-56%)!important;pointer-events:none!important;}
.atlas-masthead__identity span {display:flex!important;position:absolute!important;left:0!important;right:0!important;bottom:12px!important;width:auto!important;height:auto!important;justify-content:center!important;opacity:1!important;overflow:visible!important;color:#f6e8d0!important;font-family:Georgia,serif!important;letter-spacing:clamp(.12em,.35vw,.35em)!important;font-size:clamp(10px,1.05vw,16px)!important;text-shadow:0 2px 8px #000!important;white-space:nowrap!important;}
.top .nav .brand {display:block;position:relative;width:130px;height:60px;overflow:hidden;flex:none;}
.top .nav .brand::before {content:none!important;}
.top .nav .brand img {display:block!important;position:absolute!important;left:50%;top:-8px;width:120px!important;height:auto!important;max-width:none!important;max-height:none!important;transform:translateX(-50%);opacity:1!important;object-fit:contain!important;}
@media (max-width:700px) {
 .atlas-masthead__identity img {width:min(400px,100vw)!important;}
 .atlas-masthead__identity span {bottom:12px!important;font-size:clamp(8px,2vw,12px)!important;letter-spacing:.1em!important;}
}
.atlas-masthead__identity img {transform:translate(-50%,-53%)!important;}
@media (max-width:700px) {body > .atlas-masthead {background-image:url('/assets/backgrounds/cabecera-movil-limpia.webp')!important;background-size:cover!important;background-position:center center!important;}}
@media (min-width:701px) and (max-width:1100px) {
 body > .atlas-masthead {background-image:url('/assets/backgrounds/cabecera-movil-limpia.webp')!important;background-size:cover!important;background-position:center 25%!important;}
 .atlas-masthead__identity img {width:min(380px,65vw)!important;}
}
@media (min-width:1101px) {body > .atlas-masthead {background-size:auto 215%!important;}}
.atlas-masthead__identity img {height:115%!important;width:auto!important;max-width:100vw!important;}
@media (min-width:701px) and (max-width:1100px) {body > .atlas-masthead {background-position:center 10%!important;}}
/* Imagen inferior más definida; se mantiene la protección de contraste del texto. */
#inicio .atlas-home-hero__sky {
 background-image:linear-gradient(90deg,rgba(2,10,17,.92) 0%,rgba(3,15,23,.82) 21%,rgba(2,11,17,.46) 49%,rgba(2,9,16,.04) 100%),linear-gradient(0deg,rgba(3,16,24,.55),rgba(3,16,24,0) 48%),url('/assets/backgrounds/hero-nitido.webp')!important;
 background-size:cover,cover,cover!important;
 background-position:center,center,right top!important;
}
@media (max-width:700px) {
 #inicio .atlas-home-hero__sky {
  background-image:linear-gradient(90deg,rgba(2,10,17,.89),rgba(2,14,23,.73) 65%,rgba(3,17,26,.50)),linear-gradient(0deg,rgba(1,10,17,.53),transparent 63%),url('/assets/backgrounds/hero-nitido.webp')!important;
  background-position:center,center,75% 15%!important;
 }
}
@media (min-width:1200px) {
 #inicio .atlas-home-hero__sky {
  background-image:linear-gradient(rgba(3,15,23,.93),rgba(3,15,23,.93)),url('/assets/backgrounds/hero-nitido.webp')!important;
  background-size:cover,cover!important;background-position:center,center!important;
 }
 #inicio .atlas-home-hero__sky::before {
  content:"";position:absolute;top:0;right:0;bottom:0;width:min(100%,1000px);
  background:url('/assets/backgrounds/hero-nitido.webp') right center / auto 100% no-repeat;
  -webkit-mask-image:linear-gradient(90deg,transparent 15%,#000 55%,#000 100%);
  mask-image:linear-gradient(90deg,transparent 15%,#000 55%,#000 100%);
 }
}

/* Cierre accesible que permanece a la vista al desplazar una ficha. */
#detailDialog .detailToolbar {position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;min-height:54px;padding:4px 12px 4px 24px;background:#0c2028;border-bottom:1px solid #36515a;color:#c3d3d5;font-size:13px;font-weight:600;}
#detailDialog .detailToolbar .close {position:static;display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:#f5f8f8;font-size:22px;line-height:1;cursor:pointer;}
#detailDialog .detailToolbar .close:hover {background:#27404a;}
#detailDialog .detailToolbar .close:focus-visible {outline:3px solid #f3c78d;outline-offset:-3px;}
@media (max-width:700px) {#detailDialog .detailToolbar {min-height:52px;padding:4px 8px 4px 16px;font-size:12px;}}
#detailDialog {scroll-padding-top:60px;}

/* Catálogo adaptable con cuatro fichas en pantallas amplias. */
#lugares .place .placeThumb {height:auto;aspect-ratio:16/10;object-fit:cover;}
@media(min-width:1300px){#lugares .cards{grid-template-columns:repeat(4,minmax(0,1fr));}}
@media(min-width:1021px) and (max-width:1299px){#lugares .cards{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(min-width:700px) and (max-width:1020px){#lugares .cards{grid-template-columns:repeat(2,minmax(0,1fr));}}
/* El botón permanece fuera de la superficie desplazable, dentro del diálogo accesible. */
#detailDialog {width:min(960px,calc(100vw - 48px));max-width:none;max-height:none;overflow:visible;padding:0;border:0;background:transparent;box-shadow:none;}
#detailDialog .detailShell {position:relative;}
#detailDialog .detailSurface {max-height:min(90vh,calc(100dvh - 48px));overflow-y:auto;overscroll-behavior:contain;background:#10242d;border:1px solid #3a6268;border-radius:16px;scroll-padding-top:12px;}
#detailDialog .detailFloatingClose {position:absolute;z-index:5;top:-18px;right:-18px;display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid #71878d;border-radius:50%;background:#0b1d24;color:#fff;box-shadow:0 2px 10px #0008;font-size:22px;line-height:1;cursor:pointer;}
#detailDialog .detailFloatingClose:hover {background:#28444c;}
#detailDialog .detailFloatingClose:focus-visible {outline:3px solid #f3c78d;outline-offset:2px;}

/* Pie con texto editorial y redes alineadas, adaptable a pantallas pequeñas. */
footer.atlas-legal-footer {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:20px 30px;align-items:end;}
footer.atlas-legal-footer .atlas-footer-copy p:last-child {margin-bottom:0;}
footer.atlas-legal-footer .atlas-photo-credits {color:inherit;text-decoration:underline;text-decoration-color:#8f9fa4;text-underline-offset:3px;}
footer.atlas-legal-footer .atlas-photo-credits:hover {color:#fff;}
footer.atlas-legal-footer .atlas-photo-credits:focus-visible {outline:2px solid #f3c78d;outline-offset:3px;}
.atlas-footer-social ul {display:flex;flex-wrap:wrap;gap:5px;list-style:none;margin:0;padding:0;}
.atlas-footer-social .atlas-social-item {display:grid;place-items:center;width:44px;height:44px;color:#df394b;text-decoration:none;border-radius:10px;}
.atlas-footer-social .atlas-social-item svg {display:block;width:24px;height:24px;fill:currentColor;}
.atlas-footer-social a.atlas-social-item:hover {background:#25343c;color:#ff6171;}
.atlas-footer-social a.atlas-social-item:focus-visible {outline:3px solid #f3c78d;outline-offset:1px;}
.atlas-footer-social .is-pending {opacity:.65;cursor:default;}
@media (max-width:850px) {footer.atlas-legal-footer {grid-template-columns:1fr;gap:10px;} .atlas-footer-social {justify-self:start;}}

.atlas-footer-social .atlas-social-title {display:block;margin:0 0 4px;text-align:right;color:#d9e3e4;font-size:12px;font-weight:600;}
@media (max-width:850px) {.atlas-footer-social .atlas-social-title {text-align:left;}}

/* Separación ligeramente mayor entre el texto y los iconos en escritorio. */
@media (min-width:851px) {footer.atlas-legal-footer {column-gap:56px;padding-right:8px;}}
.atlas-contact-credits {display:inline-block;margin-top:18px;color:#d8eee4;text-underline-offset:3px;}
.atlas-contact-credits:focus-visible {outline:2px solid #f3c78d;outline-offset:3px;}
/* Ventana de ficha de tamaño equilibrado, con imagen íntegra. */
#detailDialog {width:min(780px,calc(100vw - 48px));}
#detailDialog .detailSurface {max-height:min(82vh,calc(100dvh - 48px));}
#detailDialog .detailCover img {max-height:min(48vh,420px)!important;}
@media (max-width:700px) {
 #detailDialog .detailSurface {max-height:min(84vh,calc(100dvh - 48px));}
 #detailDialog .detailCover img {max-height:45vh!important;}
}
#detailDialog .detailCover {min-height:0;}
/* Controles de administración claros y cómodos en móvil. */
.detailAdmin label.inline {display:flex;align-items:flex-start;gap:8px;line-height:1.45;}
.detailAdmin label.inline input[type="checkbox"] {width:18px;height:18px;margin:1px 0 0;flex:none;accent-color:#75e6ba;}
.detailAdmin .actions {gap:10px;}
#adminEditJump {margin:10px 0 16px;}
