/* =========================================================
   components.css — cards, lists, dashboard, news, documents
   ========================================================= */

/* ---------- FEATURE CARDS ---------- */
.feature-card{
  background:var(--paper-raised); border:1px solid var(--paper-line); border-radius:var(--radius-m);
  padding:28px;
  transition:transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease, border-color .28s ease;
}
.feature-card:hover{transform:translateY(-5px); box-shadow:var(--shadow); border-color:transparent;}
.feature-icon{
  width:46px; height:46px; border-radius:12px;
  background:var(--accent-soft); color:var(--moss);
  display:flex; align-items:center; justify-content:center; margin-bottom:18px;
}
.feature-icon svg{width:23px; height:23px;}
.feature-card h3{font-size:18.5px; margin-bottom:8px;}
.feature-card p{font-size:14.5px; margin-bottom:0;}

/* ---------- VISION / MISSION ---------- */
.vm-grid{display:grid; grid-template-columns:1fr 1fr; gap:22px; margin-bottom:20px;}
@media (max-width:800px){ .vm-grid{grid-template-columns:1fr;} }
.vm-card{
  padding:32px; border-radius:var(--radius-m);
  background:var(--paper-raised); border:1px solid var(--paper-line);
}
.vm-card .tag{
  font-size:12px; font-weight:800; letter-spacing:0.05em;
  color:var(--gold); margin-bottom:12px; display:block;
}
.vm-card p{color:var(--text); font-size:15.5px; margin:0;}

