/* Shared mobile content patterns (cards, grids) reused across several
   pages' own mobile sections. Loaded alongside mobile-nav.css. */

.fx-m-main {
  padding: 76px 20px 60px;
  min-height: 100vh;
  box-sizing: border-box;
  background: #fff;
}

.fx-m-page-title {
  margin: 0 0 4px;
  font-family: "Griun Simsimche", cursive;
  font-size: 26px;
  letter-spacing: 0.6px;
  color: #242424;
  text-align: center;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Small reused per-category underline squiggle (same SVGs the desktop
   nav pill underlines the active tab with), centered under the title. */
.fx-m-title-underline {
  display: block;
  width: 96px;
  height: auto;
  margin: 0 auto 20px;
}

/* Decorative corner-burst accent, same hand-drawn asset the desktop hero
   uses top-left of "PORTFOLIOS" -- purely decorative, scaled down. */
.fx-m-corner-burst {
  display: block;
  width: 40px;
  height: auto;
  margin: 0 auto 8px;
}

.fx-m-intro {
  margin: 0 0 26px;
  font-family: "Griun Simsimche", cursive;
  font-size: 15px;
  line-height: 1.6;
  color: #6b6b6b;
  text-align: center;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

/* Vertical stack of tappable cards -- Home categories, Design hub, Dev apps */
.fx-m-card-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.fx-m-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px;
  background: color-mix(in srgb, var(--m-accent) 6%, #fff);
  border: 2px solid var(--m-accent);
  border-radius: 18px;
  text-decoration: none;
  color: #242424;
  transition: transform 160ms ease;
}

.fx-m-card:active {
  transform: scale(0.98);
}

/* Home's card list mixes all 4 categories on one page (no single
   page-level accent), so each card sets its own -- Design/Development's
   hub cards inherit the single page-level --m-accent from .fx-m-root
   instead and don't need this. */
.fx-m-card[data-accent="photos"] { --m-accent: #4e02ff; }
.fx-m-card[data-accent="film"] { --m-accent: #3a6424; }
.fx-m-card[data-accent="design"] { --m-accent: #ff2890; }
.fx-m-card[data-accent="development"] { --m-accent: #ff9e02; }

.fx-m-card-icon-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--m-accent) 12%, #fff);
}

.fx-m-card-icon {
  position: relative;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.fx-m-card-icon-wrap .fx-m-card-icon {
  width: 38px;
  height: 38px;
}

.fx-m-card-body {
  flex: 1 1 auto;
  min-width: 0;
}

.fx-m-card-title {
  margin: 0 0 4px;
  font-family: "Griun Simsimche", cursive;
  font-size: 19px;
  letter-spacing: 0.5px;
}

.fx-m-card-subtitle {
  margin: 0;
  font-family: "Griun Simsimche", cursive;
  font-size: 13px;
  color: #9a9a9a;
}

/* Responsive photo/artwork grid -- Photos tab, Design 2D/3D galleries */
.fx-m-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.fx-m-grid-item {
  display: block;
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Percentage padding always resolves against the containing block's WIDTH
   (even padding-top/bottom), so this forces every tile to an identical
   square regardless of the source photo's own aspect ratio -- unlike the
   `aspect-ratio` property, which some in-app WebViews (KakaoTalk, etc.)
   still don't honor, silently collapsing the box back to each image's own
   aspect ratio and producing a lopsided masonry look between galleries
   whose photos happen to vary more in shape (e.g. tall poster/print shots)
   and ones that don't. */
.fx-m-grid-thumb {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 100%;
  overflow: hidden;
  border-radius: 12px;
  background: #eee;
}

.fx-m-grid-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.fx-m-grid-caption {
  margin: 8px 0 0;
  font-family: "Griun Simsimche", cursive;
  font-size: 13px;
  color: #242424;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fx-m-grid-placeholder .fx-m-grid-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #cfcfcf;
  background: transparent;
}

.fx-m-grid-placeholder .fx-m-grid-caption {
  color: #b3b3b3;
}

.fx-m-empty {
  padding: 60px 20px;
  text-align: center;
  font-family: "Griun Simsimche", cursive;
  font-size: 16px;
  color: #b3b3b3;
}

/* Full-screen image viewer -- Photos tab, Design 2D/3D galleries */
.fx-m-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 20, 20, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 200ms ease, visibility 0s linear 200ms;
}

.fx-m-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 200ms ease, visibility 0s linear 0s;
}

/* Shrink-wraps to the actual rendered size of the (contain-fit) image
   inside it, same technique as desktop's .fx-lightbox-photo, so the
   caption tracks the photo's real edges whether it's landscape or
   portrait rather than sitting on a fixed-aspect box. */
.fx-m-lightbox-photo {
  position: relative;
  display: inline-flex;
  margin: 0;
  max-width: 94vw;
  max-height: 88vh;
  /* See .fx-lightbox-photo in photos.css -- same paint-order rationale for
     letting clicks pass straight through to the prev/next hit zones. */
  pointer-events: none;
}

.fx-m-lightbox-img {
  max-width: 94vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  display: block;
}

.fx-m-lightbox-caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  margin: 0;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Griun Simsimche", cursive;
  font-size: 15px;
  letter-spacing: 0.4px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.fx-m-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  /* .fx-m-lightbox-next is a full-height 25%-wide hit zone on the right
     edge and comes after this in the DOM, so without a z-index it painted
     (and caught taps) on top of the close button in this corner. */
  z-index: 1;
}

.fx-m-lightbox-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 25%;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 42px;
  cursor: pointer;
}

.fx-m-lightbox-prev {
  left: 0;
  text-align: left;
  padding-left: 8px;
}

.fx-m-lightbox-next {
  right: 0;
  text-align: right;
  padding-right: 8px;
}

.fx-m-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  font-family: "Griun Simsimche", cursive;
  font-size: 14px;
  color: #6b6b6b;
  text-decoration: none;
}
