/* Elegia Presence Generator — v3.7 responsive authority
   Device preview is controlled by .preview-frame[data-device].
   This file intentionally has stronger selectors than legacy landing CSS.
*/

/* ===== Hero logo ===== */
.preview-frame[data-device="desktop"] .landing-hero__logo {
  width: 180px !important;
  height: 82px !important;
}
.preview-frame[data-device="tablet"] .landing-hero__logo {
  width: 150px !important;
  height: 70px !important;
}
.preview-frame[data-device="mobile"] .landing-hero__logo {
  width: 118px !important;
  height: 58px !important;
}
.preview-frame .landing-hero__logo img {
  max-width: 100% !important;
  max-height: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

/* ===== Gallery authority ===== */
.preview-frame[data-device="desktop"] .landing-gallery__grid,
.preview-frame[data-device="tablet"] .landing-gallery__grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 14px !important;
  height: auto !important;
}

.preview-frame[data-device="desktop"] .landing-gallery__item,
.preview-frame[data-device="tablet"] .landing-gallery__item {
  min-width: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}

.preview-frame[data-device="desktop"] .landing-gallery__item--1,
.preview-frame[data-device="tablet"] .landing-gallery__item--1 {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  aspect-ratio: 16 / 9 !important;
}

/* Three photos = one wide + two equal squares. */
.preview-frame[data-device="desktop"] .landing-gallery--3 .landing-gallery__item--2,
.preview-frame[data-device="desktop"] .landing-gallery--3 .landing-gallery__item--3,
.preview-frame[data-device="tablet"] .landing-gallery--3 .landing-gallery__item--2,
.preview-frame[data-device="tablet"] .landing-gallery--3 .landing-gallery__item--3 {
  grid-column: span 3 !important;
  grid-row: auto !important;
  aspect-ratio: 1 / 1 !important;
}

.preview-frame[data-device="desktop"] .landing-gallery--2 .landing-gallery__item--2,
.preview-frame[data-device="tablet"] .landing-gallery--2 .landing-gallery__item--2 {
  grid-column: 1 / -1 !important;
  aspect-ratio: 16 / 9 !important;
}

.preview-frame[data-device="desktop"] .landing-gallery__image,
.preview-frame[data-device="tablet"] .landing-gallery__image,
.preview-frame[data-device="mobile"] .landing-gallery__image {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
}

/* Mobile: wide hero photo + square photos underneath. Keep squares readable. */
.preview-frame[data-device="mobile"] .landing-gallery__grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  height: auto !important;
}
.preview-frame[data-device="mobile"] .landing-gallery__item--1 {
  grid-column: 1 / -1 !important;
  aspect-ratio: 16 / 9 !important;
}
.preview-frame[data-device="mobile"] .landing-gallery--3 .landing-gallery__item--2,
.preview-frame[data-device="mobile"] .landing-gallery--3 .landing-gallery__item--3 {
  grid-column: span 3 !important;
  aspect-ratio: 1 / 1 !important;
}

/* ===== Editorial content: never card-like ===== */
.preview-frame .landing-content__item,
.preview-frame .landing-content--single .landing-content__item,
.preview-frame .landing-content--editorial .landing-content__item.is-featured {
  padding: 20px 0 0 !important;
  border: 0 !important;
  border-top: 1px solid rgba(255,255,255,.11) !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ===== Services authority ===== */
.preview-frame[data-device="desktop"] .landing-offerings__grid--3,
.preview-frame[data-device="tablet"] .landing-offerings__grid--3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
  max-width: none !important;
}
.preview-frame[data-device="desktop"] .landing-offerings__grid--2,
.preview-frame[data-device="tablet"] .landing-offerings__grid--2 {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 24px !important;
}
.preview-frame[data-device="desktop"] .landing-offerings__grid--1,
.preview-frame[data-device="tablet"] .landing-offerings__grid--1 {
  display: grid !important;
  grid-template-columns: minmax(0, 520px) !important;
}
.preview-frame[data-device="mobile"] .landing-offerings__grid,
.preview-frame[data-device="mobile"] .landing-offerings__grid--1,
.preview-frame[data-device="mobile"] .landing-offerings__grid--2,
.preview-frame[data-device="mobile"] .landing-offerings__grid--3 {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 30px !important;
  max-width: none !important;
}
.preview-frame .landing-offering__media {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
}
.preview-frame .landing-offering__media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* ===== Exported standalone landing ===== */
#elegiaExportFrame .landing-hero__logo,
body > .landing-preview .landing-hero__logo {
  width: 180px !important;
  height: 82px !important;
}

#elegiaExportFrame .landing-gallery__grid,
body > .landing-preview .landing-gallery__grid {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 14px !important;
  height: auto !important;
}
#elegiaExportFrame .landing-gallery__item--1,
body > .landing-preview .landing-gallery__item--1 {
  grid-column: 1 / -1 !important;
  aspect-ratio: 16 / 9 !important;
}
#elegiaExportFrame .landing-offerings__grid--3,
body > .landing-preview .landing-offerings__grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 620px) {
  #elegiaExportFrame .landing-hero__logo,
  body > .landing-preview .landing-hero__logo {
    width: 118px !important;
    height: 58px !important;
  }
  #elegiaExportFrame .landing-gallery__grid,
  body > .landing-preview .landing-gallery__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
#elegiaExportFrame .landing-offerings__grid,
  #elegiaExportFrame .landing-offerings__grid--1,
  #elegiaExportFrame .landing-offerings__grid--2,
  #elegiaExportFrame .landing-offerings__grid--3,
  body > .landing-preview .landing-offerings__grid,
  body > .landing-preview .landing-offerings__grid--1,
  body > .landing-preview .landing-offerings__grid--2,
  body > .landing-preview .landing-offerings__grid--3 {
    grid-template-columns: 1fr !important;
  }
}
