/*
 * Reusable component styles.
 */

.hero {
    --hero-cover-image: none;
    min-height: var(--wp-theme-hero-height);
    padding: clamp(1.4rem, 4vw, 2.6rem);
    background: linear-gradient(145deg, #fffdfa 0%, var(--wp-theme-color-surface-soft) 58%, #f1e8df 100%);
    border: 1px solid var(--wp-theme-color-border);
    border-radius: max(18px, var(--wp-theme-radius));
    box-shadow: 0 12px 28px var(--wp-theme-color-shadow);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate;
}

.section-block--home_hero {
    padding-top: 0;
    padding-bottom: 0;
    background: transparent;
}

.section-block--home_hero .hero {
    width: 100vw;
    border-radius: 0;
    border: 0;
    border-inline: 0;
    margin: 0;
}

.hero--has-background,
.hero--image_background {
    min-height: min(100svh, max(var(--wp-theme-hero-height), 720px));
    padding: clamp(2rem, 7vw, 5.5rem);
    border: 0;
    border-radius: clamp(22px, 3vw, 38px);
    box-shadow: 0 18px 42px color-mix(in srgb, var(--wp-theme-color-shadow) 112%, rgba(0, 0, 0, 0.16));
    background-image:
        var(--hero-cover-image),
        linear-gradient(145deg, #fffdfa 0%, var(--wp-theme-color-surface-soft) 58%, #f1e8df 100%);
    background-size: cover;
    background-position: center;
}

.section-block--home_hero .hero--has-background,
.section-block--home_hero .hero--image_background {
    min-height: 100svh;
    padding-top: clamp(6.5rem, 14vh, 9rem);
    padding-bottom: clamp(2.5rem, 9vh, 6rem);
    box-shadow: none;
    background-position: center center;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-overlay, rgba(31, 20, 32, 0));
    z-index: -1;
}

.hero--image_background {
    background-image: var(--hero-cover-image), linear-gradient(145deg, #fffdfa 0%, var(--wp-theme-color-surface-soft) 58%, #f1e8df 100%);
    background-size: cover;
    background-position: center;
}

.hero--has-background .hero__content,
.hero--image_background .hero__content {
    width: min(100%, 980px);
    gap: 0.95rem;
}

.hero__content {
    width: min(100%, var(--hero-content-width));
    display: grid;
    gap: 0.7rem;
}

.hero--v-start {
    align-items: flex-start;
}

.hero--v-end {
    align-items: flex-end;
}

.hero--text-center {
    text-align: center;
}

.hero--text-right {
    text-align: right;
}

.hero--text-center .hero__content {
    justify-items: center;
    margin-inline: auto;
}

.hero--text-right .hero__content {
    justify-items: end;
    margin-left: auto;
}

.hero__monogram-wrap {
    margin-bottom: 0.8rem;
}

.hero--has-background .hero__monogram-wrap,
.hero--image_background .hero__monogram-wrap {
    position: relative;
    display: grid;
    place-items: center;
    margin-bottom: 1.35rem;
    padding: 0.9rem;
}

.hero--has-background .hero__monogram-wrap::before,
.hero--image_background .hero__monogram-wrap::before {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: clamp(132px, 18vw, 210px);
    height: clamp(132px, 18vw, 210px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 248, 242, 0.34) 0%, rgba(255, 248, 242, 0.14) 44%, rgba(255, 248, 242, 0) 76%);
    filter: blur(4px);
    pointer-events: none;
}

.hero--has-background .hero__monogram-wrap::after,
.hero--image_background .hero__monogram-wrap::after {
    content: "";
    position: absolute;
    inset: 50% auto auto 50%;
    width: clamp(110px, 14vw, 156px);
    height: clamp(110px, 14vw, 156px);
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 248, 242, 0.3);
    box-shadow:
        0 0 0 10px rgba(255, 248, 242, 0.06),
        0 16px 36px rgba(0, 0, 0, 0.14);
    pointer-events: none;
}

.hero__monogram {
    display: inline-flex;
    min-width: 58px;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--wp-theme-color-border) 68%, transparent);
    background: color-mix(in srgb, var(--wp-theme-color-surface) 84%, transparent);
    font-family: var(--wp-theme-font-heading);
    font-size: 1.45rem;
    font-weight: 600;
}

