/* Frontend Alignment & Mobile Fade Modifiers for Scheduled Hero */

/* Event artwork uses one picture element; legacy/default hero figures are unchanged. */
.lgf-hero-event .lgf-hero-picture picture {
    display: block;
    width: 100%;
    height: 100%;
}
.lgf-hero-event .lgf-hero-picture img {
    object-position: var(--lgf-hero-desktop-position, 50% 50%);
}
@media (max-width: 639px) {
    .lgf-hero-event {
        aspect-ratio: var(--lgf-hero-mobile-ratio, 848 / 1264);
        min-height: 560px;
    }
    .lgf-hero-event .lgf-hero-picture img {
        object-position: var(--lgf-hero-mobile-position, 50% 50%);
        margin-top: 140px !important;
        height: calc(100% - 140px);
        min-height: 0;
    }
    .lgf-hero-event.lgf-hero-mobile-v-bottom .lgf-hero-picture img {
        margin-top: 0 !important;
        margin-bottom: 140px !important;
    }
    .lgf-hero-event.lgf-hero-mobile-v-center .lgf-hero-picture img,
    .lgf-hero-event.lgf-hero-no-mobile-fade .lgf-hero-picture img {
        margin: 0 !important;
        height: 100%;
    }
}
.lgf-hero-preview-banner {
    position: fixed;
    inset: auto 0 0;
    z-index: 99999;
    padding: 12px 20px;
    background: #1a281f;
    color: #fff;
    font: 14px/1.5 sans-serif;
}
.lgf-hero-preview-banner a { color: #fff; text-decoration: underline; margin-left: 12px; }
.lgf-hero-preview-warning { padding: 16px; margin-bottom: 70px; background: #fff3cd; color: #533f03; }

/* Desktop Layout (min-width: 640px) */
@media (min-width: 640px) {
    /* Horizontal alignment */
    .lgf-hero-h-left .lgf-hero-content {
        justify-self: start !important;
        max-width: 680px;
        margin-left: clamp(2rem, 6vw, 6rem);
    }
    .lgf-hero-h-center .lgf-hero-content {
        justify-self: center !important;
        max-width: 850px;
    }
    .lgf-hero-h-right .lgf-hero-content {
        justify-self: end !important;
        max-width: 680px;
        margin-right: clamp(2rem, 6vw, 6rem);
    }

    /* Vertical alignment */
    .lgf-hero-v-top .lgf-hero-content {
        align-self: start !important;
        padding-top: clamp(2rem, 6vw, 5rem);
    }
    .lgf-hero-v-center .lgf-hero-content {
        align-self: center !important;
    }
    .lgf-hero-v-bottom .lgf-hero-content {
        align-self: end !important;
        padding-bottom: clamp(2rem, 6vw, 5rem);
    }
}

/* Text alignment (Applies across viewports) */
.lgf-hero-text-left .lgf-hero-content {
    text-align: left !important;
}
.lgf-hero-text-left .lgf-hero-content .wp-block-heading {
    text-align: left !important;
}
.lgf-hero-text-left .lgf-hero-content p {
    text-align: left !important;
}
.lgf-hero-text-left .lgf-hero-content .wp-block-buttons {
    justify-content: flex-start !important;
}

.lgf-hero-text-center .lgf-hero-content {
    text-align: center !important;
}
.lgf-hero-text-center .lgf-hero-content .wp-block-heading {
    text-align: center !important;
}
.lgf-hero-text-center .lgf-hero-content p {
    text-align: center !important;
}
.lgf-hero-text-center .lgf-hero-content .wp-block-buttons {
    justify-content: center !important;
}

.lgf-hero-text-right .lgf-hero-content {
    text-align: right !important;
}
.lgf-hero-text-right .lgf-hero-content .wp-block-heading {
    text-align: right !important;
}
.lgf-hero-text-right .lgf-hero-content p {
    text-align: right !important;
}
.lgf-hero-text-right .lgf-hero-content .wp-block-buttons {
    justify-content: flex-end !important;
}

/* Desktop side placements share a left edge for the copy and button. */
@media (min-width: 640px) {
    .lgf-hero-event:is(.lgf-hero-h-left, .lgf-hero-h-right) .lgf-hero-content,
    .lgf-hero-event:is(.lgf-hero-h-left, .lgf-hero-h-right) .lgf-hero-content :is(.wp-block-heading, p, .lgf-hero-eyebrow-wrap) {
        text-align: left !important;
    }
    .lgf-hero-event:is(.lgf-hero-h-left, .lgf-hero-h-right) .lgf-hero-content .wp-block-buttons {
        justify-content: flex-start !important;
    }
}

/* Mobile Layout Options (max-width: 639px) */
@media (max-width: 639px) {
    /* Mobile Top Placement (Default) */
    .lgf-hero-mobile-v-top .lgf-hero-content {
        place-self: start center !important;
        padding-top: 40px !important;
        padding-bottom: 0 !important;
    }

    /* Mobile Center Placement */
    .lgf-hero-mobile-v-center .lgf-hero-content {
        place-self: center center !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
    .lgf-hero-mobile-v-center::before {
        display: none !important;
    }
    .lgf-hero-mobile-v-center figure.lgf-hero-mobile img,
    .lgf-hero-mobile-v-center img.lgf-hero-mobile {
        margin-top: 0 !important;
        height: 100% !important;
        min-height: 100% !important;
    }

    /* Mobile Bottom Placement */
    .lgf-hero-mobile-v-bottom .lgf-hero-content {
        place-self: end center !important;
        padding-bottom: 40px !important;
        padding-top: 0 !important;
    }
    .lgf-hero-mobile-v-bottom::before {
        background: linear-gradient(to top, var(--lgf-hero-mobile-pink) 10%, var(--lgf-hero-mobile-pink) 135px, transparent 400px) !important;
    }
    .lgf-hero-mobile-v-bottom figure.lgf-hero-mobile img,
    .lgf-hero-mobile-v-bottom img.lgf-hero-mobile {
        margin-top: 0 !important;
        margin-bottom: 140px !important;
        height: calc(100% - 140px) !important;
        min-height: 0 !important;
    }

    /* Mobile Fade Toggle (Disabled completely) */
    .lgf-hero-no-mobile-fade::before {
        display: none !important;
    }
    .lgf-hero-no-mobile-fade figure.lgf-hero-mobile img,
    .lgf-hero-no-mobile-fade img.lgf-hero-mobile {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        height: 100% !important;
        min-height: 100% !important;
    }
}

/* ==========================================================================
   Typography & Color Variables
   ========================================================================== */
.lgf-hero-container .lgf-hero-content .wp-block-heading {
    color: var(--lgf-hero-heading-color, inherit);
    font-family: var(--wp--preset--font-family--source-serif-pro, 'Source Serif Pro', serif);
}

.lgf-hero-container .lgf-hero-content p {
    color: var(--lgf-hero-subtitle-color, inherit);
    font-family: var(--wp--preset--font-family--body, 'Hind', sans-serif);
}

/* Scheduled copy follows the original hero's theme typography and flow spacing.
 * Explicit rules also work when dynamic previews omit core layout styles. */
.lgf-hero-event .lgf-hero-content > * {
    margin-block: 0;
}
.lgf-hero-event .lgf-hero-content > * + * {
    margin-block-start: var(--wp--style--block-gap, 2rem);
}
.lgf-hero-event .lgf-hero-content .wp-block-heading {
    font-size: var(--wp--preset--font-size--x-large, 3rem);
    font-weight: var(--wp--custom--typography--font-weight--semi-bold, 600);
    letter-spacing: -0.02em;
    line-height: var(--wp--custom--typography--line-height--tiny, 1.15);
}
.lgf-hero-event .lgf-hero-content p {
    font-family: inherit;
}
@media (min-width: 640px) {
    .lgf-hero-event:is(.lgf-hero-h-left, .lgf-hero-h-right) .lgf-hero-content {
        margin-inline: 0;
    }
}

/* Readability Soft Shadow */
/* Presets are event-only. Default deliberately leaves the theme sizing intact. */
.lgf-hero-event.lgf-hero-heading-size-small .lgf-hero-content .wp-block-heading {
    font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2rem);
    line-height: 1.15;
}
.lgf-hero-event.lgf-hero-heading-size-medium .lgf-hero-content .wp-block-heading {
    font-size: clamp(2rem, 1.2rem + 2.5vw, 3rem);
    line-height: 1.15;
}
.lgf-hero-event.lgf-hero-heading-size-large .lgf-hero-content .wp-block-heading {
    font-size: clamp(2.5rem, 1.2rem + 4vw, 4rem);
    line-height: 1.15;
}
.lgf-hero-event.lgf-hero-body-size-small .lgf-hero-content p {
    font-size: clamp(0.875rem, 0.825rem + 0.25vw, 1rem);
    line-height: 1.5;
}
.lgf-hero-event.lgf-hero-body-size-medium .lgf-hero-content p {
    font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
    line-height: 1.5;
}
.lgf-hero-event.lgf-hero-body-size-large .lgf-hero-content p {
    font-size: clamp(1.125rem, 0.975rem + 0.75vw, 1.5rem);
    line-height: 1.5;
}

.lgf-hero-has-shadow .lgf-hero-content .wp-block-heading,
.lgf-hero-has-shadow .lgf-hero-content p {
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

/* ==========================================================================
   Eyebrow / Badge Label (Little Gem Boutique Aesthetic)
   ========================================================================== */
.lgf-hero-eyebrow-wrap {
    margin-bottom: 0.85rem;
}
.lgf-hero-eyebrow {
    display: inline-block;
    font-family: var(--wp--preset--font-family--body, 'Hind', sans-serif);
    font-size: 0.75rem;
    line-height: 1.4;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 5px 15px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(26, 40, 31, 0.12);
    color: var(--lgf-hero-eyebrow-color, #1a281f);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   Custom Button Styling (Pill Standard & Ghost Outline)
   ========================================================================== */
.lgf-hero-btn-custom .wp-block-button__link {
    background-color: var(--lgf-hero-btn-bg, #1a281f) !important;
    color: var(--lgf-hero-btn-text, #ffffff) !important;
    border-radius: 9999px !important;
    padding: calc(0.667em + 3px) calc(1.6em + 3px) !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    display: inline-block !important;
    text-decoration: none !important;
}

.lgf-hero-btn-custom .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16) !important;
    filter: brightness(1.08);
}

.lgf-hero-btn-custom.is-style-outline .wp-block-button__link {
    background-color: transparent !important;
    border: 2px solid var(--lgf-hero-btn-bg, #1a281f) !important;
    color: var(--lgf-hero-btn-bg, #1a281f) !important;
    box-shadow: none !important;
}

.lgf-hero-btn-custom.is-style-outline .wp-block-button__link:hover {
    background-color: var(--lgf-hero-btn-bg, #1a281f) !important;
    color: var(--lgf-hero-btn-text, #ffffff) !important;
}

/* ==========================================================================
   Entrance Animations (Staggered Luxury Motions)
   ========================================================================== */
@keyframes lgfHeroFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lgfHeroFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes lgfHeroSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade-Up: Staggered Cascade */
.lgf-hero-anim-fade-up .lgf-hero-eyebrow-wrap {
    animation: lgfHeroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}
.lgf-hero-anim-fade-up .wp-block-heading {
    animation: lgfHeroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}
.lgf-hero-anim-fade-up p {
    animation: lgfHeroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}
.lgf-hero-anim-fade-up .wp-block-buttons {
    animation: lgfHeroFadeUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.42s both;
}

/* Fade-In: Soft Dissolve */
.lgf-hero-anim-fade-in .lgf-hero-eyebrow-wrap {
    animation: lgfHeroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
}
.lgf-hero-anim-fade-in .wp-block-heading {
    animation: lgfHeroFadeIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}
.lgf-hero-anim-fade-in p {
    animation: lgfHeroFadeIn 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.26s both;
}
.lgf-hero-anim-fade-in .wp-block-buttons {
    animation: lgfHeroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.38s both;
}

/* Slide-Up */
.lgf-hero-anim-slide-up .lgf-hero-eyebrow-wrap {
    animation: lgfHeroSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}
.lgf-hero-anim-slide-up .wp-block-heading {
    animation: lgfHeroSlideUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both;
}
.lgf-hero-anim-slide-up p {
    animation: lgfHeroSlideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.28s both;
}
.lgf-hero-anim-slide-up .wp-block-buttons {
    animation: lgfHeroSlideUp 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .lgf-hero-anim-fade-up *,
    .lgf-hero-anim-fade-in *,
    .lgf-hero-anim-slide-up * {
        animation: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}


/* Dynamic/core layout CSS is not included in every server-side editor preview.
 * Keep the homepage fallback stack deterministic in previews and on the site. */
.lgf-hero-default .lgf-hero-default-stack {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--wp--style--block-gap, 2rem);
    width: 100%;
    max-width: var(--wp--style--global--content-size, 42rem);
    margin-inline: auto;
}
.lgf-hero-default .lgf-hero-default-stack > * {
    margin-block: 0;
}
.lgf-hero-default .lgf-hero-default-stack > .wp-block-buttons {
    display: flex;
    justify-content: center;
    width: auto;
}
