/*
Theme Name: Alex Moreno Estudio
Template: astra
Version: 1.3.1
*/

@font-face {
  font-family:'Poppins';
  src:url('assets/regular.ttf') format('truetype');
  font-weight:400;
  font-display:swap;
}
@font-face {
  font-family:'Poppins';
  src:url('assets/bold.ttf') format('truetype');
  font-weight:700;
  font-display:swap;
}
body:not(.wp-admin), body:not(.wp-admin) :is(h1,h2,h3,p,.entry-title,.wp-block-post-title) {
  font-family:'Poppins',sans-serif;
}
body:not(.wp-admin) :is(h1,h2,h3,.entry-title,.wp-block-post-title) { font-weight:700; }
body:not(.wp-admin) p { font-weight:400; }

.detalle.vertical .obra:has(.wp-block-gallery) { display:contents; }
.detalle.vertical .obra:has(.wp-block-gallery) > * { grid-column:1 / -1; min-width:0; }
.detalle.vertical .obra:has(.wp-block-gallery) > :is(.wp-block-video,.wp-block-embed.is-type-video,video):first-of-type { width:min(100%,27rem,44svh); margin-inline:auto; }
.detalle.vertical .obra .wp-block-gallery { width:100%; margin-inline:0; }
.detalle.vertical .obra > p:empty {display:none;}
@media(min-width:760px) {
  .detalle.vertical .obra:has(.wp-block-gallery) > :is(.wp-block-video,.wp-block-embed.is-type-video,video):first-of-type { grid-column:2; grid-row:1; }
}

.detalle.vertical .obra:has(.wp-block-gallery) > p.wp-block-paragraph:first-child {font-size:.9375rem;line-height:1.7;color:#bcbcbc;max-width:52ch;margin:0;}
@media(min-width:760px){
 .detalle.vertical .presentacion:has(> .obra > p.wp-block-paragraph:first-child):has(.wp-block-gallery) {row-gap:0;}
 .detalle.vertical .presentacion:has(> .obra > p.wp-block-paragraph:first-child):has(.wp-block-gallery) > div:first-child {grid-area:1/1;align-self:end;}
 .detalle.vertical .obra:has(.wp-block-gallery) > p.wp-block-paragraph:first-child {grid-area:2/1;align-self:start;margin-top:.85rem;}
 .detalle.vertical .obra:has(> p.wp-block-paragraph:first-child):has(.wp-block-gallery) > :is(.wp-block-video,.wp-block-embed.is-type-video,video):first-of-type {grid-row:1 / span 2;}
 .detalle.vertical .obra:has(> p.wp-block-paragraph:first-child) > .wp-block-gallery {margin-top:clamp(2rem,5vw,5rem);}
}

.proyecto .detalle > a[href$="#proyectos"] {display:inline-flex;align-items:center;min-height:44px;padding:.85rem 1.5rem;background:#cb1821;color:white;font:700 1rem/1.4 Poppins,sans-serif;text-decoration:none;}
.proyecto .detalle > a[href$="#proyectos"]:hover {background:#aa151b;}
.proyecto .detalle > a[href$="#proyectos"]:focus-visible {outline:2px solid white;outline-offset:4px;}
.proyecto .detalle > a[href$="#proyectos"]::before {content:"←";margin-right:.55em;}

.wp-lightbox-overlay .scrim { background-color:#000 !important; }
.wp-lightbox-overlay button, .wp-lightbox-overlay button svg { color:#fff !important; fill:#fff !important; }
.wp-lightbox-overlay button:focus-visible { outline:2px solid white; outline-offset:2px; }

/* Acceso al portfolio durante la lectura de la ficha. */
.proyecto .detalle > a[href$="#proyectos"] {
  position:sticky; bottom:calc(1rem + env(safe-area-inset-bottom, 0px));
  display:flex; width:max-content; max-width:100%; margin:2rem auto 0;
  z-index:3; box-shadow:0 3px 14px #0008;
}
body:has(.wp-lightbox-overlay.active) .detalle > a[href$="#proyectos"] { visibility:hidden; }

/* Tipografía editorial compartida por las fichas y la cuadrícula. */
.proyecto .detalle .wp-block-paragraph { font:400 .9375rem/1.7 Poppins,sans-serif; text-transform:none; }
.proyecto .presentacion h1 + p { font:400 1rem/1.65 Poppins,sans-serif; text-transform:none; }
.portada .seleccion .reveal strong {font:400 .85rem/1.45 Poppins,sans-serif; text-transform:uppercase; letter-spacing:.1em;}
.portada .seleccion .reveal p {font-weight:400; line-height:1.5; text-transform:none;}

/* Escala del título según el ancho real de su columna. */
.proyecto .detalle .presentacion > div:first-child,
.portada .seleccion .caption { container-type: inline-size; min-width: 0; }
.proyecto .detalle .presentacion h1,
.portada .seleccion .caption h3,
.portada .seleccion .caption h3 a { word-break: normal; overflow-wrap: normal; hyphens: none; text-wrap: balance; }
.proyecto .detalle .presentacion h1 { font-size: min(5.5rem, 8.7cqi); }
.portada .seleccion .caption h3 { font-size: min(2.3rem, 8cqi); }

.proyecto .presentacion .contexto-proyecto {font-size:.9375rem;line-height:1.65;color:#bcbcbc;}
@media(max-width:480px){.portada .seleccion .caption:has(a[href*="amarante-ft-dnuecomplementos"]) h3 {font-size:min(1.65rem,7cqi);} .portada .seleccion .caption h3 a {font-size:inherit;}}
