/* La galería comparte fuentes, papel, navegación y colores con la portada. */
.page-gallery [hidden] { display: none !important; }
.page-gallery .main-nav > a[aria-current='page'] { position: relative; color: var(--wine); font-weight: 700; }
.page-gallery .main-nav > a[aria-current='page']::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--gold); }
.gallery-leaf { position: absolute; height: auto; pointer-events: none; z-index: 2; }
.gallery-header-leaf { top: -42px; left: 36%; width: 113px; transform: rotate(38deg); z-index: -1; }
.gallery-hero { position: relative; height: clamp(490px, 46.5vw, 680px); isolation: isolate; }
.gallery-hero-scene { position: absolute; inset: 77px 0 0 32%; z-index: 0; overflow: hidden; border-radius: 45% 0 0 25% / 15% 0 0 8%; }
.gallery-hero-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 68%; }
.gallery-hero-copy { position: relative; z-index: 2; width: 52%; padding: clamp(145px, 13vw, 193px) 0 63px 8%; }
.gallery-hero-copy::before { content: ''; position: absolute; z-index: -1; inset: 103px -10% 0 -45px; border-radius: 0 64% 62% 0 / 0 49% 55% 0; background: var(--paper) url('../imagenes/textura-papel.svg'); }
.gallery-hero-copy .eyebrow { margin: 0 0 9px 4px; letter-spacing: .37em; color: #947047; }
.gallery-title { color: var(--wine); font-family: var(--serif); font-size: clamp(70px, 7.2vw, 111px); font-weight: 500; line-height: .95; letter-spacing: -.032em; }
.gallery-title > span { display: flex; align-items: center; gap: 14px; margin: 7px 0 32px 0; color: var(--gold); font-family: var(--script); font-size: 1.06em; line-height: .95; letter-spacing: -.025em; white-space: nowrap; transform: rotate(-4deg); transform-origin: left center; }
.gallery-title .drawn-heart { width: .4em; height: .58em; flex: 0 0 auto; }
.gallery-intro { max-width: 37ch; padding-left: 4px; font-size: clamp(13px, 1.23vw, 16px); line-height: 1.58; }
.gallery-hero-branch { width: 106px; left: -47px; top: 140px; opacity: .7; transform: rotate(-17deg); }
.gallery-contour { position: absolute; bottom: 27px; left: 0; width: 64%; height: 170px; fill: none; stroke: #fffaf4; stroke-width: 1.7; opacity: .9; pointer-events: none; }
.gallery-wave { position: absolute; bottom: -1px; left: 0; width: 100%; height: 59px; fill: var(--paper); pointer-events: none; }
.gallery-collection { position: relative; z-index: 3; padding: 0 1.6% 28px; }
.gallery-filter-band { position: relative; padding: 14px 30px 30px; }
.gallery-filters { display: none; justify-content: center; flex-wrap: wrap; gap: 13px; }
.gallery-ready .gallery-filters { display: flex; }
.gallery-filter { min-height: 42px; padding: 12px 25px; border: 1px solid #cba57f; border-radius: 40px; color: var(--ink); background: #fffaf240; font-size: 10px; font-weight: 600; line-height: 1.3; letter-spacing: .055em; text-transform: uppercase; transition: color .2s, background .2s, border-color .2s; }
.gallery-filter:hover { border-color: var(--wine); color: var(--wine); background: #f0e1ce; }
.gallery-filter[aria-pressed='true'] { border-color: var(--wine); color: white; background: var(--wine); }
.gallery-filter-leaf { right: -42px; top: -28px; width: 91px; transform: rotate(-60deg); opacity: .8; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 1450px; margin: 0 auto; }
.gallery-card { min-width: 0; overflow: hidden; border-radius: 8px; background: #eee2d3; }
.gallery-image-link { position: relative; display: block; overflow: hidden; aspect-ratio: 1.16; }
.gallery-image-link > img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s ease; }
.gallery-image-link:hover > img { transform: scale(1.035); }
.gallery-image-link::after { content: ''; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, #291711d9); opacity: 0; transition: opacity .25s; }
.gallery-image-link figcaption { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 24px 18px 17px; color: #fffaf2; font-family: var(--serif); font-size: 22px; font-weight: 500; line-height: 1.12; opacity: 0; transform: translateY(6px); transition: opacity .25s, transform .25s; }
.gallery-image-link figcaption > span { display: block; margin-bottom: 6px; color: #f6ddbb; font-family: var(--sans); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; }
.gallery-expand { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 33px; height: 33px; border: 1px solid #fffaf260; border-radius: 50%; background: #fbf5ebed; color: var(--wine); opacity: 0; transition: opacity .25s; }
.gallery-expand .icon { width: 16px; height: 16px; }
.gallery-image-link:hover::after, .gallery-image-link:focus-visible::after, .gallery-image-link:hover figcaption, .gallery-image-link:focus-visible figcaption, .gallery-image-link:hover .gallery-expand, .gallery-image-link:focus-visible .gallery-expand { opacity: 1; }
.gallery-image-link:hover figcaption, .gallery-image-link:focus-visible figcaption { transform: translateY(0); }
.gallery-card:focus-within { outline: 2px solid var(--wine); outline-offset: 3px; }
.gallery-image-link:focus-visible { outline: none; }
.gallery-navigation { display: flex; flex-direction: column; align-items: center; gap: 15px; padding: 27px 20px 8px; }
.gallery-count { color: #75644f; font-size: 11px; line-height: 1.5; }
.gallery-more { min-height: 44px; padding-inline: 28px; font-size: 10px; }
.gallery-closing { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 50px; margin-top: 29px; padding: 55px 12% 75px 14%; background: #f6ebdd url('../imagenes/textura-papel.svg'); }
.gallery-closing-wave { position: absolute; top: -60px; left: 0; width: 100%; height: 61px; fill: #f6ebdd; pointer-events: none; }
.gallery-closing-title { position: relative; z-index: 3; }
.gallery-closing-title .eyebrow { margin-bottom: 14px; font-size: 10px; letter-spacing: .3em; }
.gallery-closing h2 { color: var(--wine); font-family: var(--serif); font-size: clamp(38px, 3.5vw, 57px); font-weight: 500; line-height: 1; letter-spacing: -.018em; }
.gallery-closing h2 > span { display: flex; align-items: center; justify-content: center; gap: 19px; color: var(--gold); font-family: var(--script); font-size: 1.85em; font-weight: 400; line-height: 1; transform: rotate(-4deg); }
.gallery-closing h2 .drawn-heart { width: .4em; height: .55em; }
.gallery-closing-copy { position: relative; z-index: 3; max-width: 44ch; }
.gallery-closing-copy > p { font-size: 13px; line-height: 1.65; margin-bottom: 22px; }
.gallery-closing-copy .button { min-height: 45px; padding-inline: 25px; }
.gallery-closing-branch { left: 5px; bottom: -27px; width: 112px; transform: rotate(-13deg); opacity: .8; }
.gallery-closing-leaf { right: -20px; bottom: -34px; width: 127px; transform: rotate(-16deg); }
.gallery-modal-open { overflow: hidden; }
.gallery-lightbox { width: min(1120px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px); padding: 21px 21px 15px; border: 1px solid #bc824160; border-radius: 17px; background: var(--paper) url('../imagenes/textura-papel.svg'); color: var(--ink); box-shadow: 0 22px 100px #16070844; }
.gallery-lightbox::backdrop { background: #251015e8; }
.gallery-lightbox-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 7px 18px; }
.gallery-lightbox-header h2 { font-family: var(--serif); font-size: 27px; font-weight: 500; color: var(--wine); line-height: 1.1; }
.gallery-lightbox-category { color: #8d683d; font-size: 9px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 5px; }
.gallery-round-button { display: grid; flex: 0 0 auto; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #bc824170; border-radius: 50%; color: var(--wine); background: #fffaf2; }
.gallery-round-button:hover { background: #f0e1ce; }
.gallery-round-button .icon { width: 19px; height: 19px; }
.gallery-previous .icon { transform: rotate(180deg); }
.gallery-lightbox-media { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 17px; align-items: center; }
.gallery-lightbox-picture { display: grid; place-items: center; min-width: 0; min-height: 160px; }
.gallery-lightbox-picture img { max-width: 100%; width: auto; height: auto; max-height: min(74vh, calc(100dvh - 201px)); object-fit: contain; border-radius: 6px; }
.gallery-lightbox-picture p { max-width: 32ch; padding: 50px 15px; font-size: 13px; line-height: 1.6; text-align: center; }
.gallery-lightbox-count { padding-top: 15px; font-size: 11px; color: #75644f; text-align: center; }
@media (min-width: 1600px) {
  .gallery-hero-copy { padding-left: max(8%, calc((100vw - 1390px) / 2)); }
  .gallery-hero { height: 710px; }
  .gallery-hero-copy { padding-top: 210px; }
  .gallery-filter-band { padding-bottom: 36px; }
  .gallery-closing { padding-inline: max(12%, calc((100vw - 1270px) / 2)); }
}
@media (max-width: 1050px) {
  .gallery-header-leaf { left: 34%; top: -29px; width: 86px; }
  .gallery-hero-copy { width: 54%; padding-top: 133px; padding-left: 8%; }
  .gallery-title { font-size: 7.7vw; }
  .gallery-title > span { margin-bottom: 27px; font-size: 1.12em; gap: 10px; }
  .gallery-intro { max-width: 34ch; font-size: 13px; }
  .gallery-filter { padding-inline: 20px; font-size: 9px; }
  .gallery-filters { gap: 11px; }
  .gallery-filter-band { padding-inline: 15px; }
  .gallery-closing { padding: 46px 9% 65px 12%; gap: 35px; }
  .gallery-closing h2 { font-size: 39px; }
}
@media (max-width: 860px) {
  .gallery-header-leaf { display: none; }
  .page-gallery .main-nav > a[aria-current='page']::after { display: none; }
  .gallery-hero { height: 520px; }
  .gallery-hero-copy { width: 60%; padding-left: 6%; padding-top: 142px; }
  .gallery-title { font-size: 8.3vw; }
  .gallery-intro { max-width: 31ch; }
  .gallery-hero-scene { left: 34%; top: 85px; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery-filter-band { padding-bottom: 24px; }
  .gallery-closing { padding-inline: 10%; gap: 25px; }
  .gallery-closing-title .eyebrow { font-size: 8px; }
  .gallery-closing h2 { font-size: 34px; }
  .gallery-closing-copy > p { font-size: 12px; }
  .gallery-closing-copy .button { padding-inline: 18px; font-size: 9px; gap: 12px; }
  html:not(.js) .page-gallery .site-header { position: relative; flex-direction: column; }
  html:not(.js) .page-gallery .main-nav { position: static; width: 100%; }
  html:not(.js) .gallery-hero-copy { padding-top: 50px; }
  html:not(.js) .gallery-hero-copy::before { top: 0; }
  html:not(.js) .gallery-hero-scene { top: 0; }
}
@media (max-width: 600px) {
  .gallery-hero { height: 750px; }
  .gallery-hero-copy { width: 100%; padding: 125px 28px 48px; }
  .gallery-hero-copy::before { inset: 85px -30px 0; border-radius: 0 0 38% 8%; }
  .gallery-hero-copy .eyebrow { font-size: 10px; margin-left: 3px; }
  .gallery-title { font-size: clamp(58px, 15.5vw, 83px); }
  .gallery-title > span { font-size: 1.08em; gap: 9px; margin-top: 8px; margin-bottom: 24px; }
  .gallery-intro { max-width: 41ch; font-size: 13px; line-height: 1.65; }
  .gallery-hero-scene { inset: 363px 0 0; border-radius: 0; }
  .gallery-hero-scene img { object-position: 50% 82%; }
  .gallery-hero-branch { width: 71px; left: -43px; top: 110px; }
  .gallery-contour { bottom: 34px; width: 100%; height: 64px; }
  .gallery-wave { height: 40px; }
  .gallery-collection { padding-inline: 13px; }
  .gallery-filter-band { padding: 10px 3px 22px; }
  .gallery-filters { gap: 8px; }
  .gallery-filter { min-height: 40px; padding: 11px 16px; font-size: 8px; letter-spacing: .04em; }
  .gallery-filter-leaf { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .gallery-card { border-radius: 6px; }
  .gallery-image-link { aspect-ratio: .95; }
  .gallery-expand { width: 28px; height: 28px; top: 8px; right: 8px; }
  .gallery-image-link figcaption { padding: 24px 11px 12px; font-size: 19px; }
  .gallery-image-link figcaption > span { font-size: 7px; letter-spacing: .08em; }
  .gallery-navigation { padding-top: 23px; }
  .gallery-count { font-size: 10px; }
  .gallery-closing { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 28px; padding: 37px 37px 65px; text-align: center; }
  .gallery-closing-title .eyebrow { font-size: 8px; }
  .gallery-closing h2 { font-size: clamp(35px, 9.5vw, 48px); }
  .gallery-closing h2 > span { margin-top: 1px; font-size: 1.72em; }
  .gallery-closing-copy { max-width: 35ch; margin: 0 auto; }
  .gallery-closing-copy > p { font-size: 12px; margin-bottom: 18px; }
  .gallery-closing-copy .button { font-size: 9px; padding-inline: 23px; }
  .gallery-closing-branch { width: 67px; left: -29px; bottom: -17px; }
  .gallery-closing-leaf { width: 76px; right: -24px; bottom: -17px; }
  .gallery-lightbox { width: calc(100% - 20px); max-height: calc(100dvh - 20px); padding: 16px 11px 12px; border-radius: 12px; }
  .gallery-lightbox-header { padding: 0 4px 15px; gap: 9px; }
  .gallery-lightbox-header h2 { font-size: 22px; }
  .gallery-lightbox-category { font-size: 8px; letter-spacing: .1em; }
  .gallery-lightbox-media { grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 5px; }
  .gallery-lightbox-media .gallery-round-button { width: 30px; height: 42px; padding: 7px; border-radius: 17px; }
  .gallery-lightbox-media .icon { width: 16px; height: 16px; }
  .gallery-lightbox-picture img { max-height: calc(100dvh - 195px); }
}
@media (max-width: 360px) {
  .gallery-hero-copy { padding-inline: 22px; }
  .gallery-title { font-size: 15.3vw; }
  .gallery-hero-scene { top: 371px; }
  .gallery-intro { font-size: 12px; }
  .gallery-filter { padding-inline: 14px; }
}
@media (hover: none) {
  .gallery-expand { opacity: .9; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-image-link > img, .gallery-image-link::after, .gallery-image-link figcaption, .gallery-expand, .gallery-filter { transition: none; }
  .gallery-image-link:hover > img { transform: none; }
}


/* Move the couple clear of the paper text overlay without changing the artwork. */
@media (min-width: 601px) {
  .gallery-hero-scene { left: 32%; background: url('../imagenes/galeria/contacto.png') center 68% / cover no-repeat; }
  .gallery-hero-scene img { position: absolute; right: 0; width: 83.823529%; }
}