.hero--has-background .hero__monogram,
.hero--image_background .hero__monogram {
    min-width: clamp(96px, 13vw, 132px);
    min-height: clamp(96px, 13vw, 132px);
    border: 1px solid rgba(255, 248, 242, 0.22);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
    color: #fffaf6;
    font-size: clamp(2rem, 4.8vw, 3rem);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 18px 42px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    text-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
    position: relative;
    z-index: 1;
}

.hero__monogram-image {
    width: 90px;
    max-height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 8px 18px color-mix(in srgb, var(--wp-theme-color-shadow) 90%, transparent));
}

.hero--has-background .hero__monogram-image,
.hero--image_background .hero__monogram-image {
    width: clamp(92px, 12vw, 138px);
    max-height: clamp(92px, 12vw, 138px);
    padding: clamp(0.45rem, 1vw, 0.7rem);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.07));
    border: 1px solid rgba(255, 248, 242, 0.18);
    backdrop-filter: blur(8px);
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.28));
    position: relative;
    z-index: 1;
}

.hero__eyebrow {
    color: var(--wp-theme-color-accent);
    margin: 0;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    border: 1px solid color-mix(in srgb, var(--wp-theme-color-accent) 32%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, #ffffff 80%, var(--wp-theme-color-surface-soft) 20%);
    padding: 0.28rem 0.7rem;
}

.hero__title {
    margin: 0;
    font-size: clamp(2rem, 6vw, 3.4rem);
    line-height: 1.02;
    letter-spacing: -0.01em;
    max-width: 18ch;
}

.hero--has-background .hero__title,
.hero--image_background .hero__title {
    font-size: clamp(2.9rem, 7vw, 5.8rem);
    line-height: 0.94;
    letter-spacing: -0.03em;
    color: #fffaf6;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
    max-width: none;
}

.hero--has-background.hero--text-center .hero__title,
.hero--image_background.hero--text-center .hero__title {
    margin-inline: auto;
}

.hero__subtitle {
    margin: 0.1rem 0 0;
    color: var(--wp-theme-color-text);
    font-size: clamp(1rem, 2.5vw, 1.14rem);
    max-width: 58ch;
}

.hero--has-background .hero__subtitle,
.hero--image_background .hero__subtitle {
    color: rgba(255, 248, 242, 0.92);
    font-size: clamp(1.05rem, 2.4vw, 1.34rem);
    font-family: var(--wp-theme-font-heading);
    font-style: italic;
    font-weight: 500;
    letter-spacing: 0.01em;
    max-width: 42ch;
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.24);
}

.hero--text-center .hero__subtitle,
.hero--text-center .hero__quote {
    margin-inline: auto;
}

.hero--text-right .hero__subtitle,
.hero--text-right .hero__quote {
    margin-left: auto;
}

.hero__quote {
    margin: 0.25rem 0 0;
    padding: 0.7rem 0.9rem;
    border-left: 4px solid var(--wp-theme-color-primary);
    background: color-mix(in srgb, var(--wp-theme-color-surface) 80%, transparent);
    border-radius: 8px;
    max-width: 62ch;
}

