/* NINOLA Studio — page-specific gallery styles */

/* Lazy-loaded images */
img.ninola-img-loading {
  opacity: 0.55;
  filter: blur(6px);
  transition: opacity 0.35s ease, filter 0.35s ease;
}

img.ninola-img-loaded {
  opacity: 1;
  filter: none;
}

/* Gallery hover — subtle editorial lift (not flashy) */
.featured-style,
.trending-card,
.album-card,
.album-gallery .gallery-item {
  transition: box-shadow var(--gallery-duration) var(--gallery-ease);
}

.featured-style:hover,
.trending-card:hover,
.album-card:hover,
.album-gallery .gallery-item:hover {
  box-shadow: var(--shadow-hover);
}

.featured-style::before,
.trending-card::before,
.album-card .album-thumb::before,
.album-gallery .gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: rgba(255, 255, 255, 0);
  transition: background var(--gallery-duration) var(--gallery-ease);
}

.featured-style:hover::before,
.trending-card:hover::before,
.album-card:hover .album-thumb::before,
.album-gallery .gallery-item:hover::before {
  background: rgba(255, 255, 255, 0.1);
}

.featured-style img,
.trending-card img,
.album-card img,
.album-gallery .gallery-item img {
  transition:
    transform var(--gallery-duration) var(--gallery-ease),
    filter var(--gallery-duration) var(--gallery-ease);
}

.featured-style:hover img,
.trending-card:hover img,
.album-card:hover img,
.album-gallery .gallery-item:hover img {
  transform: scale(1.025);
  filter: brightness(1.04) contrast(1.01);
}

@media (prefers-reduced-motion: reduce) {
  .featured-style,
  .trending-card,
  .album-card,
  .album-gallery .gallery-item,
  .featured-style img,
  .trending-card img,
  .album-card img,
  .album-gallery .gallery-item img,
  .featured-style::before,
  .trending-card::before,
  .album-card .album-thumb::before,
  .album-gallery .gallery-item::before {
    transition: none;
  }

  .featured-style:hover img,
  .trending-card:hover img,
  .album-card:hover img,
  .album-gallery .gallery-item:hover img {
    transform: none;
    filter: none;
  }
}

/* Home — hero (aligned to same 4-col grid as featured row below) */
.home-hero__inner {
  width: 100%;
  margin-bottom: 0;
}

/* Same typography as .section-title (e.g. Top Trending) — see main.css */
.home-hero__tagline.section-title {
  margin: 0 0 1rem;
  width: 100%;
}

.home-hero__slides {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  width: 100%;
}

.home-hero__slide {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--cream-dark);
}

.home-hero__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem 1.25rem;
  z-index: 2;
  font-family: var(--font-display);
  font-size: var(--nav-size);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
  width: 100%;
}

#home-hero-section.page-section {
  padding-bottom: 0.25rem;
}

@media (max-width: 479px) {
  .home-hero__slides {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .home-hero__slides {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .home-hero__slide {
    grid-column: span 2;
    aspect-ratio: 3 / 4;
  }
}

/* Home — featured style columns (same 4-col tracks as hero) */
#featured-styles {
  width: 100%;
}

.featured-styles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-bottom: 0;
  width: 100%;
}

.featured-style {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--cream-dark);
}

.featured-style img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-style::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 50%);
  pointer-events: none;
}

.featured-style-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1rem;
  z-index: 4;
  text-align: center;
}

.featured-style-title h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--display-size);
  font-weight: 700;
  color: var(--white);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* Home — Top Trending (inherits .section-title Jaldi sizing) */
#trending-section .section-title {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Top Trending grid */
.trending-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

@media (min-width: 768px) {
  .featured-styles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .trending-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .trending-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trending-scroll-sentinel {
  height: 1px;
  width: 100%;
  pointer-events: none;
}

.trending-load-status {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted, #6b6b6b);
  margin: 0.75rem 0 0;
}

.trending-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--cream-dark);
}

.trending-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-price {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 4;
  padding: 0.85rem 1rem;
  background: var(--price-bar);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: calc(1.1rem + 2px);
  letter-spacing: 0.02em;
  text-align: center;
}

/* Album grid — style page */
.album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.album-card {
  position: relative;
  overflow: hidden;
  background: var(--cream-dark);
  cursor: pointer;
}

.album-card .album-thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.album-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card .price-bar {
  padding: 0.75rem 1rem;
  background: var(--price-bar);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: calc(1rem + 2px);
  text-align: center;
  letter-spacing: 0.02em;
}

.load-more-wrap {
  text-align: center;
  margin-top: 2.5rem;
}

/* Album detail */
.album-header {
  text-align: center;
  margin-bottom: 2rem;
}

.album-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 400;
  margin: 0 0 0.5rem;
}

.album-header .album-price {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--ink-muted);
}

.album-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.album-gallery .gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  min-height: 0;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.album-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
}

/* Image protection overlay */
.protected-img {
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.gallery-protect {
  position: relative;
}

.gallery-protect::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Lightbox — edge-to-edge, overlay chrome, drawer */
#lightbox-root {
  position: relative;
  z-index: 10000;
}

body.ninola-lightbox-open #site-header,
body.ninola-lightbox-open #site-footer,
body.ninola-lightbox-open .fab-root {
  visibility: hidden !important;
  pointer-events: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  cursor: pointer;
}

