/*
 * LAV Theme Components — mobile-responsive.css
 * Responsive/mobile polish and guest-facing mobile touch fixes.
 *
 * Loaded in order from functions.php. The last component handle receives
 * generated wedding-design CSS from LAV Core.
 */

/* ============================================================
   v36.17 Photo gallery lightbox polish
   ============================================================ */
.lav-gallery__item {
	position: relative;
	display: block;
	appearance: none;
	-webkit-appearance: none;
	padding: 0;
	cursor: zoom-in;
	text-decoration: none;
	color: inherit;
}

.lav-gallery__item:focus-visible {
	outline: 3px solid var(--lav-action, var(--lav-gold));
	outline-offset: 4px;
}

.lav-gallery__zoom {
	position: absolute;
	right: 0.85rem;
	bottom: 0.85rem;
	padding: 0.42rem 0.75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.88);
	color: var(--lav-ink, #2f2a24);
	font-family: var(--lav-font-body, inherit);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 180ms ease, transform 180ms ease;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.lav-gallery__item:hover .lav-gallery__zoom,
.lav-gallery__item:focus-visible .lav-gallery__zoom {
	opacity: 1;
	transform: translateY(0);
}

.lav-gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: clamp(1rem, 3vw, 2.5rem);
	background: rgba(22, 18, 16, 0.86);
	backdrop-filter: blur(5px);
}

.lav-gallery-lightbox.is-open { display: flex; }

body.lav-gallery-lightbox-open { overflow: hidden; }

.lav-gallery-lightbox__dialog {
	position: relative;
	width: min(1120px, 100%);
	max-height: 92vh;
	display: grid;
	grid-template-rows: minmax(0, 1fr) auto;
	gap: 0.85rem;
}

.lav-gallery-lightbox__image-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 240px;
}