/* ---------- FUNCTIONS ---------- */
.func-list{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
@media (max-width:900px){ .func-list{grid-template-columns:repeat(2,1fr);} }
@media (max-width:600px){ .func-list{grid-template-columns:1fr;} }
.func-item{
  padding:24px; border-radius:var(--radius-m); border:1px solid var(--paper-line);
  background:var(--paper-raised); display:flex; flex-direction:column; gap:12px;
}
.func-item .fi-icon{
  width:40px; height:40px; border-radius:10px;
  background:var(--accent-soft); color:var(--moss);
  display:flex; align-items:center; justify-content:center;
}
.func-item .fi-icon svg{width:20px; height:20px;}
.func-item h4{font-size:16px; margin:0;}

/* ---------- PEOPLE / GOVERNANCE ---------- */
.people-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
@media (max-width:800px){ .people-grid{grid-template-columns:1fr 1fr;} }
@media (max-width:520px){ .people-grid{grid-template-columns:1fr;} }
/* Three board members, so the cards run as compact horizontal
   entries rather than tall portrait tiles: a small circular photo
   beside the name reads as a leadership listing and keeps the
   supplied 300px images inside their native resolution. */
.person-card{
  margin:0; padding:18px;
  display:flex; align-items:center; gap:16px;
  border-radius:var(--radius-m);
  background:var(--paper-raised); border:1px solid var(--paper-line);
  transition:transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.person-card:hover{
  transform:translateY(-3px);
  box-shadow:var(--shadow);
  border-color:transparent;
}

.person-photo{
  width:112px; height:112px; flex-shrink:0;
  border-radius:50%; overflow:hidden; background:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 0 0 3px var(--paper-raised), 0 0 0 5px var(--ring, var(--moss));
}
.person-photo img{
  width:100%; height:100%; display:block;
  object-fit:cover; object-position:center 15%;
}

/* fallback for a member whose portrait has not been supplied */
.person-initials{
  width:100%; height:100%; color:#fff;
  display:flex; align-items:center; justify-content:center;
  font-family:'Fraunces',serif; font-size:24px; font-weight:600;
  background:var(--ring, var(--moss)) !important;
}

.person-card figcaption{min-width:0;}
.person-card b{
  display:block; font-family:'Fraunces',serif;
  font-size:16.5px; font-weight:600; line-height:1.25;
  color:var(--ink); margin-bottom:5px;
}
.person-role{
  display:block; font-size:12.5px; line-height:1.5; color:var(--text-soft);
}

@media (max-width:520px){
  .person-card{padding:16px;}
  .person-photo{width:92px; height:92px;}
}

.committee-list{list-style:none; margin:0; padding:0; display:grid; gap:10px;}
.committee-list li{
  display:flex; align-items:center; gap:12px; padding:14px 18px; border-radius:12px;
  background:var(--paper-raised); border:1px solid var(--paper-line);
  font-size:14.5px; font-weight:600; color:var(--ink-soft);
}
.committee-list li .num{
  width:26px; height:26px; border-radius:50%;
  background:var(--accent-soft); color:var(--moss);
  font-size:12px; font-weight:800; display:flex; align-items:center; justify-content:center;
  flex-shrink:0; font-family:'Fraunces',serif;
}

/* ---------- NEWS / EVENTS ---------- */
.tabswitch{
  display:inline-flex; background:var(--paper-raised); border:1px solid var(--paper-line);
  padding:4px; border-radius:100px; margin-bottom:30px;
}
.tabswitch button{
  padding:9px 20px; border-radius:100px; border:none; background:transparent;
  font-weight:700; font-size:13.5px; color:var(--text-soft);
  transition:background .2s ease, color .2s ease;
}
.tabswitch button.active{background:var(--moss); color:#fff;}
.tab-panel{display:none;}
.tab-panel.active{display:grid; grid-template-columns:repeat(3,1fr); gap:20px;}
@media (max-width:900px){ .tab-panel.active{grid-template-columns:1fr;} }

.news-card{
  border-radius:var(--radius-m); overflow:hidden;
  border:1px solid var(--paper-line); background:var(--paper-raised);
}
.news-thumb{
  aspect-ratio:16/10; position:relative;
  background:linear-gradient(135deg,var(--c1,#2f5233),var(--c2,#4c9f38));
}
.news-thumb span{
  position:absolute; left:14px; bottom:12px; color:#fff; font-size:11.5px; font-weight:700;
  background:rgba(0,0,0,0.28); padding:4px 10px; border-radius:100px;
}
.news-body{padding:18px 18px 20px;}
.news-body .date{font-size:12px; color:var(--moss); font-weight:700; margin-bottom:6px; display:block;}
.news-body h4{font-family:'Fraunces',serif; font-size:16.5px; font-weight:600; margin:0 0 6px;}
.news-body p{font-size:13.5px; margin:0;}

/* ---------- IMPACT DASHBOARD ---------- */
.dash-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:20px;}
@media (max-width:900px){ .dash-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:560px){ .dash-grid{grid-template-columns:1fr;} }
.dash-card{
  padding:28px; border-radius:var(--radius-m);
  background:var(--paper-raised); border:1px solid var(--paper-line);
  position:relative; overflow:hidden;
}
.dash-card .di-icon{
  width:42px; height:42px; border-radius:11px;
  background:var(--accent-soft); color:var(--moss);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
}
.dash-card .di-icon svg{width:21px; height:21px;}
.dash-num{
  font-family:'Fraunces',serif; font-size:38px; font-weight:600; color:var(--ink);
  display:flex; align-items:baseline; gap:4px;
}
.dash-num .unit{font-size:16px; font-weight:600; color:var(--moss);}
.dash-card .di-label{font-size:14px; color:var(--text-soft); margin-top:6px;}
.dash-bar{height:5px; border-radius:4px; background:var(--paper-line); margin-top:16px; overflow:hidden;}
.dash-bar i{display:block; height:100%; background:var(--moss); width:0%; transition:width 1.4s cubic-bezier(.2,.8,.2,1);}
.dash-note{font-size:12.5px; color:var(--text-soft); margin-top:34px; display:flex; align-items:center; gap:8px;}
.dash-note svg{width:15px; height:15px; flex-shrink:0;}

/* ---------- DOCUMENT / POLICY ROWS ---------- */
.doc-list{display:grid; gap:12px;}
.doc-row{
  display:flex; align-items:center; gap:16px; padding:18px 20px; border-radius:12px;
  background:var(--paper-raised); border:1px solid var(--paper-line);
  transition:transform .2s ease, box-shadow .2s ease;
}
.doc-row:hover{transform:translateX(4px); box-shadow:var(--shadow);}
.doc-row .doc-icon{
  width:38px; height:38px; border-radius:9px;
  background:var(--accent-soft); color:var(--moss);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.doc-row .doc-icon svg{width:18px; height:18px;}
.doc-row b{font-size:14.5px; color:var(--ink); display:block;}
.doc-row span{font-size:12.5px; color:var(--text-soft);}
.doc-row .doc-chevron{margin-left:auto; color:var(--text-soft); flex-shrink:0;}
.doc-row .doc-chevron svg{width:16px; height:16px;}

/* ---------- SDG DETAIL PAGE ---------- */
/* icon, heading, then the write-up running the full container width */
.sdg-contribution h2{font-size:26px; margin:0 0 18px;}
.sdg-icon-big{
  width:120px; height:120px; border-radius:26px; background:var(--accent); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:var(--shadow); margin-bottom:26px;
}
.sdg-icon-big img{
  width:auto; height:auto;
  max-width:64px; max-height:64px;   /* the artwork keeps its own aspect ratio */
}
.sdg-num-chip{
  display:inline-flex; align-items:center; gap:8px;
  font-weight:800; font-size:13px; color:var(--accent);
  background:var(--accent-soft); padding:6px 14px; border-radius:100px; margin-bottom:16px;
}
.sdg-narrative{
  font-size:16.5px; line-height:1.78; color:var(--text-soft);
  margin:0; max-width:none;
  text-align:justify; text-justify:inter-word;
  hyphens:auto; -webkit-hyphens:auto;
}
@media (max-width:640px){
  .sdg-narrative{font-size:15.5px; text-align:left;}
}
.sdg-nav-between{display:flex; justify-content:space-between; margin-top:50px; gap:16px; flex-wrap:wrap;}
.sdg-nav-btn{
  display:flex; align-items:center; gap:10px; padding:14px 20px; border-radius:14px;
  background:var(--paper-raised); border:1px solid var(--paper-line);
  font-weight:700; font-size:13.5px; color:var(--ink); cursor:pointer;
  transition:transform .2s ease;
}
.sdg-nav-btn:hover{transform:translateY(-2px);}
.sdg-nav-btn svg{width:16px; height:16px; flex-shrink:0;}

/* ---------- ABOUT NCSGI (home) ---------- */
.about-ncsgi{background:var(--paper-raised); padding:92px 0 96px;}

.about-layout{
  display:grid; grid-template-columns:1.45fr 1fr; gap:56px; align-items:start;
}

.about-main h2{
  font-size:clamp(26px, 3.4vw, 38px);
  margin:0 0 22px; max-width:19ch;
}
.about-main p{
  font-size:16.5px; line-height:1.72; margin:0 0 15px;
  text-align:justify; text-justify:inter-word;
  hyphens:none; -webkit-hyphens:none;   /* justify, but never break words */
}
.about-main p b{font-weight:700; color:var(--ink);}

/* --- what the Centre reports into --- */
.about-targets{
  padding:32px 30px; border-radius:var(--radius-l);
  background:linear-gradient(150deg, var(--moss-deep), var(--moss));
  color:#fff; box-shadow:var(--shadow);
}
.about-targets h3{
  font-family:'Manrope',sans-serif;
  font-size:11.5px; font-weight:800; letter-spacing:0.12em;
  text-transform:uppercase; color:#9fd6a8;
  margin:0 0 20px;
}
.about-targets ul{list-style:none; margin:0; padding:0; display:grid; gap:2px;}
.about-targets li{
  padding:15px 0; border-top:1px solid rgba(255,255,255,0.14);
}
.about-targets li:first-child{border-top:none; padding-top:0;}
.about-targets li span{
  display:block; font-size:10.5px; font-weight:800;
  letter-spacing:0.09em; text-transform:uppercase;
  color:rgba(255,255,255,0.6); margin-bottom:3px;
}
.about-targets li b{
  font-family:'Fraunces',serif; font-size:17px; font-weight:600; color:#fff;
}

@media (max-width:920px){
  .about-layout{grid-template-columns:1fr; gap:36px;}
  .about-main h2{max-width:none;}
}
@media (max-width:640px){
  .about-ncsgi{padding:64px 0 68px;}
  .about-main p{font-size:15.5px;}
  .about-targets{padding:26px 22px;}
  .about-targets li b{font-size:16px;}
}

/* ---------- PROJECT SECTION (SDG goal pages) ---------- */
.project-section{padding-top:0;}

/* The project title holds one line: the heading is given the full
   container width, and the type size is derived from how many
   characters the title actually has (--title-chars, set by the
   template) so a longer title simply sets smaller. */
.project-section .section-head{
  max-width:none;
  container-type:inline-size;
}
.project-section .section-head h2{
  white-space:nowrap;
  font-size:min(38px, calc(100cqw / var(--title-chars, 40) * 1.92));
}

/* --- meta strip --- */
.project-meta{
  display:flex; flex-wrap:wrap; gap:10px; margin:-26px 0 28px;
}
.pm-item{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 15px; border-radius:100px;
  background:var(--accent-soft); color:var(--accent);
  font-size:13px; font-weight:700;
}
.pm-item svg{flex-shrink:0;}

/* --- lead photograph: sized to introduce, not to dominate --- */
.project-feature{
  margin:0 auto 36px; max-width:720px;
  border-radius:var(--radius-m); overflow:hidden;
  box-shadow:var(--shadow);
}
.project-feature img{width:100%; height:auto; display:block;}

/* --- the write-up: full width --- */
.project-copy{
  margin:0 0 8px;
  text-align:justify; text-justify:inter-word;
  hyphens:auto; -webkit-hyphens:auto;
}
.project-lead{
  font-size:19px; line-height:1.6; font-weight:600; color:var(--ink);
  margin:0 0 16px; text-align:justify;
}
.project-copy p{font-size:16px; line-height:1.75; margin:0 0 14px; text-align:justify;}

/* --- any photograph is a lightbox trigger --- */
.media-btn{
  display:block; width:100%; padding:0; border:none; background:none;
  cursor:zoom-in; overflow:hidden; border-radius:inherit;
}
.media-btn img{
  width:100%; height:100%; display:block;
  transition:transform .5s cubic-bezier(.2,.8,.2,1);
}
.media-btn:hover img{transform:scale(1.04);}
.media-btn:focus-visible{outline:2.5px solid var(--gold); outline-offset:3px;}

/* --- carousel inside the write-up --- */
.carousel{position:relative; margin-top:30px;}
.car-track{
  list-style:none; margin:0; padding:2px;
  display:flex; gap:16px;
  overflow-x:auto; scroll-snap-type:x mandatory;
  scrollbar-width:none;
}
.car-track::-webkit-scrollbar{display:none;}
/* every tile is the same height, so a panorama runs wider than a
   portrait and no photograph is cropped */
.car-slide{
  flex:0 0 auto; scroll-snap-align:start;
  border-radius:var(--radius-m); overflow:hidden;
  background:var(--paper-raised);
}
.car-slide .media-btn{width:auto;}
.car-slide .media-btn img{height:240px; width:auto; max-width:none;}

.car-nav{
  position:absolute; top:50%; transform:translateY(-50%); z-index:2;
  width:42px; height:42px; border-radius:50%;
  border:1px solid var(--paper-line); background:#fff; color:var(--ink);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 10px 22px -12px rgba(20,32,22,0.55);
  transition:opacity .2s ease, transform .2s ease;
}
.car-nav:hover{transform:translateY(-50%) scale(1.06);}
.car-nav:disabled{opacity:0; pointer-events:none;}
.car-prev{left:-14px;}
.car-next{right:-14px;}

/* --- lightbox --- */
body.lb-open{overflow:hidden;}
.lightbox{
  position:fixed; inset:0; z-index:200;
  display:flex; align-items:center; justify-content:center;
  padding:5vh 6vw;
}
.lb-backdrop{position:absolute; inset:0; background:rgba(12,20,15,0.92);}
.lb-figure{
  position:relative; margin:0; z-index:1;
  max-width:100%; max-height:90vh;
  display:flex; flex-direction:column; align-items:center; gap:14px;
}
.lb-figure img{
  max-width:100%; max-height:78vh; width:auto; height:auto;
  border-radius:8px; display:block;
  box-shadow:0 30px 70px -30px rgba(0,0,0,0.9);
}
.lb-figure figcaption{
  display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  justify-content:center; text-align:center;
  font-size:13.5px; color:rgba(255,255,255,0.8);
}
.lb-count{
  font-weight:800; font-size:11.5px; letter-spacing:0.1em;
  padding:5px 11px; border-radius:100px;
  background:rgba(255,255,255,0.12); color:#fff;
}
.lb-btn{
  position:absolute; z-index:2;
  border:1px solid rgba(255,255,255,0.22); background:rgba(255,255,255,0.1);
  color:#fff; border-radius:50%;
  width:46px; height:46px; font-size:24px; line-height:1;
  display:flex; align-items:center; justify-content:center;
  transition:background .2s ease, transform .2s ease;
}
.lb-btn:hover{background:rgba(255,255,255,0.22); transform:scale(1.06);}
.lb-btn:focus-visible{outline:2.5px solid var(--gold); outline-offset:3px;}
.lb-close{top:18px; right:18px; font-size:17px;}
.lb-prev{left:18px; top:50%; margin-top:-23px;}
.lb-next{right:18px; top:50%; margin-top:-23px;}

@media (max-width:900px){
  .project-feature{max-width:none; margin-bottom:28px;}
  .car-track{gap:14px;}
  .car-slide .media-btn img{height:200px;}
  .car-prev{left:-8px;}
  .car-next{right:-8px;}
}
@media (max-width:760px){
  .project-section .section-head h2{
    white-space:normal;
    font-size:clamp(24px, 5vw, 32px);
  }
}
@media (max-width:560px){
  .project-meta{margin-top:-14px;}
  .project-lead{font-size:17px;}
  .project-copy{text-align:left;}
  .project-copy p, .project-lead{text-align:left;}
  .car-track{gap:12px;}
  .car-slide .media-btn img{height:165px;}
  .car-nav{display:none;}
  .lightbox{padding:3vh 4vw;}
  .lb-prev{left:6px;}
  .lb-next{right:6px;}
}

/* ---------- GREEN CAMPUS ---------- */
.gc-page{padding-top:60px;}

/* Name on the left, photographs on the right — the rhythm holds
   whether a system has two photographs or four. */
.gc-topic{
  display:grid; grid-template-columns:230px 1fr; gap:34px;
  padding:34px 0;
  border-top:1px solid var(--paper-line);
}
.gc-topic:first-child{border-top:none; padding-top:0;}
.gc-topic:last-child{padding-bottom:0;}

.gc-heading{position:sticky; top:118px; align-self:start;}
.gc-chip{
  width:42px; height:42px; border-radius:12px;
  background:var(--tint); color:#fff;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:14px;
}
.gc-name{
  font-family:'Fraunces',serif; font-size:22px; font-weight:600;
  color:var(--ink); line-height:1.22; margin:0;
}

/* --- photographs: equal tiles, one row per system --- */
.gc-shots{
  list-style:none; margin:0; padding:0;
  display:grid; grid-template-columns:repeat(4, 1fr); gap:14px;
}
.gc-shots li{
  border-radius:var(--radius-m); overflow:hidden;
  background:var(--paper-raised); border:1px solid var(--paper-line);
  transition:transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.gc-shots li:hover{
  transform:translateY(-4px); box-shadow:var(--shadow); border-color:transparent;
}
.gc-shots .media-btn{width:100%; height:100%;}
/* tiles are a fixed shape, so the thumbnail is cropped to fill it —
   the lightbox opens the photograph whole */
.gc-shots img{
  width:100%; height:100%; max-width:none;
  aspect-ratio:4/3; object-fit:cover; display:block;
  transition:transform .5s cubic-bezier(.2,.8,.2,1);
}
.gc-shots li:hover img{transform:scale(1.05);}

@media (max-width:900px){
  .gc-page{padding-top:44px;}
  .gc-topic{grid-template-columns:1fr; gap:18px; padding:28px 0;}
  .gc-heading{position:static; display:flex; align-items:center; gap:13px;}
  .gc-chip{width:36px; height:36px; margin-bottom:0;}
  .gc-name{font-size:20px;}
  .gc-shots{grid-template-columns:repeat(3, 1fr); gap:12px;}
}
@media (max-width:640px){
  .gc-shots{grid-template-columns:repeat(2, 1fr); gap:10px;}
}

/* ---------- STUDENT PROJECTS (students page) ---------- */
/* Section introduction: runs the full container width, like the
   individual project write-ups below it. */
.sp-intro{margin:-22px 0 44px;}
.sp-intro p{
  font-size:16.5px; line-height:1.78; margin:0 0 15px;
  text-align:justify; text-justify:inter-word;
  hyphens:auto; -webkit-hyphens:auto;
}
.sp-intro p:first-child{color:var(--text); font-weight:500;}
.sp-intro p:last-child{margin-bottom:0;}

.sp-list{display:grid; gap:0;}

.sp-item{
  padding:38px 0;
  border-top:1px solid var(--paper-line);
}
.sp-item:first-child{border-top:none; padding-top:0;}
.sp-item:last-child{padding-bottom:0;}

.sp-title{
  container-type:inline-size;
  font-family:'Fraunces',serif; font-weight:600; color:var(--ink);
  line-height:1.18; margin:0 0 16px; max-width:none;
  font-size:min(30px, calc(100cqw / var(--title-chars, 50) * 1.92));
}

.sp-item .project-meta{margin:0 0 20px;}

.sp-copy{
  font-size:16px; line-height:1.72; margin:0 0 14px;
  text-align:justify; text-justify:inter-word;
  hyphens:auto; -webkit-hyphens:auto;
}

/* equal tiles, lightbox on click */
.sp-shots{
  list-style:none; margin:24px 0 0; padding:0;
  display:grid; grid-template-columns:repeat(5, 1fr); gap:12px;
}
.sp-shots li{
  border-radius:var(--radius-m); overflow:hidden;
  background:var(--paper); border:1px solid var(--paper-line);
  transition:transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.sp-shots li:hover{transform:translateY(-4px); box-shadow:var(--shadow); border-color:transparent;}
.sp-shots .media-btn{width:100%; height:100%;}
.sp-shots img{
  width:100%; height:100%; max-width:none;
  aspect-ratio:4/3; object-fit:cover; display:block;
  transition:transform .5s cubic-bezier(.2,.8,.2,1);
}
.sp-shots li:hover img{transform:scale(1.05);}

/* link back to the NSBM article the write-up is drawn from */
.sp-source{
  display:inline-flex; align-items:center; gap:8px; margin-top:20px;
  font-size:13.5px; font-weight:700; color:var(--moss);
  border-bottom:1.5px solid transparent;
  transition:border-color .2s ease;
}
.sp-source:hover{border-bottom-color:var(--moss);}

@media (max-width:1000px){
  .sp-shots{grid-template-columns:repeat(4, 1fr);}
}
@media (max-width:760px){
  .sp-intro{margin:-12px 0 32px;}
  .sp-intro p{font-size:15.5px; text-align:left;}
  .sp-title{font-size:clamp(20px, 4.6vw, 26px);}
  .sp-copy{text-align:left;}
  .sp-shots{grid-template-columns:repeat(3, 1fr); gap:10px;}
}
@media (max-width:520px){
  .sp-shots{grid-template-columns:repeat(2, 1fr);}
}

/* ---------- HOME GALLERY CAROUSEL ---------- */
.gallery-carousel{margin-top:6px;}
/* Four tiles in view, the rest reached with the arrows. Built on the
   same .carousel markup as the project pages, so it inherits the
   arrow behaviour in js/main.js and the shared lightbox. */
.gallery-carousel .car-track{
  display:flex; gap:18px;
  overflow-x:auto; scroll-snap-type:x mandatory;
  scrollbar-width:none;
  list-style:none; margin:0; padding:2px;
}
.gallery-carousel .car-track::-webkit-scrollbar{display:none;}

.gallery-carousel .car-slide{
  flex:0 0 calc((100% - 3 * 18px) / 4);
  scroll-snap-align:start;
  border-radius:var(--radius-m); overflow:hidden;
  background:var(--paper-raised); border:1px solid var(--paper-line);
  transition:transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, border-color .25s ease;
}
.gallery-carousel .car-slide:hover{
  transform:translateY(-4px); box-shadow:var(--shadow); border-color:transparent;
}
.gallery-carousel .media-btn{width:100%; height:100%;}
.gallery-carousel img{
  width:100%; height:100%; max-width:none;
  /* square tiles sit taller than 4:3 and crop the portrait
     photographs far less harshly than a landscape frame would */
  aspect-ratio:1/1; object-fit:cover; display:block;
  transition:transform .5s cubic-bezier(.2,.8,.2,1);
}
.gallery-carousel .car-slide:hover img{transform:scale(1.05);}

@media (max-width:900px){
  .gallery-carousel .car-track{gap:14px;}
  .gallery-carousel .car-slide{flex-basis:calc((100% - 2 * 14px) / 3);}
}
@media (max-width:640px){
  .gallery-carousel .car-slide{flex-basis:calc((100% - 12px) / 2);}
  .gallery-carousel .car-track{gap:12px;}
}
