/* ==========================================================================
   Block Pattern Custom Styles
   Sticky columns, card hovers, and pattern-specific overrides
   ========================================================================== */

/* --- Hero Cover: logo image sizing --- */
.wp-block-cover .wp-block-image.aligncenter img {
    max-width: 400px;
    height: auto;
}

@media (max-width: 767px) {
    .wp-block-cover .wp-block-image.aligncenter img {
        max-width: 250px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .wp-block-cover .wp-block-image.aligncenter img {
        max-width: 320px;
    }
}

/* --- Hero Cover: desktop restores full viewport height --- */
@media (min-width: 1024px) {
    .wp-block-cover.alignfull:first-child {
        min-height: 100vh !important;
    }
}

/* --- About section: heading sizing & one-line on tablet+ --- */
#about .wp-block-heading,
.wp-block-cover .wp-block-columns .wp-block-heading {
    font-size: clamp(26px, 3.5vw, 27px) !important;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

@media (min-width: 768px) {
    #about .wp-block-heading,
    .wp-block-cover .wp-block-columns .wp-block-heading {
        white-space: nowrap;
    }
}

/* --- About section: paragraph — match experience section --- */
#about p,
.wp-block-cover .wp-block-group > p.has-text-align-center {
    font-size: clamp(16px, 2.6vw, 20px) !important;
    line-height: 1.75 !important;
    font-weight: 400;
}

/* --- About section: content-driven height with min-height on desktop only --- */
#about.wp-block-cover {
    min-height: auto !important;
}

@media (min-width: 1024px) {
    #about.wp-block-cover {
        min-height: 100vh !important;
    }
}

/* --- About section: padding on mobile (tighter vertical + side) --- */
@media (max-width: 767px) {
    #about .wp-block-group,
    .wp-block-cover .wp-block-group.is-layout-constrained {
        padding-left: var(--wp--preset--spacing--md, 24px);
        padding-right: var(--wp--preset--spacing--md, 24px);
        padding-top: var(--wp--preset--spacing--lg, 48px);
        padding-bottom: var(--wp--preset--spacing--lg, 48px);
    }

    /* Reduce gap between heading group and paragraph on mobile */
    .wp-block-cover .wp-block-columns .wp-block-group {
        padding-bottom: var(--wp--preset--spacing--sm, 16px) !important;
    }

    .wp-block-cover .wp-block-spacer {
        height: 0 !important;
    }
}

/* Neutralise <strong> inside about paragraph (editor content) */
#about p strong,
.wp-block-cover .wp-block-group > p.has-text-align-center strong {
    font-weight: inherit;
}

/* --- About section: button spacing below paragraph --- */
.wp-block-cover .wp-block-buttons {
    margin-top: var(--wp--preset--spacing--md, 24px);
}

/* --- Experience video: crop watermark, fill column edge-to-edge --- */
.is-style-sticky-right .wp-block-video {
    overflow: hidden;
    margin: 0;
    padding: 0;
    line-height: 0;
}

.is-style-sticky-right .wp-block-video video {
    display: block;
    width: 100%;
    height: 100%;
    transform: scale(1.25);
    transform-origin: center center;
    object-fit: cover;
    vertical-align: top;
}

/* --- Sticky Right Column (Experience section) --- */
.is-style-sticky-right {
    gap: 0 !important;
}

@media (min-width: 768px) {
    .is-style-sticky-right {
        flex-wrap: nowrap !important;
    }

    .is-style-sticky-right > .wp-block-column:last-child {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow: hidden;
        align-self: flex-start;
    }

    .is-style-sticky-right > .wp-block-column:last-child figure {
        margin: 0;
        height: 100%;
        line-height: 0;
    }

    .is-style-sticky-right > .wp-block-column:last-child img,
    .is-style-sticky-right > .wp-block-column:last-child video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

/* --- Experience text column padding refinements --- */
/* !important needed to override block-editor inline padding */
.is-style-sticky-right > .wp-block-column:first-child {
    padding-top: var(--wp--preset--spacing--xl, 80px) !important;
    padding-bottom: var(--wp--preset--spacing--xl, 80px) !important;
}

/* From 770px+: paragraph width matches heading's longest text line via JS */
@media (min-width: 770px) {
    .is-style-sticky-right > .wp-block-column:first-child p {
        max-width: var(--experience-heading-width, 100%);
    }
}

/* --- Experience text column: tighter padding on mobile --- */
@media (max-width: 767px) {
    .is-style-sticky-right > .wp-block-column:first-child {
        padding-top: var(--wp--preset--spacing--lg, 48px) !important;
        padding-bottom: var(--wp--preset--spacing--lg, 48px) !important;
        padding-left: var(--wp--preset--spacing--md, 24px) !important;
        padding-right: var(--wp--preset--spacing--md, 24px) !important;
    }

    .is-style-sticky-right > .wp-block-column:first-child p {
        font-size: 15px;
        line-height: 1.6;
    }

    .is-style-sticky-right > .wp-block-column:last-child {
        max-height: 50vh;
        overflow: hidden;
    }

    .is-style-sticky-right > .wp-block-column:last-child figure,
    .is-style-sticky-right > .wp-block-column:last-child video,
    .is-style-sticky-right > .wp-block-column:last-child img {
        height: 50vh;
        object-fit: cover;
    }
}

/* --- Sticky Left Column (Menus section) --- */
@media (min-width: 768px) {
    .is-style-sticky-left {
        flex-wrap: nowrap !important;
    }

    .is-style-sticky-left > .wp-block-column:first-child {
        position: sticky;
        top: 0;
        height: fit-content;
        align-self: flex-start;
    }
}

/* --- Menus section: mobile stacked (natural DOM order) --- */
@media (max-width: 767px) {
    .is-style-sticky-left > .wp-block-column:first-child {
        padding: var(--wp--preset--spacing--xl, 80px) var(--wp--preset--spacing--lg, 48px) !important;
    }

    .is-style-sticky-left > .wp-block-column:last-child {
        padding: var(--wp--preset--spacing--md, 24px) !important;
        gap: var(--wp--preset--spacing--md, 24px) !important;
    }
}

/* --- Tablet breakpoint polish (768-1023px) --- */
@media (min-width: 768px) and (max-width: 1023px) {
    #about.wp-block-cover {
        min-height: auto !important;
    }

    .is-style-sticky-right > .wp-block-column:first-child {
        padding-top: var(--wp--preset--spacing--lg, 48px) !important;
        padding-bottom: var(--wp--preset--spacing--lg, 48px) !important;
    }

    .is-style-sticky-left > .wp-block-column:first-child {
        padding: var(--wp--preset--spacing--lg, 48px) !important;
    }

    .is-style-sticky-left > .wp-block-column:last-child {
        padding: var(--wp--preset--spacing--lg, 48px) !important;
        gap: var(--wp--preset--spacing--lg, 48px) !important;
    }
}