.lav-gallery-lightbox__image {
	max-width: 100%;
	max-height: 78vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: var(--lav-photo-radius, 18px);
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
	background: var(--lav-white, #fff);
}

.lav-gallery-lightbox__caption {
	min-height: 1.4em;
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-family: var(--lav-font-body, inherit);
	font-size: 0.95rem;
	text-align: center;
}

.lav-gallery-lightbox__close,
.lav-gallery-lightbox__prev,
.lav-gallery-lightbox__next {
	position: absolute;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(255, 255, 255, 0.92);
	color: var(--lav-ink, #2f2a24);
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: transform 160ms ease, background 160ms ease;
}

.lav-gallery-lightbox__close:hover,
.lav-gallery-lightbox__prev:hover,
.lav-gallery-lightbox__next:hover {
	transform: translateY(-1px);
	background: var(--lav-action, var(--lav-gold));
	color: var(--lav-on-action, #2f2a24);
}

.lav-gallery-lightbox__close:focus-visible,
.lav-gallery-lightbox__prev:focus-visible,
.lav-gallery-lightbox__next:focus-visible {
	outline: 3px solid rgba(255, 255, 255, 0.72);
	outline-offset: 3px;
}

.lav-gallery-lightbox__close {
	top: -0.75rem;
	right: -0.75rem;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	font-size: 1.5rem;
	line-height: 1;
}

.lav-gallery-lightbox__prev,
.lav-gallery-lightbox__next {
	top: 50%;
	width: 48px;
	height: 48px;
	border-radius: 999px;
	font-size: 1.75rem;
	line-height: 1;
}

.lav-gallery-lightbox__prev { left: -0.75rem; }
.lav-gallery-lightbox__next { right: -0.75rem; }

@media (max-width: 700px) {
	.lav-gallery__zoom { opacity: 1; transform: none; }
	.lav-gallery-lightbox { padding: 0.75rem; }
	.lav-gallery-lightbox__dialog { max-height: 95vh; }
	.lav-gallery-lightbox__image { max-height: 72vh; border-radius: 14px; }
	.lav-gallery-lightbox__close { top: 0.25rem; right: 0.25rem; }
	.lav-gallery-lightbox__prev,
	.lav-gallery-lightbox__next { top: auto; bottom: 2.25rem; width: 44px; height: 44px; }
	.lav-gallery-lightbox__prev { left: 0.25rem; }
	.lav-gallery-lightbox__next { right: 0.25rem; }
}

/* Registry page: keep odd-numbered cards balanced and bride-polished. */
.lav-page-main--registry .lav-registry-card-grid,
.lav-page-main--lav-shortcode .lav-registry-card-grid {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	grid-template-columns: repeat(2, minmax(260px, 1fr));
	justify-content: center;
}
.lav-registry-card-grid .lav-registry-card {
	min-height: 190px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}
.lav-registry-card-grid .lav-registry-card h2 {
	margin-top: 0;
}
.lav-registry-card-grid .lav-registry-card p {
	max-width: 24rem;
	margin-left: auto;
	margin-right: auto;
}
.lav-registry-card-grid .lav-registry-card:nth-child(odd):last-child:not(:first-child) {
	grid-column: 1 / -1;
	justify-self: center;
	width: min(100%, 360px);
}
@media (max-width: 760px) {
	.lav-page-main--registry .lav-registry-card-grid,
	.lav-page-main--lav-shortcode .lav-registry-card-grid {
		max-width: 380px;
		grid-template-columns: 1fr;
	}
	.lav-registry-card-grid .lav-registry-card:nth-child(odd):last-child:not(:first-child) {
		grid-column: auto;
		width: 100%;
	}
}

/* ============================================================
   FAMILY / WEDDING PARTY POLISH
   Larger portraits, centered rows, and optional photo preview.
   ============================================================ */
.lav-family__grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: clamp(1.4rem, 2.6vw, 2rem);
	max-width: 980px;
	margin-left: auto;
	margin-right: auto;
}

.lav-family__card {
	flex: 0 1 clamp(240px, 28vw, 292px);
	min-height: 100%;
	padding: clamp(1.45rem, 2.2vw, 1.9rem) clamp(1.25rem, 2vw, 1.55rem);
}

.lav-family__photo-link,
.lav-family__photo-frame {
	position: relative;
	display: block;
	width: min(100%, 178px);
	margin: 0 auto 1.2rem;
	border-radius: var(--lav-photo-radius);
	outline: none;
	text-decoration: none;
}

.lav-family__photo {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	margin: 0;
	border: 4px solid color-mix(in srgb, var(--lav-gold) 22%, var(--lav-white));
	box-shadow: 0 14px 34px rgba(46, 35, 30, 0.08);
}

.lav-family__photo-link .lav-family__photo {
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.lav-family__photo-link:hover .lav-family__photo,
.lav-family__photo-link:focus-visible .lav-family__photo {
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--lav-gold) 52%, var(--lav-white));
	box-shadow: 0 18px 42px rgba(46, 35, 30, 0.14);
}

.lav-family__photo-hint {
	position: absolute;
	left: 50%;
	bottom: 10px;
	transform: translateX(-50%) translateY(4px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.34rem 0.7rem;
	border-radius: 999px;
	background: rgba(47, 36, 28, 0.72);
	color: #fffaf2;
	font-family: var(--lav-font-body);
	font-size: 0.58rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	line-height: 1;
	text-transform: uppercase;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
	white-space: nowrap;
}

.lav-family__photo-link:hover .lav-family__photo-hint,
.lav-family__photo-link:focus-visible .lav-family__photo-hint {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.lav-family__card h3 {
	font-size: clamp(1.45rem, 2.1vw, 1.72rem);
	line-height: 1.08;
}

.lav-family__role {
	font-size: 0.67rem;
	font-weight: 700;
	letter-spacing: 0.17em;
	line-height: 1.45;
}

.lav-family__bio {
	max-width: 18rem;
}

.lav-family__bio p,
.lav-family__card .lav-prose p {
	font-size: 0.93rem;
	line-height: 1.68;
}

@media (max-width: 900px) {
	.lav-family__grid { max-width: 680px; }
	.lav-family__card { flex-basis: min(100%, 292px); }
}

@media (max-width: 640px) {
	.lav-family__grid { gap: 1rem; }
	.lav-family__card { flex-basis: min(100%, 320px); }
	.lav-family__photo-link,
	.lav-family__photo-frame { width: min(100%, 190px); }
}


/* ============================================================
   FAMILY / WEDDING PARTY GROUPS
   Featured couple first, optional family groups below.
   ============================================================ */
.lav-family-featured-couple {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: stretch;
	gap: clamp(1.25rem, 2.4vw, 2rem);
	max-width: 760px;
	margin: clamp(2.25rem, 4vw, 3.25rem) auto clamp(2.4rem, 4vw, 3.5rem);
}

.lav-family__card--featured {
	flex-basis: clamp(270px, 34vw, 340px);
	padding: clamp(1.8rem, 2.8vw, 2.3rem) clamp(1.45rem, 2.4vw, 2rem);
	border-color: color-mix(in srgb, var(--lav-gold) 34%, var(--lav-gray-light));
	background:
		linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,252,246,.94));
	box-shadow: 0 18px 52px rgba(50,45,40,.08);
}

.lav-family__card--featured .lav-family__photo-link,
.lav-family__card--featured .lav-family__photo-frame {
	width: min(100%, 210px);
}

.lav-family__card--featured h3 {
	font-size: clamp(1.75rem, 2.8vw, 2.08rem);
}

.lav-family-group {
	margin-top: clamp(2.25rem, 4vw, 3.5rem);
}

.lav-family-featured-couple + .lav-family-group {
	margin-top: 0;
}

.lav-family-group__title {
	font-family: var(--lav-font-display);
	font-weight: 400;
	font-size: clamp(1.55rem, 2.8vw, 2.2rem);
	line-height: 1.1;
	text-align: center;
	color: var(--lav-charcoal);
	margin: 0 auto 1.35rem;
}

.lav-family-group__title::after {
	content: "";
	display: block;
	width: 68px;
	height: 1px;
	margin: .75rem auto 0;
	background: color-mix(in srgb, var(--lav-gold) 70%, transparent);
}

.lav-family-page--grouped .lav-family__grid {
	margin-top: 0;
}

@media (max-width: 640px) {
	.lav-family-featured-couple {
		margin-top: 1.75rem;
		margin-bottom: 2rem;
	}
	.lav-family__card--featured {
		flex-basis: min(100%, 330px);
	}
}

/* v72.26 — Guest-facing mobile touch pass */
@media (max-width: 640px) {
  .lav-btn,
  .lav-btn--solid,
  .lav-btn--outline,
  .lav-btn--ghost {
    min-height: 48px;
    padding: .9rem 1.1rem;
    line-height: 1.25;
    letter-spacing: .14em;
    white-space: normal;
    text-align: center;
  }

  .lav-hero__actions,
  .lav-welcome__actions,
  .lav-page-crosslinks {
    display: grid;
    grid-template-columns: 1fr;
    width: min(360px, 100%);
    margin-left: auto;
    margin-right: auto;
  }

  .lav-hero__actions .lav-btn,
  .lav-welcome__actions .lav-btn,
  .lav-page-crosslinks .lav-btn,
  .lav-rsvp-cta .lav-btn,
  .lav-rsvp__submit .lav-btn,
  .lav-guestbook__submit .lav-btn {
    width: 100%;
    max-width: 360px;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
  }

  .lav-rsvp-cta .lav-rsvp-cta__box {
    padding: 1.45rem 1.1rem;
    border-radius: 20px;
  }

  .lav-rsvp-page__hint,
  .lav-rsvp__intro,
  .lav-rsvp-cta .lav-rsvp-cta__box p {
    font-size: .92rem;
    line-height: 1.65;
  }

  .lav-page-main--lav-shortcode .lav-registry-page,
  .lav-page-main--lav-shortcode .lav-rsvp-page,
  .lav-page-main--lav-shortcode .lav-guestbook-page,
  .lav-page-main--lav-shortcode .lav-section--plain {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ============================================================
   v72.27 Mobile nav cleanup
   The guest-facing mobile menu should read as a calm list, not a
   desktop nav squeezed into a dropdown. RSVP remains prominent, but
   no longer renders as an odd floating pill inside the menu.
   ============================================================ */
@media (max-width: 820px) {
  .lav-header .lav-nav {
    left: max(12px, var(--lav-gutter));
    right: max(12px, var(--lav-gutter));
    top: calc(100% + 10px);
    max-height: min(72vh, 520px);
    overflow: auto;
    padding: .8rem;
    border-radius: 20px;
    background: color-mix(in srgb, var(--lav-card-bg, #fff) 96%, white);
    border: 1px solid color-mix(in srgb, var(--lav-border, #eadfce) 86%, transparent);
    box-shadow: 0 22px 56px rgba(35, 25, 18, .18);
  }

  .lav-header .lav-nav__layout {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: .5rem;
  }

  .lav-header .lav-nav__center {
    order: -1;
  }

  .lav-header .lav-nav__side + .lav-nav__center,
  .lav-header .lav-nav__center + .lav-nav__side {
    margin-top: 0 !important;
  }

  .lav-header .lav-nav__list {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: .45rem !important;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .lav-header .lav-nav__list li {
    width: 100%;
  }

  .lav-header .lav-nav__list a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: .74rem .86rem !important;
    border: 1px solid color-mix(in srgb, var(--lav-border, #eadfce) 78%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--lav-card-bg, #fff) 94%, var(--lav-bg, #fbf7ef));
    color: var(--lav-ink, var(--lav-charcoal, #2f2a24)) !important;
    box-shadow: none !important;
    font-size: .72rem !important;
    font-weight: 800;
    letter-spacing: .12em !important;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    white-space: normal;
  }

  .lav-header .lav-nav__list a:hover,
  .lav-header .lav-nav__list a:focus-visible,
  .lav-header .lav-nav__list a.is-active,
  .lav-header .lav-nav__list a[aria-current="page"] {
    background: color-mix(in srgb, var(--lav-primary, var(--lav-gold)) 12%, var(--lav-card-bg, #fff));
    border-color: color-mix(in srgb, var(--lav-primary, var(--lav-gold)) 42%, transparent);
    color: var(--lav-ink, var(--lav-charcoal, #2f2a24)) !important;
  }

  .lav-header .lav-nav__list a.lav-nav__cta {
    min-width: 0 !important;
    justify-content: center;
    gap: .55rem;
    min-height: 48px;
    padding: .86rem 1rem !important;
    border-radius: 15px !important;
    background: var(--lav-style-hero, var(--lav-charcoal, #2f2a24)) !important;
    border-color: var(--lav-style-hero, var(--lav-charcoal, #2f2a24)) !important;
    color: #fffaf3 !important;
    text-align: center;
  }

  .lav-header .lav-nav__list a.lav-nav__cta::after {
    content: '→';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    color: inherit;
    font-size: .9rem;
    line-height: 1;
    letter-spacing: 0;
  }
}
