/* ==========================================================
   INNER CSS
   Shared inner shell + modules + module tiles
   Depends on: base.css + layout.css
   ========================================================== */

:root{
  --inner-container-width: var(--container-92);
  --inner-container-max: var(--container-max);
  --stack-gap: var(--s16);
  --grid-gap: var(--s16);
  --inner-top-pad: 60px;
}


.d25-page--inner .d25-inner-shell{
  margin:30px auto;
}
.d25-inner-shell > .d25-results-search {
  margin-bottom: 30px;
}

/* ==========================================================
   BREADCRUMBS
   ========================================================== */

.d25-titlebar{ border: 0; }
.d25-crumbs-hero{
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  color: var(--grey-05);
  white-space: nowrap;
  padding: 10px; 
}

.d25-crumbs-back{
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  padding-left: 20px;
  color: var(--grey-08);
}

.d25-crumbs-back:hover{ text-decoration: underline; }

.d25-crumbs-back.is-disabled{
  color: var(--grey-05);
  cursor: default;
  text-decoration: none;
}

.d25-crumbs-ol{
  display: inline-flex;
  align-items: center;
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.d25-crumbs-a,
.d25-crumbs-cur{
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}

.d25-crumbs-a:hover{ text-decoration: underline; }

@media (max-width: 640px){
  .d25-crumbs-hero{
    padding: 6px 40px; 
    white-space: nowrap;
    justify-content: center;
  font-size: .75rem;

  }

  .d25-crumbs-back{
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    padding-left: 16px;
  }

  .d25-crumbs-ol{
    justify-content: center;
    gap: 8px;
  }
}

/* ==========================================================
   TOP STRIP (CLEAN)
   - Title + Subtitle only
   ========================================================== */

.d25-topstrip{
  position:relative;
  width:100vw;
  margin-inline:calc(50% - 50vw);
}

.d25-topstrip::before,
.d25-topstrip::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:1px;
  background:var(--border-y-grad-center);
  pointer-events:none;
  z-index:1;
}

.d25-topstrip::before{ top:0; }
.d25-topstrip::after{ bottom:0; }

.d25-topstrip__inner{
  width:min(94vw, 1640px);
  margin:0 auto;
}

.d25-topstrip__summary{
  padding:10px 0;
  display:flex;
  flex-direction:column;
  align-items:center;
}

/* Title */
.d25-topstrip__title{
  margin:0;
  text-align:center;
  font-size:1.25rem;
text-transform: uppercase;
letter-spacing: 0.06em;
}


@media (max-width:520px){
  .d25-topstrip__summary{
    padding:8px 0;
    gap:4px;
  }

  .d25-topstrip__title{
    font-size:1rem;
    line-height:1.15;
  }
}

/* ==========================================================
   MODULES STAGE (Modules main page cards)
   ========================================================== */

.d25-modules-stage{
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  padding: 20px 0;
}

.d25-modules-stage__inner{
  width: min(85vw, 1640px);
  margin-inline: auto;
}

/* Scope grid to modules-stage to avoid clashing with category tiles */
.d25-modules-stage__inner .d25-modules-grid__inner{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px;
}

/* Module card */
.d25-module{
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  padding: 40px 50px 50px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-1);

  color: var(--grey-08);
  line-height: 1;
  overflow: visible;
  transition: transform var(--dur-2) var(--ease-out);
}

@media (hover:hover){
  .d25-module:hover{ transform: translateY(-8px); }
}

/* Whole card clickable */
@media (hover:hover) and (pointer:fine){
  .d25-module{ cursor: pointer; }

  .d25-module__cardlink{
    position: absolute;
    inset: 0;
    display: block;
    border-radius: inherit;
    z-index: 5;
    text-decoration: none;
    background: transparent;
  }

  .d25-module__hdr,
  .d25-module__sub,
  .d25-module__morebody{
    position: relative;
    z-index: 1;
  }

  .d25-module__link{ position: relative; z-index: 6; }
  .d25-module__go{ position: absolute; z-index: 7; }

  .d25-module__cardlink:focus-visible{
    outline-offset: 8px;
    border-radius: inherit;
  }
}

@media (hover:none){
  .d25-module__cardlink{ display: none; }
}

/* Header band */
.d25-module__hdr{
  width: calc(100% + 100px);
  margin: -40px -50px 18px;
  padding: 16px 40px;

  display: flex;
  justify-content: center;

  background: #f8f8f4;
  border-radius: 16px 16px 0 0;
}