/* --- Menus section: column padding refinements --- */
@media (min-width: 1024px) {
    .is-style-sticky-left > .wp-block-column:first-child {
        padding: var(--wp--preset--spacing--xl, 80px);
    }

    .is-style-sticky-left > .wp-block-column:last-child {
        padding: var(--wp--preset--spacing--xl, 80px);
        gap: var(--wp--preset--spacing--xl, 80px);
    }
}

@media (min-width: 1440px) {
    .is-style-sticky-left > .wp-block-column:first-child {
        padding: var(--wp--preset--spacing--2xl, 120px) var(--wp--preset--spacing--xl, 80px);
    }

    .is-style-sticky-left > .wp-block-column:last-child {
        padding: var(--wp--preset--spacing--2xl, 120px) var(--wp--preset--spacing--xl, 80px);
    }
}

/* --- Menu Card Hover Effects --- */
.menu-card {
    overflow: hidden;
    display: block;
    text-decoration: none;
    color: inherit;
}

.wp-block-group.menu-card {
    max-width: 1008px;
    margin-left: auto;
    margin-right: auto;
}

.menu-card__media {
    overflow: hidden;
}

.menu-card__media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.menu-card:hover .menu-card__media img,
.menu-card:focus .menu-card__media img {
    transform: scale(1.05);
    filter: brightness(1.08);
}

.menu-card__bar {
    padding: var(--wp--preset--spacing--sm, 16px) 0;
    text-align: center;
    transition: background-color 0.3s ease;
}

.menu-card:hover .menu-card__bar,
.menu-card:focus .menu-card__bar {
    background-color: var(--wp--preset--color--bg-red, #992222);
}

.menu-card .wp-block-image.aligncenter {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.menu-card .wp-block-image img {
    width: 100%;
}

.menu-card .wp-block-heading {
    padding: var(--wp--preset--spacing--md, 24px) var(--wp--preset--spacing--sm, 16px);
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.menu-card:hover .wp-block-heading,
.menu-card:focus .wp-block-heading {
    background-color: #992222;
    color: #FFFFFF;
}

/* --- Footer: social icons — larger size, no gap --- */
.footer-section .wp-block-social-links {
    gap: 0 !important;
}

.footer-section .wp-block-social-links .wp-block-social-link {
    width: auto;
    height: auto;
}

.footer-section .wp-block-social-links .wp-block-social-link svg {
    width: 28px;
    height: 28px;
}

/* Instagram icon path is visually smaller — scale up to match Meta */
.footer-section .wp-social-link-instagram svg {
    width: 32px;
    height: 32px;
}

/* --- Footer: map minimum height --- */
.footer-section iframe {
    min-height: 400px;
    border-radius: 4px;
}

/* --- Footer: copyright spacing --- */
.footer-section .has-sm-font-size.has-text-body-dark-color {
    margin-top: var(--wp--preset--spacing--lg, 48px);
}

/* --- Footer: mobile gap between contact details and social icons --- */
@media (max-width: 767px) {
    .footer-section .wp-block-social-links {
        margin-top: var(--wp--preset--spacing--md, 24px);
    }
}

/* --- Footer: mobile single-column stack --- */
@media (max-width: 767px) {
    .footer-section {
        padding: var(--wp--preset--spacing--lg, 48px) var(--wp--preset--spacing--md, 24px) !important;
    }

    .footer-section .wp-block-columns {
        flex-direction: column !important;
    }

    .footer-section .wp-block-column {
        flex-basis: 100% !important;
        width: 100% !important;
    }

    .footer-section iframe {
        min-height: 250px !important;
        max-height: 300px;
        aspect-ratio: 16 / 10;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .footer-section iframe {
        min-height: 300px;
        max-height: 400px;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .menu-card__media img,
    .menu-card__bar {
        transition: none;
    }
}
