
/* === rc2-39-immobilien-galerien.css === */
/* RC2.31 – Vermittelte Immobilien mit klickbarer Lightbox-Galerie */
.current-properties-section{padding-bottom:clamp(5.5rem,8vw,8rem)}
.sold-properties-section{background:linear-gradient(180deg,rgba(13,33,68,.035),rgba(13,33,68,0) 42%)}
.sold-properties-heading{max-width:790px;margin-bottom:2.25rem}
.sold-properties-heading .section-kicker,.sold-archive-copy .section-kicker{margin:0 0 .8rem;color:var(--gold)}
.sold-properties-heading h2{margin:0;font-family:var(--display);font-size:clamp(2.75rem,5vw,4.8rem);font-weight:400;line-height:.98;color:var(--navy)}
.sold-properties-heading>p:last-child{max-width:720px;margin:1.2rem 0 0;color:var(--muted);font-size:1.08rem;line-height:1.75}
.sold-properties-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1.5rem}
.sold-property-card{position:relative;display:flex;flex-direction:column;overflow:hidden;border:1px solid rgba(13,33,68,.09);border-radius:14px;background:#fff;box-shadow:0 18px 48px rgba(13,33,68,.075);cursor:pointer;transition:transform .45s cubic-bezier(.22,1,.36,1),box-shadow .45s ease,border-color .45s ease}
.sold-property-card:hover,.sold-property-card:focus-visible{transform:translateY(-5px);border-color:rgba(199,162,93,.42);box-shadow:0 26px 62px rgba(13,33,68,.13);outline:none}
.sold-property-card:focus-visible{box-shadow:0 0 0 3px rgba(199,162,93,.36),0 26px 62px rgba(13,33,68,.13)}
.sold-property-image-wrap{position:relative;overflow:hidden;aspect-ratio:1.55;background:#e8e9e7}
.sold-property-image{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.001);transition:transform .75s cubic-bezier(.22,1,.36,1)}
.sold-property-card:hover .sold-property-image,.sold-property-card:focus-visible .sold-property-image{transform:scale(1.035)}
.sold-property-image-wrap:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(5,18,39,.02) 42%,rgba(5,18,39,.27));pointer-events:none}
.sold-property-status{position:absolute;z-index:2;left:1rem;bottom:1rem;display:inline-flex;align-items:center;min-height:31px;padding:.48rem .72rem;border:1px solid rgba(255,255,255,.28);border-radius:2px;background:rgba(7,26,54,.86);color:#fff;font-size:.64rem;font-weight:800;letter-spacing:.13em;text-transform:uppercase;backdrop-filter:blur(8px)}
.sold-property-gallery-count{position:absolute;z-index:2;right:1rem;top:1rem;display:inline-flex;align-items:center;gap:.45rem;min-height:34px;padding:.48rem .68rem;border:1px solid rgba(255,255,255,.34);border-radius:2px;background:rgba(7,26,54,.82);color:#fff;font-size:.67rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;backdrop-filter:blur(8px)}
.sold-property-gallery-count svg{flex:0 0 auto}
.sold-property-content{display:flex;flex:1;flex-direction:column;padding:1.25rem 1.3rem 1.4rem}
.sold-property-content h3{min-height:7rem;margin:0;font-family:var(--display);font-size:clamp(1.42rem,1.8vw,1.72rem);font-weight:400;line-height:1.16;color:var(--navy)}
.sold-property-content p{margin:auto 0 0;padding-top:1rem;color:var(--muted);font-size:.91rem;font-weight:650;letter-spacing:.035em}
.sold-archive-panel{margin-top:clamp(4.5rem,8vw,7rem);padding-top:clamp(2.5rem,5vw,4.25rem);border-top:1px solid rgba(13,33,68,.13)}
.sold-archive-copy{max-width:740px}
.sold-archive-copy h3{margin:0;font-family:var(--display);font-size:clamp(2.2rem,4vw,3.6rem);font-weight:400;line-height:1.03;color:var(--navy)}
.sold-archive-copy>p:last-child{max-width:650px;margin:1.15rem 0 0;color:var(--muted);font-size:1rem;line-height:1.7}
.sold-archive-toggle{display:inline-flex;align-items:center;justify-content:center;gap:1rem;min-height:54px;margin-top:1.8rem;padding:.9rem 1.25rem;border:1px solid var(--navy);border-radius:2px;background:transparent;color:var(--navy);font-size:.72rem;font-weight:850;letter-spacing:.11em;text-transform:uppercase;transition:background .25s ease,color .25s ease,border-color .25s ease}
.sold-archive-toggle:hover{border-color:var(--gold);background:var(--gold);color:var(--navy)}
.sold-archive-toggle-icon{position:relative;width:17px;height:17px;flex:0 0 17px}
.sold-archive-toggle-icon:before,.sold-archive-toggle-icon:after{content:"";position:absolute;left:1px;right:1px;top:8px;height:1.5px;background:currentColor;transition:transform .28s ease}
.sold-archive-toggle-icon:after{transform:rotate(90deg)}
.sold-archive-toggle[aria-expanded="true"] .sold-archive-toggle-icon:after{transform:rotate(0)}
.sold-properties-grid-additional{margin-top:2rem;animation:soldArchiveIn .5s cubic-bezier(.22,1,.36,1) both}
.sold-properties-grid-additional[hidden]{display:none!important}
@keyframes soldArchiveIn{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}

/* Galerie-Overlay */
.property-gallery-modal[hidden]{display:none!important}
.property-gallery-modal{position:fixed;z-index:10050;inset:0;display:grid;place-items:center;padding:clamp(.65rem,2.2vw,1.5rem);background:rgba(4,14,31,.88);backdrop-filter:blur(10px);opacity:0;transition:opacity .22s ease}
.property-gallery-modal.is-open{opacity:1}
.property-gallery-dialog{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:min(1180px,100%);max-height:calc(100dvh - clamp(1.3rem,4.4vw,3rem));overflow:hidden;border:1px solid rgba(255,255,255,.17);border-radius:14px;background:#f8f7f3;box-shadow:0 38px 110px rgba(0,0,0,.46);transform:translateY(14px) scale(.99);transition:transform .28s cubic-bezier(.22,1,.36,1)}
.property-gallery-modal.is-open .property-gallery-dialog{transform:none}
.property-gallery-header{position:relative;display:flex;align-items:flex-start;justify-content:space-between;gap:1.5rem;padding:1.15rem 4.5rem 1rem 1.35rem;border-bottom:1px solid rgba(13,33,68,.11);background:#fff}
.property-gallery-header-copy{min-width:0}
.property-gallery-kicker{margin:0 0 .34rem;color:var(--gold);font-size:.66rem;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.property-gallery-title{margin:0;max-width:900px;font-family:var(--display);font-size:clamp(1.35rem,2.25vw,2.15rem);font-weight:400;line-height:1.08;color:var(--navy)}
.property-gallery-meta{display:flex;align-items:center;gap:.75rem;margin-top:.55rem;color:var(--muted);font-size:.82rem;font-weight:650}
.property-gallery-meta span+span:before{content:"·";margin-right:.75rem;color:var(--gold)}
.property-gallery-close{position:absolute;z-index:4;right:1rem;top:1rem;display:grid;width:42px;height:42px;place-items:center;border:1px solid rgba(13,33,68,.15);border-radius:50%;background:#fff;color:var(--navy);transition:background .2s ease,color .2s ease,border-color .2s ease,transform .2s ease}
.property-gallery-close:hover,.property-gallery-close:focus-visible{border-color:var(--gold);background:var(--gold);outline:none;transform:rotate(4deg)}
.property-gallery-stage{position:relative;display:grid;min-height:0;place-items:center;overflow:hidden;background:#091a36;touch-action:pan-y}
.property-gallery-main{display:block;width:100%;height:min(64dvh,720px);min-height:260px;object-fit:contain;user-select:none;-webkit-user-drag:none}
.property-gallery-nav{position:absolute;z-index:3;top:50%;display:grid;width:48px;height:48px;place-items:center;border:1px solid rgba(255,255,255,.34);border-radius:50%;background:rgba(3,16,36,.68);color:#fff;transform:translateY(-50%);backdrop-filter:blur(7px);transition:background .2s ease,border-color .2s ease,transform .2s ease}
.property-gallery-nav:hover,.property-gallery-nav:focus-visible{border-color:var(--gold);background:var(--gold);color:var(--navy);outline:none;transform:translateY(-50%) scale(1.05)}
.property-gallery-prev{left:1rem}.property-gallery-next{right:1rem}
.property-gallery-thumbnails-wrap{position:relative;border-top:1px solid rgba(13,33,68,.11);background:#fff}
.property-gallery-thumbnails{display:flex;gap:.65rem;overflow-x:auto;padding:.85rem 1rem 1rem;scroll-behavior:smooth;scrollbar-width:thin;scrollbar-color:rgba(13,33,68,.28) transparent}
.property-gallery-thumb{position:relative;width:112px;aspect-ratio:1.5;flex:0 0 112px;overflow:hidden;border:2px solid transparent;border-radius:4px;background:#e5e6e3;opacity:.62;transition:opacity .2s ease,border-color .2s ease,transform .2s ease}
.property-gallery-thumb img{display:block;width:100%;height:100%;object-fit:cover}
.property-gallery-thumb:hover,.property-gallery-thumb:focus-visible{opacity:1;outline:none;transform:translateY(-2px)}
.property-gallery-thumb.is-active{border-color:var(--gold);opacity:1}
.property-gallery-swipe-hint{display:none}
body.property-gallery-lock{overflow:hidden}

@media(max-width:960px){.sold-properties-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sold-property-content h3{min-height:6.25rem}}
@media(max-width:640px){
  .current-properties-section{padding-bottom:5rem}.sold-properties-section{padding-bottom:5.5rem}.sold-properties-heading{margin-bottom:1.65rem}.sold-properties-heading h2{font-size:clamp(2.7rem,12vw,3.7rem)}.sold-properties-heading>p:last-child{font-size:.98rem;line-height:1.65}
  .sold-properties-grid{grid-template-columns:1fr;gap:1.15rem}.sold-property-card{border-radius:11px}.sold-property-image-wrap{aspect-ratio:1.48}.sold-property-content{padding:1.05rem 1.1rem 1.2rem}.sold-property-content h3{min-height:0;font-size:1.58rem}.sold-property-status{left:.8rem;bottom:.8rem;font-size:.58rem;padding:.43rem .6rem}.sold-property-gallery-count{right:.8rem;top:.8rem;font-size:.59rem;padding:.42rem .55rem}.sold-property-gallery-count svg{width:15px;height:15px}.sold-archive-panel{margin-top:4.4rem;padding-top:2.4rem}.sold-archive-copy h3{font-size:2.55rem}.sold-archive-toggle{width:100%;padding:.85rem .9rem;font-size:.65rem;letter-spacing:.085em}
  .property-gallery-modal{padding:0;place-items:stretch}.property-gallery-dialog{width:100%;max-height:100dvh;height:100dvh;border:0;border-radius:0}.property-gallery-header{padding:.9rem 3.8rem .8rem 1rem}.property-gallery-kicker{font-size:.58rem}.property-gallery-title{font-size:1.23rem;line-height:1.12}.property-gallery-meta{margin-top:.4rem;font-size:.72rem}.property-gallery-close{right:.7rem;top:.7rem;width:39px;height:39px}.property-gallery-main{height:55dvh;min-height:230px}.property-gallery-nav{width:42px;height:42px}.property-gallery-prev{left:.55rem}.property-gallery-next{right:.55rem}.property-gallery-thumbnails{gap:.5rem;padding:.7rem .75rem calc(.8rem + env(safe-area-inset-bottom))}.property-gallery-thumb{width:88px;flex-basis:88px}.property-gallery-swipe-hint{position:absolute;z-index:2;left:50%;bottom:.75rem;display:block;padding:.34rem .55rem;border-radius:2px;background:rgba(3,16,36,.68);color:rgba(255,255,255,.8);font-size:.58rem;font-weight:750;letter-spacing:.08em;text-transform:uppercase;transform:translateX(-50%);pointer-events:none;backdrop-filter:blur(5px)}
}
@media(prefers-reduced-motion:reduce){.sold-property-card,.sold-property-image,.sold-archive-toggle-icon:after,.property-gallery-modal,.property-gallery-dialog,.property-gallery-nav,.property-gallery-close,.property-gallery-thumb{transition:none}.sold-properties-grid-additional{animation:none}.property-gallery-thumbnails{scroll-behavior:auto}}

/* RC2.39 – Galerie-Fix: feste mobile Breite und zuverlässig klickbare Pfeile */
.property-gallery-modal,
.property-gallery-dialog,
.property-gallery-header,
.property-gallery-header-copy,
.property-gallery-stage,
.property-gallery-main,
.property-gallery-thumbnails-wrap,
.property-gallery-thumbnails{box-sizing:border-box;min-width:0}
.property-gallery-modal{width:100%;max-width:100dvw;overflow:hidden}
.property-gallery-dialog{grid-template-columns:minmax(0,1fr);max-width:100%;min-width:0}
.property-gallery-header{width:100%;max-width:100%}
.property-gallery-header-copy{width:100%;max-width:100%;overflow:hidden}
.property-gallery-title{max-width:100%;overflow-wrap:anywhere}
.property-gallery-stage{display:flex;width:100%;max-width:100%;min-width:0;align-items:center;justify-content:center;overflow:hidden;isolation:isolate}
.property-gallery-main{display:block;flex:0 1 100%;width:100%;max-width:100%;min-width:0;object-fit:contain;object-position:center center;touch-action:pan-y}
.property-gallery-nav{z-index:8;pointer-events:auto;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none}
.property-gallery-nav svg{pointer-events:none}
.property-gallery-thumbnails-wrap{width:100%;max-width:100%;overflow:hidden}
.property-gallery-thumbnails{width:100%;max-width:100%;overscroll-behavior-x:contain}
body.property-gallery-lock{width:100%;max-width:100%;overflow:hidden}

@media(max-width:640px){
  .property-gallery-modal{inset:0;width:100dvw;max-width:100dvw;overflow:hidden}
  .property-gallery-dialog{width:100dvw;max-width:100dvw;min-width:0;height:100dvh;max-height:100dvh;overflow:hidden}
  .property-gallery-header{width:100%;max-width:100%;padding-left:max(1rem,env(safe-area-inset-left));padding-right:max(3.8rem,calc(3rem + env(safe-area-inset-right)))}
  .property-gallery-stage{width:100%;max-width:100%;height:55dvh;min-height:230px;overflow:hidden}
  .property-gallery-main{width:100%;max-width:100%;height:100%;min-height:0;object-fit:contain;object-position:center center}
  .property-gallery-prev{left:max(.55rem,env(safe-area-inset-left))}
  .property-gallery-next{right:max(.55rem,env(safe-area-inset-right))}
  .property-gallery-swipe-hint{max-width:calc(100% - 6.5rem);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .property-gallery-thumbnails{padding-left:max(.75rem,env(safe-area-inset-left));padding-right:max(.75rem,env(safe-area-inset-right))}
}

