/*
 * Landing Page (Landing Page node + Paragraphs)
 * Generated to match your current field schema (lp_hero / lp_features / lp_faq / lp_contact_form / lp_masonry_gallery).
 */

/* ------------------------------------------------------------------
 * LP width container system (field_lp_width)
 *
 * Templates can optionally add .lp-container with a width modifier:
 *   .lp-container--wide   : max-width 1920px + side padding
 *   .lp-container--narrow : max-width 1320px + side padding
 *   .lp-container--full   : full width (no max-width, no side padding)
 *
 * If field_lp_width is missing or left as "None", templates fall back
 * to Bootstrap's default .container, so nothing global is affected.
 */
.lp-container{
  width: 100%;
  max-width: 1920px;
  margin-left: auto;
  margin-right: auto;
  /* comfortable side padding that scales on small screens */
  padding-left: clamp(16px, 3vw, 50px);
  padding-right: clamp(16px, 3vw, 50px);
}
.lp-container--wide{
  max-width: 1920px;
}
.lp-container--narrow{
  max-width: 1320px;
}
.lp-container--full{
  max-width: none;
  padding-left: 0;
  padding-right: 0;
  /*
   * 避免内部若使用 Bootstrap 的 .row 时产生负 margin 导致横向溢出。
   * full 模式本就偏“无留白”，因此将 gutter 设为 0 是合理的。
   */
  --bs-gutter-x: 0;
}

/* --- shared section spacing --- */
.lp-section {
  padding: clamp(2.5rem, 5vw, 5rem) 0;
}

.lp-section__title {
  margin: 0 0 1.25rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lp-section__lead {
  max-width: 70ch;
  margin: 0 0 1.5rem;
  opacity: 0.85;
}

/* --- hero --- */
.lp-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.lp-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lp-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Drupal core often adds margins to node images (e.g. field.css). A background hero image must not have margins. */
  margin: 0 !important;
}

.lp-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  opacity: 0;
  pointer-events: none;
}

/*
  IMPORTANT: .lp-hero__overlay and .lp-hero__inner are siblings.
  If only a descendant (e.g. .lp-hero__container) has z-index,
  the overlay may still paint above all content.
  So we place the whole inner layer above the overlay.
*/
.lp-hero__inner {
  position: relative;
  z-index: 2;
}

/* Overlay strength (new list values): none | light | medium | strong | dark */
.lp-hero--overlay-none .lp-hero__overlay { opacity: 0; }
.lp-hero--overlay-light .lp-hero__overlay { opacity: 0.20; }
.lp-hero--overlay-medium .lp-hero__overlay { opacity: 0.35; }
.lp-hero--overlay-strong .lp-hero__overlay { opacity: 0.50; }
.lp-hero--overlay-dark .lp-hero__overlay { opacity: 0.65; }

/* Backward-compatible numeric overlay values (older field configs). */
.lp-hero--overlay-0 .lp-hero__overlay { opacity: 0; }
.lp-hero--overlay-10 .lp-hero__overlay { opacity: 0.10; }
.lp-hero--overlay-20 .lp-hero__overlay { opacity: 0.20; }
.lp-hero--overlay-30 .lp-hero__overlay { opacity: 0.30; }
.lp-hero--overlay-40 .lp-hero__overlay { opacity: 0.40; }
.lp-hero--overlay-50 .lp-hero__overlay { opacity: 0.50; }
.lp-hero--overlay-60 .lp-hero__overlay { opacity: 0.60; }
.lp-hero--overlay-70 .lp-hero__overlay { opacity: 0.70; }
.lp-hero--overlay-80 .lp-hero__overlay { opacity: 0.80; }

.lp-hero__container {
  position: relative;
}

/* Improve legibility over photographic backgrounds. */
.lp-hero__headline,
.lp-hero__subheadline {
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45);
}

.lp-hero__content {
  max-width: 56rem;
}

.lp-hero--align-center .lp-hero__content {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.lp-hero--align-right .lp-hero__content {
  margin-left: auto;
  text-align: right;
}

/* Explicit left/none alignment values for the new Alignment field. */
.lp-hero--align-left .lp-hero__content,
.lp-hero--align-none .lp-hero__content {
  margin-left: 0;
  margin-right: 0;
  text-align: left;
}

.lp-hero__headline {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lp-hero__subheadline {
  margin: 0 0 1.5rem;
  font-size: clamp(1rem, 2vw, 1.25rem);
  opacity: 0.95;
}

.lp-hero__cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lp-hero--align-center .lp-hero__cta {
  justify-content: center;
}

.lp-hero--align-right .lp-hero__cta {
  justify-content: flex-end;
}

.lp-hero__cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.125rem;
  border-radius: 0;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
}

.lp-hero__cta a:hover {
  background: rgba(0, 0, 0, 0.5);
}

/* --- features --- */
.lp-features__items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.lp-feature__inner {
  height: 100%;
  padding: 1.25rem;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
}

.lp-feature__icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}