.lightbox-shell {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.lightbox-chrome {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.65rem 0.35rem;
  color: #fff;
  pointer-events: none;
}

.lightbox-chrome .lightbox-counter,
.lightbox-chrome .lightbox-actions {
  pointer-events: auto;
}

.lightbox-counter {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  opacity: 0.9;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.45);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lightbox-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-btn--active {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: stretch;
  pointer-events: none;
}

.lightbox-body .lightbox-stage,
.lightbox-body .lightbox-side-nav,
.lightbox-body .lightbox-drawer {
  pointer-events: auto;
}

.lightbox-side-nav {
  flex: 0 0 auto;
  align-self: center;
  width: 2.75rem;
  margin: 0 0.25rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  font-size: 2.25rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 2;
}

.lightbox-side-nav:hover {
  color: #fff;
}

.lightbox-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.lightbox-stage--pan {
  cursor: grab;
}

.lightbox-stage--dragging {
  cursor: grabbing;
}

.lightbox-stage-inner {
  will-change: transform;
  transition: none;
}

.lightbox-img {
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.lightbox-img--fit {
  max-width: min(96vw, 1400px);
  max-height: 100vh;
  max-height: 100dvh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox-img--natural {
  max-width: none;
  max-height: none;
  object-fit: none;
}

.lightbox-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(280px, 88vw);
  background: rgba(18, 18, 20, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 8;
  overflow-x: hidden;
  overflow-y: auto;
  padding: max(3rem, env(safe-area-inset-top, 0px)) 0.5rem 1rem 0.65rem;
  pointer-events: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.28) transparent;
}

.lightbox-drawer::-webkit-scrollbar {
  width: 5px;
}

.lightbox-drawer::-webkit-scrollbar-track {
  background: transparent;
}

.lightbox-drawer::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.28);
  border-radius: 4px;
}

.lightbox-drawer::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.45);
}

.lightbox--drawer-open .lightbox-drawer {
  transform: translateX(0);
}

.lightbox-drawer__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.lightbox-drawer__item {
  display: block;
  padding: 0;
  margin: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  aspect-ratio: 3 / 4;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.lightbox-drawer__item:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.lightbox-drawer__item.active {
  border-color: #fff;
}

.lightbox-drawer__item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lightbox-autoplay-icon--pause {
  display: none;
}

.lightbox-btn--active.lightbox-autoplay .lightbox-autoplay-icon--play {
  display: none;
}

.lightbox-btn--active.lightbox-autoplay .lightbox-autoplay-icon--pause {
  display: block;
}

/* Academy */
.academy-content {
  max-width: 720px;
  margin: 0 auto 3rem;
}

.academy-content h2,
.academy-content h3 {
  font-family: var(--font-serif);
  font-weight: 400;
}

.academy-content p {
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.course-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.course-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.course-card h3 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.course-card p {
  margin: 0;
  color: var(--ink-muted);
  flex: 1;
}

.course-price {
  font-family: var(--font-serif);
  font-size: 1.25rem;
}

/* Price packages */
.package-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.package-card {
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.package-cover {
  aspect-ratio: 16 / 10;
  background: var(--cream-dark);
  overflow: hidden;
}

.package-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.package-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.package-body h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.package-price {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.package-features {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  flex: 1;
}

.package-features li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.package-features li::before {
  content: "—";
  margin-right: 0.5rem;
  color: var(--ink-light);
}

.package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 1rem;
}

.package-actions .btn {
  flex: 1 1 auto;
  min-width: 8rem;
  text-align: center;
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-info h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin: 0 0 1rem;
}

.contact-info p {
  color: var(--ink-muted);
  margin: 0 0 0.5rem;
}

.contact-form-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 2rem;
}

@media (max-width: 639px) {
  .contact-form-wrap {
    padding: 1.25rem;
  }

  .contact-layout {
    gap: 1.5rem;
  }

  .lightbox-chrome {
    padding-top: max(0.35rem, env(safe-area-inset-top, 0px));
  }

  .lightbox-side-nav {
    width: 2.25rem;
    font-size: 1.75rem;
  }

  .lightbox-btn {
    width: 2.75rem;
    height: 2.75rem;
  }
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-hover);
}

.blog-card-cover {
  aspect-ratio: 16 / 9;
  background: var(--cream-dark);
  overflow: hidden;
}

.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.25rem;
}

.blog-card-body time {
  font-size: 0.75rem;
  color: var(--ink-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.blog-card-body h2 {
  margin: 0.5rem 0;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 400;
}

.blog-card-body p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

/* Blog detail */
.blog-article {
  max-width: 720px;
  margin: 0 auto;
}

.blog-article header {
  text-align: center;
  margin-bottom: 2rem;
}

.blog-article h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  margin: 0.5rem 0;
}

.blog-article .blog-cover {
  aspect-ratio: 16 / 9;
  background: var(--cream-dark);
  margin-bottom: 2rem;
  overflow: hidden;
}

.blog-article .blog-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-article .blog-body {
  color: var(--ink-muted);
  line-height: 1.8;
}

.blog-article .blog-body h2,
.blog-article .blog-body h3 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 400;
}

/* Share program */
.share-hero {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.share-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 400;
  margin: 0 0 1rem;
}

.share-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  margin-bottom: 2rem;
}

.share-step {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
}

.share-step .step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.share-step h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-weight: 400;
}

.share-step p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.rewards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}

.reward-card {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
}

.reward-card h4 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-weight: 400;
}

.reward-card .points {
  font-size: 0.8rem;
  color: var(--ink-light);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Responsive gallery columns */
@media (min-width: 640px) {
  .featured-styles {
    grid-template-columns: repeat(2, 1fr);
  }

  .trending-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .album-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
  }

  .course-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .share-steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 980px) {
  .featured-styles {
    grid-template-columns: repeat(4, 1fr);
  }

  .trending-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .album-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .album-gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .contact-layout {
    grid-template-columns: 1fr 1.2fr;
  }

  .package-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .rewards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1280px) {
  .album-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