.hero--has-background .hero__quote,
.hero--image_background .hero__quote {
    border-left: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
    color: rgba(255, 248, 242, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    backdrop-filter: blur(6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 0.95rem 1.1rem;
}

.hero--has-background .hero__eyebrow,
.hero--image_background .hero__eyebrow {
    color: #fffaf6;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.hero--has-background .btn--ghost,
.hero--image_background .btn--ghost {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fffaf6;
    backdrop-filter: blur(6px);
}

.hero--has-background .btn--ghost:hover,
.hero--has-background .btn--ghost:focus,
.hero--image_background .btn--ghost:hover,
.hero--image_background .btn--ghost:focus {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.hero--has-background .btn,
.hero--image_background .btn {
    min-height: 3.05rem;
    padding-inline: 1.25rem;
    letter-spacing: 0.02em;
}

.hero--has-background .btn--primary,
.hero--image_background .btn--primary {
    background: linear-gradient(135deg, color-mix(in srgb, var(--wp-theme-color-accent) 72%, #e7c690 28%) 0%, var(--wp-theme-color-primary) 100%);
    color: #fffdf9;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.hero--has-background .btn--primary:hover,
.hero--has-background .btn--primary:focus,
.hero--image_background .btn--primary:hover,
.hero--image_background .btn--primary:focus {
    background: linear-gradient(135deg, color-mix(in srgb, var(--wp-theme-color-accent) 58%, #e1bc82 42%) 0%, var(--wp-theme-color-button-hover) 100%);
    color: #ffffff;
    transform: translateY(-1px);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.9rem;
}

.hero--has-background .hero__actions,
.hero--image_background .hero__actions {
    gap: 0.8rem;
    margin-top: 1.25rem;
}

.hero__actions:empty {
    display: none;
}

.hero--text-center .hero__actions {
    justify-content: center;
}

.hero--text-right .hero__actions {
    justify-content: flex-end;
}

.hero__split-grid {
    width: min(100%, 1200px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
    gap: clamp(1rem, 4vw, 2.25rem);
    align-items: center;
}

.hero__visual {
    display: flex;
    justify-content: center;
}

.hero__cover {
    width: 100%;
    max-height: min(62vh, 520px);
    aspect-ratio: 4 / 5;
    border-radius: var(--wp-theme-radius-sm);
    object-fit: cover;
    box-shadow: 0 18px 40px var(--wp-theme-color-shadow);
}

.hero__cover-inline-wrap {
    margin: 0.95rem 0 0;
}

.hero__cover--inline {
    width: min(100%, 640px);
    max-height: min(46vh, 340px);
    aspect-ratio: 16 / 9;
}

.hero__countdown {
    margin-top: 0.85rem;
    display: inline-flex;
    border: 1px solid var(--wp-theme-color-border);
    background: color-mix(in srgb, #fff 88%, var(--wp-theme-color-surface-soft) 12%);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.event-summary-layout {
    width: min(100%, 1100px);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 3vw, 1.6rem);
    align-items: stretch;
}

.event-summary-card,
.event-crest-card {
    padding: clamp(1.35rem, 3vw, 2rem);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.event-summary-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 1rem;
}

.event-summary-card__meta {
    display: grid;
    gap: 0.65rem;
}

.event-summary-card__meta p {
    margin: 0;
}

.event-summary-card__actions {
    margin-top: 0;
}

.event-summary-card__map {
    margin-top: auto;
    flex: 1 1 auto;
    min-height: 300px;
}

.event-summary-card__map iframe {
    min-height: 300px;
    height: 100%;
}

.event-crest-card .btn {
    margin-top: auto;
}

.event-crest-card .crest-image-wrap {
    margin-bottom: 1rem;
    min-height: 220px;
    display: grid;
    place-items: center;
}

.event-crest-card .crest-image {
    width: min(240px, 100%);
    max-height: 240px;
}

.event-crest-card .crest-meaning {
    margin-bottom: 1rem;
    flex: 1 1 auto;
}

.hero--animate .hero__content {
    animation: heroFadeIn 650ms ease both;
}

.section-header {
    margin-bottom: var(--wp-theme-space-4);
    display: grid;
    gap: 0.35rem;
    position: relative;
    text-align: center;
    justify-items: center;
}

.section-header__title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.9rem);
    color: var(--wp-theme-color-title);
}

.section-header__subtitle {
    margin: 0;
    color: var(--wp-theme-color-muted);
    max-width: 65ch;
    margin-inline: auto;
}

.shortcode-wrap--faq-notice {
    margin-bottom: 1rem;
}

.shortcode-wrap--faq-notice + .shortcode-wrap--faq-questions {
    margin-top: 0.25rem;
}

.wedding-platform-gifts,
.wedding-platform-rsvp,
.wedding-platform-messages,
.wedding-platform-faq,
.wedding-platform-gallery {
    border-radius: var(--wp-theme-radius);
}

.wedding-platform-gifts__button,
.wedding-platform-rsvp button,
.wedding-platform-messages button {
    border-radius: var(--wp-theme-button-radius);
}

.wptheme-gallery-content .wp-block-gallery {
    margin: 0;
    gap: 0.75rem;
}

.wptheme-gallery-content .wp-block-gallery .blocks-gallery-item img,
.wptheme-gallery-content .wp-block-image img {
    border-radius: 12px;
    box-shadow: 0 6px 18px var(--wp-theme-color-shadow);
}

.countdown-panel {
    text-align: center;
    padding: clamp(1.4rem, 3.4vw, 2rem);
}

.countdown-panel__title {
    margin: 0;
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    font-family: var(--countdown-font-family, var(--wp-theme-font-heading));
    text-transform: none;
    letter-spacing: 0.04em;
}

.countdown-panel__cards {
    margin-top: 1.2rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.countdown-unit-card {
    border: 1px solid var(--wp-theme-color-border);
    border-radius: 12px;
    background: #ffffff;
    padding: 1.1rem 0.75rem 0.9rem;
    box-shadow: 0 6px 16px var(--wp-theme-color-shadow);
}

.countdown-unit-card__value {
    display: block;
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    line-height: 1.1;
    font-weight: 800;
    color: var(--wp-theme-color-primary);
    transform-origin: center center;
}

.countdown-unit-card__label {
    display: block;
    margin-top: 0.3rem;
    font-size: 1rem;
    color: var(--wp-theme-color-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.countdown-panel__meta {
    margin: 0.8rem 0 0;
    color: var(--wp-theme-color-muted);
}

.countdown-panel--flip .countdown-panel__cards {
    gap: 0.75rem;
}

.countdown-panel--flip .countdown-unit-card {
    background: linear-gradient(180deg, #fefefe 0%, #f6f6f6 100%);
    border-radius: 10px;
    box-shadow: 0 10px 22px var(--wp-theme-color-shadow);
    position: relative;
    overflow: hidden;
}

.countdown-panel--flip .countdown-unit-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: color-mix(in srgb, var(--wp-theme-color-border) 75%, transparent);
}

.countdown-panel--flip .countdown-unit-card__value {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

.countdown-panel--flip .countdown-unit-card__value.is-flipping {
    animation: countdownFlip 520ms ease;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countdownFlip {
    0% {
        transform: rotateX(0deg);
        opacity: 1;
    }

    48% {
        transform: rotateX(-90deg);
        opacity: 0.6;
    }

    100% {
        transform: rotateX(0deg);
        opacity: 1;
    }
}

@media (max-width: 960px) {
    .hero--has-background,
    .hero--image_background {
        min-height: min(100svh, 880px);
        padding: clamp(1.4rem, 7vw, 2.2rem);
        border-radius: 26px;
    }

    .hero--has-background .hero__content,
    .hero--image_background .hero__content {
        width: min(100%, 720px);
        gap: 0.8rem;
    }

    .hero--has-background .hero__title,
    .hero--image_background .hero__title {
        font-size: clamp(2.45rem, 10vw, 4.2rem);
        max-width: 11ch;
    }

    .hero--has-background .hero__subtitle,
    .hero--image_background .hero__subtitle {
        max-width: 34ch;
        font-size: clamp(1rem, 3.8vw, 1.22rem);
    }

    .hero--has-background .hero__quote,
    .hero--image_background .hero__quote {
        max-width: 100%;
        padding: 0.85rem 0.95rem;
    }

    .hero--has-background .hero__actions,
    .hero--image_background .hero__actions {
        width: 100%;
        justify-content: center;
    }

    .hero__split-grid {
        grid-template-columns: 1fr;
    }

    .hero__visual {
        order: -1;
    }

    .hero__title {
        max-width: 100%;
    }

    .event-summary-layout {
        grid-template-columns: 1fr;
    }

    .countdown-panel__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 961px) {
    .hero--has-background .hero__title,
    .hero--image_background .hero__title {
        white-space: nowrap;
        font-size: clamp(2.7rem, 4.9vw, 5.15rem);
        max-width: none;
    }
}

@media (max-width: 640px) {
    .hero--has-background,
    .hero--image_background {
        min-height: 100svh;
        padding: 6.2rem 1.1rem 2rem;
        border-radius: 22px;
    }

    .section-block--home_hero .hero--has-background,
    .section-block--home_hero .hero--image_background {
        border-radius: 0;
        padding-top: 6.6rem;
        padding-bottom: 2.2rem;
    }

    .hero--has-background .hero__content,
    .hero--image_background .hero__content {
        width: 100%;
    }

    .hero--has-background .hero__monogram-wrap,
    .hero--image_background .hero__monogram-wrap {
        margin-bottom: 1rem;
        padding: 0.55rem;
    }

    .hero--has-background .hero__eyebrow,
    .hero--image_background .hero__eyebrow {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
    }

    .hero--has-background .hero__title,
    .hero--image_background .hero__title {
        font-size: clamp(2.2rem, 12vw, 3.2rem);
        max-width: 100%;
        white-space: normal;
    }

    .hero--has-background .hero__subtitle,
    .hero--image_background .hero__subtitle {
        max-width: 100%;
    }

    .hero--has-background .hero__actions .btn,
    .hero--image_background .hero__actions .btn {
        width: 100%;
    }
}