.lp-feature__headline {
  margin-top: 0.75rem;
  font-weight: 700;
  line-height: 1.15;
}

.lp-feature__subheadline {
  margin-top: 0.35rem;
  opacity: 0.8;
}

.lp-feature__link {
  margin-top: 0.75rem;
}

.lp-feature__link a {
  text-decoration: none;
  font-weight: 600;
}

/* --- faq (details/summary) --- */
.lp-faq__items {
  display: grid;
  gap: 0.75rem;
}

.lp-faq-item {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.75);
}

.lp-faq-item__question {
  cursor: pointer;
  padding: 0.75rem 0.25rem;
  font-weight: 700;
  list-style: none;
}

.lp-faq-item__question::-webkit-details-marker {
  display: none;
}

.lp-faq-item__answer {
  padding: 0 0.25rem 1rem;
  opacity: 0.85;
}

/* --- contact form --- */
.lp-contact__form {
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.75);
}

/* --- masonry gallery --- */
.lp-masonry__grid {
  column-count: var(--lp-masonry-cols-desktop, 4);
  column-gap: 1rem;
}

.lp-masonry__item {
  break-inside: avoid;
  margin: 0 0 1rem;
  border-radius: 0;
  overflow: hidden;
}

.lp-masonry__item img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 991.98px) {
  .lp-masonry__grid {
    column-count: var(--lp-masonry-cols-mobile, 2);
  }
}

/* --- lightweight lightbox --- */
.lp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.8);
}

.lp-lightbox[hidden] {
  display: none;
}

.lp-lightbox__img {
  max-width: min(1100px, 100%);
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: 0;
}

.lp-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}

.lp-lightbox__close:hover {
  background: rgba(0, 0, 0, 0.55);
}

/* =========================
   LP Media Text (lp_media_text)
   ========================= */

.paragraph--type--lp-media-text.lp-media-text {
  padding: 4rem 0;
}

@media (max-width: 991.98px) {
  .paragraph--type--lp-media-text.lp-media-text {
    padding: 3rem 0;
  }
}

.lp-media-text__content {
  max-width: 42rem;
}

.lp-media-text__kicker {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #111;
}

.lp-media-text__headline,
.lp-media-text__title {
  margin: 0 0 1rem;
  font-family: var(--lp-media-text-headline-font, "Roboto Condensed", "Arial Narrow", var(--bs-font-sans-serif));
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  line-height: 1.15;
  font-size: clamp(1.35rem, 1.1rem + 1.2vw, 2.2rem);
  max-width: 34ch;
}

.lp-media-text__body {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #2b2b2b;
  max-width: 62ch;
}

.lp-media-text__body p:last-child {
  margin-bottom: 0;
}

.lp-media-text__cta {
  margin-top: 1.75rem;
}

.lp-media-text__cta a,
.lp-media-text__cta a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  min-width: 220px;
  padding: 0.75rem 2.25rem;
  border: 1px solid rgba(0, 0, 0, 0.55);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.18);
  color: #1a1a1a;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: none;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.lp-media-text__cta a:hover,
.lp-media-text__cta a:focus {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(0, 0, 0, 0.7);
  color: #111;
  text-decoration: none;
}

/*
  LP Media text – Layout: text_cta_top_image_full
  Mimic Scolaro “text + CTA row” followed by a full-width image.
*/
.lp-media-text--text-cta-top-image-full .lp-media-text__container--top {
  padding-top: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.75rem);
}

.lp-media-text--text-cta-top-image-full .lp-media-text__title {
  font-size: clamp(1.25rem, 1vw + 1.05rem, 1.75rem);
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin-bottom: 0;
}

.lp-media-text--text-cta-top-image-full .lp-media-text__body {
  margin-top: 0.9rem;
}

.lp-media-text--text-cta-top-image-full .lp-media-text__cta {
  margin-top: 0;
}

