/* RMS homepage crystal media gallery · 2026-10-25 v4
   Preserves entire uploaded poster with object-fit:contain. No database changes. */
.rhm-section{position:relative;overflow:hidden;isolation:isolate;padding:54px 0 62px;background:linear-gradient(135deg,#fff8ec 0%,#f4fbff 42%,#eef9f0 100%)}
.rhm-section:before,.rhm-section:after{content:"";position:absolute;pointer-events:none;z-index:-1;border-radius:50%;filter:blur(8px)}
.rhm-section:before{width:530px;height:530px;background:radial-gradient(circle,#ffb15d36,transparent 70%);top:-260px;left:-180px}
.rhm-section:after{width:660px;height:600px;background:radial-gradient(circle,#32b9a624,transparent 65%);bottom:-260px;right:-220px}
.rhm-movement{background:linear-gradient(125deg,#f1f7ff,#fffdf8 52%,#edfbf8)}
.rhm-layout{position:relative}
.rhm-head{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:25px}
.rhm-head-copy{min-width:0;max-width:850px}
.rhm-kicker{display:inline-flex;align-items:center;gap:9px;border:1px solid #edcfaa;background:#fff9f0d9;box-shadow:0 5px 18px #5a342e0c;padding:7px 12px;border-radius:100px;color:#9b4519;font-weight:800;letter-spacing:.055em;font-size:12px;margin-bottom:10px}
.rhm-kicker-dot{width:8px;height:8px;flex:none;border-radius:50%;background:linear-gradient(135deg,#fb872b,#0b8f60);box-shadow:0 0 0 3px #faddbd}
.rhm-head h2{font-size:clamp(27px,3.4vw,43px);line-height:1.19;letter-spacing:-.035em;color:#102b52;margin:0 0 8px;font-weight:850}
.rhm-head p{font-size:clamp(14px,1.5vw,17px);line-height:1.6;color:#516c81;margin:0}
.rhm-controls{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex:none}
.rhm-count-chip{border-radius:999px;padding:9px 12px;background:#0a795b;color:#fff;font-weight:800;font-size:12px;white-space:nowrap;box-shadow:0 7px 20px #1176572d}
.rhm-counter{color:#254b68;font-weight:800;font-size:13px;min-width:48px;text-align:center;font-variant-numeric:tabular-nums}
.rhm-arrow{appearance:none;display:grid;place-items:center;width:42px;height:42px;border:1px solid #ccdbe5;border-radius:50%;background:#ffffffdb;color:#13355c;font-size:21px;cursor:pointer;box-shadow:0 8px 19px #173d5115;transition:background .17s,transform .17s}
.rhm-arrow:hover,.rhm-arrow:focus-visible{background:#f2fcff;transform:translateY(-2px)}
.rhm-arrow:focus-visible,.rhm-dot:focus-visible,.rhm-photo-action:focus-visible{outline:3px solid #fdab46;outline-offset:3px}
.rhm-arrow:disabled{opacity:.38;cursor:default;transform:none}
.rhm-slider{display:flex;gap:17px;scrollbar-width:none;overflow-x:auto;scroll-snap-type:x mandatory;scroll-padding-inline:2px;overscroll-behavior-inline:contain;padding:4px 2px 28px}
.rhm-slider::-webkit-scrollbar{display:none}
.rhm-slide{box-sizing:border-box;min-width:0;flex:0 0 calc((100% - 34px)/3);scroll-snap-align:start;display:flex;flex-direction:column;position:relative;border:1px solid #ffffffeb;border-radius:22px;background:linear-gradient(140deg,#fffffff8,#fdfef9f5);box-shadow:0 13px 30px #173a5621,0 2px 6px #10305b0d;overflow:hidden;transition:transform .24s ease,box-shadow .24s ease}
.rhm-slide:hover{transform:translateY(-4px);box-shadow:0 23px 47px #173a5628,0 4px 9px #173a560d}
.rhm-media-frame{position:relative;padding:10px 10px 0;min-width:0}
.rhm-photo{height:300px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(circle at 35% 15%,#fff 0%,#ecf8ff 50%,#e6f2ed 100%);border:1px solid #e5edf0;border-radius:15px;position:relative}
.rhm-photo-action{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:0;margin:0;border:0;appearance:none;background:transparent;cursor:zoom-in;text-decoration:none}
.rhm-photo-action img{display:block;width:100%;height:100%;object-fit:contain;object-position:center;transition:transform .32s ease}
.rhm-slide:hover .rhm-photo-action img{transform:scale(1.02)}
.rhm-photo-chip{position:absolute;top:22px;left:22px;pointer-events:none;background:linear-gradient(125deg,#0a4e83,#092b5e);color:#fff;border:1px solid #ffffff80;border-radius:10px;padding:5px 10px;font-size:12px;line-height:1.2;font-weight:800;box-shadow:0 5px 18px #0f30613d}
.rhm-photo-corner{position:absolute;right:20px;bottom:10px;display:grid;place-items:center;width:35px;height:35px;border-radius:50%;background:#fff;color:#135c86;box-shadow:0 4px 16px #122e4e22;border:1px solid #e0edf5;pointer-events:none;font-size:18px}
.rhm-copy{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:19px 21px 24px}
.rhm-copy h3{font-size:clamp(18px,1.5vw,22px);line-height:1.37;color:#12365a;overflow-wrap:anywhere;margin:0;font-weight:800}
.rhm-copy p{white-space:pre-line;font-size:14px;line-height:1.65;color:#52677d;margin:0;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}
.rhm-readmore{display:inline-flex;align-items:center;gap:8px;margin-top:auto;font-weight:800;color:#075f50;background:#ecf9f4;border:1px solid #c8e9d9;border-radius:12px;padding:9px 13px;text-decoration:none;font-size:13px}
.rhm-readmore:hover{background:#c9efdf}
.rhm-photo-hint{margin-top:auto;font-size:12px;font-weight:700;color:#2e7d70}
.rhm-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:0;min-height:25px}
.rhm-bottom-note{font-size:13px;font-weight:800;color:#246953;letter-spacing:.01em}
.rhm-bottom-note b{color:#e78437;padding:0 7px}
.rhm-dots{display:flex;align-items:center;justify-content:center;gap:9px;margin-left:auto}
.rhm-dot{width:9px;height:9px;border:0;border-radius:15px;padding:0;background:#b4c9d7;cursor:pointer;transition:width .2s ease,background .2s ease}
.rhm-dot.is-active{width:25px;background:linear-gradient(90deg,#f8993b,#078f72)}
.rhm-arrow[hidden],.rhm-counter[hidden],.rhm-dots[hidden]{display:none!important}
.rh-news-card .rhm-news-image{width:100%;height:210px;max-height:210px;display:flex;align-items:center;justify-content:center;background:#edf4f8;border-radius:14px;margin-bottom:14px;overflow:hidden}
.rh-news-card .rhm-news-image img{display:block;width:100%;height:100%;object-fit:contain}
.rhm-article-photo{display:block;max-width:100%;width:auto;max-height:760px;object-fit:contain;margin:20px auto 24px;border-radius:14px;background:#f5f7fb;box-shadow:0 8px 26px #132d5812}
/* Only open images in a lightbox on explicit click: no content changes. */
.rhm-lightbox{width:min(98vw,1150px);max-width:1150px;height:min(95dvh,900px);max-height:95dvh;padding:0;border:0;border-radius:18px;background:#0b1c31;color:#fff;box-shadow:0 22px 90px #0009;overflow:hidden}
.rhm-lightbox::backdrop{background:#071527db;backdrop-filter:blur(7px)}
.rhm-lightbox-inner{display:flex;flex-direction:column;height:100%;padding:14px}
.rhm-lightbox-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:2px 7px 12px}
.rhm-lightbox-title{font-weight:800;font-size:16px;line-height:1.3}
.rhm-lightbox-close{background:#ffffff21;border:1px solid #ffffff55;border-radius:11px;color:#fff;font-size:22px;cursor:pointer;min-width:42px;min-height:42px}
.rhm-lightbox img{display:block;max-height:calc(95dvh - 95px);max-width:100%;width:100%;height:100%;object-fit:contain}
@media(max-width:960px){.rhm-slide{flex-basis:calc((100% - 17px)/2)}.rhm-photo{height:320px}.rhm-head h2{font-size:34px}}
@media(max-width:650px){.rhm-section{padding:39px 0 45px}.rhm-head{align-items:flex-start;flex-wrap:wrap;gap:13px;margin-bottom:18px}.rhm-head h2{font-size:30px}.rhm-head p{font-size:14px}.rhm-controls{width:100%;justify-content:flex-end}.rhm-count-chip{margin-right:auto}.rhm-slider{gap:12px;padding-bottom:19px}.rhm-slide{flex-basis:93%;border-radius:19px}.rhm-media-frame{padding:8px 8px 0}.rhm-photo{height:340px;border-radius:12px}.rhm-copy{padding:17px 17px 20px}.rhm-copy h3{font-size:21px}.rhm-bottom-note{font-size:11px}.rhm-bottom-note b{padding:0 3px}}
@media(max-width:430px){.rhm-slide{flex-basis:94%}.rhm-photo{height:315px}.rhm-bottom{flex-wrap:wrap;justify-content:center}.rhm-bottom-note{width:100%;text-align:center}}
@media(prefers-reduced-motion:reduce){.rhm-slide,.rhm-photo-action img,.rhm-arrow,.rhm-dot{transition:none!important}}