.d25-module__link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.d25-module__ico.d25-icon{
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  color: var(--brand-green);
}

.d25-module__title{
  margin: 0;
  font-size: 1.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #555642;
  line-height: 1;
}

.d25-module__sub{
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.d25-module__morebody{ margin-top: 6px; }

.d25-module__desc{
  margin: 0;
  font-size: 1rem;
  line-height: 1.75;
}

/* ==========================================================
   Modules · Accordion Integration
   ========================================================== */

.d25-module .d25-module__acc{
  margin-top: 16px;
  position: relative;
  z-index: 8;
}

.d25-module .d25-acc__sum{
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  transition: transform var(--dur-2) var(--ease-out);
  transform-origin: center;
}

.d25-module .d25-acc__sum .d25-module__sub{
  margin: 0;
  display: inline;
}

.d25-module .d25-chev{
  line-height: 1;
}

@media (hover:hover){
  .d25-module .d25-acc__sum:hover{
    transform: scale(1.12); /* 1.2 is aggressive, 1.12 feels premium */
  }
}

/* ==========================================================
   GO CTA (global look)
   ========================================================== */

.d25-module__go{
  width: 40px;
  height: 40px;
  border-radius: 999px;

  display: inline-grid;
  place-items: center;

  background: var(--surface);
  color: var(--brand-green);
  text-decoration: none;

  box-shadow: var(--shadow-1);
  transition: transform var(--dur-2),
              background var(--dur-1),
              color var(--dur-1),
              box-shadow var(--dur-2);
}

.d25-module__goico{
  width: 12px;
  height: auto;
}

@media (hover:hover){
  .d25-module__go:hover{
    background: var(--brand-green);
    color: #fff;
    box-shadow: var(--shadow-2);
  }
}

/* GO placement – Modules page */
.d25-page--modules .d25-module > .d25-module__go{
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  z-index: 7;
}

@media (hover:hover){
  .d25-page--modules .d25-module:hover > .d25-module__go{
    transform: translate(-50%, 50%) scale(1.1);
  }
}

/* ==========================================================
   MOBILE ONLY (do not affect desktop)
   - 1 card per row
   - bigger vertical gaps between cards
   - header band (grey strip) truly edge-to-edge inside card
   - GO button spacing/visibility improved
   ========================================================== */
@media (max-width:520px){

  /* 1 per row + more vertical breathing room */
  .d25-modules-stage{ padding: 20px 0; }

  .d25-modules-stage__inner{
    width: min(92vw, 520px);
  }

  .d25-modules-stage__inner .d25-modules-grid__inner{
    grid-template-columns: 1fr;
    gap: 48px; 
  }

  .d25-module{
    --mod-px: 18px;
    --mod-pt: 22px;

    padding: var(--mod-pt) var(--mod-px) 36px;
  }

  /* Grey strip: make it truly full width based on the current padding */
  .d25-module__hdr{
    width: calc(100% + (var(--mod-px) * 2));
    margin: calc(-1 * var(--mod-pt)) calc(-1 * var(--mod-px)) 14px;
    padding: 12px 14px;
  }

  /* Slightly tighter typography for mobile */
  .d25-module__ico.d25-icon{
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }
  .d25-module__title{ font-size: 1.4rem; }
  .d25-module__sub{ font-size: 1.05rem; }
  .d25-module__desc{ font-size: 1rem; }

  .d25-module__go{
    width: 32px;
    height: 32px;
  }
  .d25-module__goico{ width: 10px; }
}




/* ==========================================================
   MODULE CATEGORY TILES (Shop/Food/Care etc.)
   Scope: module pages only
   ========================================================== */

.d25-page--module .d25-find-tiles{
  width: 100%;
  padding: 20px;
}

.d25-page--module .d25-find-tiles .d25-modules-grid__inner{
  width: min(94vw, 1020px);
  margin-inline: auto;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 60px;
}

/* Tile */
.d25-page--module .d25-tile{
  --tile-r: 20px;

  position: relative;
  display: flex;
  flex-direction: column;

  aspect-ratio: 1 / 1;

  border-radius: var(--tile-r);
  background: linear-gradient(180deg, #f0f0ec 0%, #ffffff 100%);

  text-decoration: none;
  outline: 0;
  overflow: visible;

  transition: transform var(--dur-2) var(--ease-out);
}

.d25-page--module .d25-tile.is-hi{
  background: linear-gradient(180deg, #f3f6cc 0%, #ffffff 100%);
}

@media (hover:hover){
  .d25-page--module .d25-tile:hover{ transform: translateY(-6px); }
}

/* Title + sub */
.d25-page--module .d25-tile__title{
  margin: 30px 10px 0 30px;
  padding-right: 0px; 
  font-size: clamp(1.1rem, 1rem + .2vw, 1.2rem);
  font-weight: 500;
  line-height: 1.2;
}

.d25-page--module .d25-tile__sub{
  margin: 4px 10px 0 30px;
  padding-right: 0px; 
  font-size: .9rem;
  line-height: 1.5;
}

/* Media */
.d25-page--module .d25-tile__media{
  position: absolute;
  right: 0;
  bottom: 0;

  width: 70%;
  height: 65%;

  display: flex;
  align-items: flex-end;
  justify-content: flex-end;

  overflow: hidden;
  border-bottom-left-radius: var(--tile-r);
  border-bottom-right-radius: var(--tile-r);

  pointer-events: none;
}

.d25-page--module .d25-tile__img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* GO placement – half in / half out */
.d25-page--module .d25-tile > .d25-module__go{
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 50%);
  pointer-events: none; /* tile itself is the link */
  z-index: 2;
}

@media (hover:hover){
  .d25-page--module .d25-tile:hover > .d25-module__go{
    transform: translate(-50%, 50%) scale(1.1);
  }
}

/* Responsive */
@media (max-width:1100px){
  .d25-page--module .d25-find-tiles .d25-modules-grid__inner{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 60px;
  }
}

@media (max-width:680px){
  .d25-page--module .d25-find-tiles .d25-modules-grid__inner{
    grid-template-columns: 1fr;
    gap: 20px);
margin: 40px 0;
  }

  .d25-page--module .d25-tile__media{
    width: 60%;
    height: auto;
  }
}

/* Mobile gutter: add extra side spacing (keeps tile size intact) */
@media (max-width:520px){
  .d25-page--module .d25-find-tiles .d25-modules-grid__inner{
    width: min(calc(100vw - 100px), 520px); 
    margin-inline: auto;
  }
}

/* ==========================================================
   Module sub-category pages only (4-up grid)
   Hook: .d25-page--module-cat
   ========================================================== */

/* Grid */
.d25-page--module-cat .d25-find-tiles .d25-modules-grid__inner{
  width: min(94vw, 1080px);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 60px;
}

/* Tile sizing tuned for 4-up */
.d25-page--module-cat .d25-tile{
  --tile-r: 20px;
  aspect-ratio: 1 / 1;
}

/* Title */
.d25-page--module-cat .d25-tile__title{
  margin: 30px 30px 0;
  padding-right: 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.25;
}

/* Media sizing (controls image footprint) */
.d25-page--module-cat .d25-tile__media{
  width: 72%;
  height: 58%;
}

/* Keep image intrinsic height */
.d25-page--module-cat .d25-tile__img{
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Remove arrow button (sub-category pages only) */
.d25-page--module-cat .d25-tile .d25-module__go{
  display: none !important;
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 1200px){
  .d25-page--module-cat .d25-find-tiles .d25-modules-grid__inner{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }
}

@media (max-width: 900px){
  .d25-page--module-cat .d25-find-tiles .d25-modules-grid__inner{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
  }
}

/* Mobile: 2-up grid + 30px side margins + smaller internals */
@media (max-width: 520px){
  .d25-page--module-cat .d25-find-tiles .d25-modules-grid__inner{
    width: calc(100vw - 90px); 
    margin-inline: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
  }

  .d25-page--module-cat .d25-tile{
    aspect-ratio: 1 / 1.08; /* a touch taller for text */
  }

  .d25-page--module-cat .d25-tile__title{
    margin: 16px 20px 0;
    font-size: .95rem;
    line-height: 1.4;
  }

  .d25-page--module-cat .d25-tile__media{
    width: 64%;
    height: auto;
  }
}

/* Ultra-narrow: keep 2-up but reduce side margins a bit */
@media (max-width: 360px){
  .d25-page--module-cat .d25-find-tiles .d25-modules-grid__inner{
    width: calc(100vw - 40px); /* 20px + 20px */
  }
}

/* Inner shell margin tweak (keep, but scoped to module-cat only) */
@media (max-width: 520px){
  .d25-page--module-cat .d25-inner-shell{
    margin: 18px auto;
  }
}