.lp-media-text--text-cta-top-image-full .lp-media-text__col--cta {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

@media (max-width: 991.98px) {
  .lp-media-text--text-cta-top-image-full .lp-media-text__col--cta {
    justify-content: flex-start;
  }

  .lp-media-text--text-cta-top-image-full .lp-media-text__cta {
    margin-top: 1rem;
  }
}

.lp-media-text--text-cta-top-image-full .lp-media-text__image-full {
  width: 100%;
}

.lp-media-text--text-cta-top-image-full .lp-media-text__image-full img,
.lp-media-text--text-cta-top-image-full .lp-media-text__image-full picture,
.lp-media-text--text-cta-top-image-full .lp-media-text__image-full source {
  max-width: 100%;
}

.lp-media-text--text-cta-top-image-full .lp-media-text__image-full img {
  width: 100%;
  height: auto;
  display: block;
}

/* Media framing */
.lp-media-text__media {
  width: 100%;
}

.lp-media-text__media-stack {
  position: relative;
  width: 100%;
}

.lp-media-text__media-item {
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  border: 1px solid #eee;
}

.lp-media-text__media-item img {
  display: block;
  width: 100%;
  height: auto;
}

/* secondary image overlap */
.lp-media-text__media-item--primary {
  position: relative;
  z-index: 1;
}

.lp-media-text__media-item--secondary {
  position: absolute;
  z-index: 2;
  width: 56%;
  bottom: -10%;
}

/* Default: secondary goes bottom-right */
.lp-media-text__media-item--secondary {
  right: -6%;
}

/* Layout: text-left-images-right => secondary goes bottom-left (more dynamic) */
.lp-media-text--text-left-images-right .lp-media-text__media-item--secondary {
  right: auto;
  left: -6%;
}

@media (max-width: 991.98px) {
  .lp-media-text__content {
    max-width: none;
  }

  .lp-media-text__media-item--secondary {
    width: 62%;
    bottom: -8%;
  }
}


/* =======================
   LP Product Tiles (taxonomy term cards)
   ======================= */

/* LP Product Tiles (taxonomy term cards)                                     */
/* -------------------------------------------------------------------------- */

.lp-product-tiles {
  padding: 3rem 0;
}

.lp-product-tiles__inner {
  width: 100%;
}

/* Turn the term reference field into a responsive grid */
.lp-product-tiles__grid .field--name-field-product-styles {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.2vw, 28px);
  align-items: stretch;
}

@media (min-width: 768px) {
  .lp-product-tiles__grid .field--name-field-product-styles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .lp-product-tiles__grid .field--name-field-product-styles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .lp-product-tiles__grid .field--name-field-product-styles {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.lp-product-tiles__grid .field--name-field-product-styles > .field__item {
  margin: 0;
}

/* Card */
.product-style-tile {
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
  border: 1px solid #eee;
}

.product-style-tile__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.product-style-tile__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-style-tile__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.product-style-tile__img--back {
  opacity: 0;
}

.product-style-tile:hover .product-style-tile__img--front,
.product-style-tile.is-flipped .product-style-tile__img--front {
  opacity: 0;
}

.product-style-tile:hover .product-style-tile__img--back,
.product-style-tile.is-flipped .product-style-tile__img--back {
  opacity: 1;
}

.product-style-tile:hover .product-style-tile__img,
.product-style-tile.is-flipped .product-style-tile__img {
  transform: scale(1.02);
}

/* Caption (Scolaro-like): title below image; teaser appears on hover */
.product-style-tile__caption {
  /* match Scolaro-like caption strip */
  background: #f5f5f5;
  padding: 20px 24px 24px;
  height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.product-style-tile__title {
  font-weight: 400;
  font-size: 15px;
  line-height: 1.3;
  color: #111;
  letter-spacing: 0;

  /* keep the grid tidy */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-style-tile__teaser {
  margin-top: 8px;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.35;
  color: #444;
  letter-spacing: 0;

  /* hidden by default */
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease;

  /* clamp to avoid overly tall cards */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-style-tile:hover .product-style-tile__teaser,
.product-style-tile.is-flipped .product-style-tile__teaser,
.product-style-tile__link:focus-visible .product-style-tile__teaser {
  opacity: 1;
  max-height: 4.2em;
  transform: translateY(0);
}

@media (max-width: 575.98px) {
  .lp-product-tiles {
    padding: 2rem 0;
  }
  .product-style-tile__caption {
    padding: 16px 16px 18px;
    height: 112px;
  }
}
