/* LeNi Flexible Page and Gutenberg pattern library */
body.page-template-template-leni-flexible {
    background: #f9f6f0;
}

.leni-flexible-page-main,
.leni-flexible-page,
.leni-flexible-page__content {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
}

.leni-flexible-page__content > * {
    margin-block-start: 0;
    margin-block-end: 0;
}

.leni-page-container {
    width: min(1280px, calc(100% - 48px));
    margin-inline: auto;
}

.leni-section {
    padding: 80px 0;
    box-sizing: border-box;
}

.leni-section--hero {
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, #f3ede1 0%, #ebe0d0 100%);
}

.leni-section--white { background: #fff; }
.leni-section--cream { background: #f9f6f0; }
.leni-section--soft { background: #fdfcf8; }

.leni-split {
    gap: 64px;
    align-items: center !important;
    margin: 0;
}

.leni-split > .wp-block-column {
    min-width: 0;
}

.leni-page-hero-title,
.leni-section-title,
.leni-card-title,
.leni-stat-value {
    font-family: "Playfair Display", "DM Serif Display", Georgia, serif;
    color: #1f2937;
}

.leni-page-hero-title {
    margin: 0 0 24px;
    font-size: clamp(44px, 5vw, 60px);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.leni-section-title {
    margin: 0 0 16px;
    font-size: clamp(32px, 3vw, 36px);
    line-height: 1.2;
    font-weight: 700;
}

.leni-page-lead,
.leni-section-subtitle {
    color: #4b5563;
    font-family: Inter, Arial, sans-serif;
}

.leni-page-lead {
    margin: 0 0 32px;
    font-size: 20px;
    line-height: 1.65;
}

.leni-section-subtitle {
    margin: 0 0 56px;
    font-size: 20px;
    line-height: 1.4;
}

.leni-section p:not(.leni-feature-icon):not(.leni-stat-value):not(.leni-stat-label) {
    color: #4b5563;
    font-family: Inter, Arial, sans-serif;
    font-size: 18px;
    line-height: 1.67;
}

.leni-page-image img {
    display: block;
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 16px;
}

.leni-page-image--hero img {
    height: 500px;
}

.leni-button-primary .wp-block-button__link {
    min-height: 56px;
    padding: 17px 30px;
    border: 0;
    border-radius: 8px;
    background: #b8941f;
    color: #fff;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease;
}

.leni-button-primary .wp-block-button__link:hover {
    background: #a5821b;
    transform: translateY(-1px);
}

.leni-feature-grid {
    gap: 32px;
    margin: 0;
}

.leni-feature-card {
    height: 100%;
    min-height: 388px;
    padding: 48px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(17, 24, 39, .10);
}

.leni-feature-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 0 24px;
    border-radius: 999px;
    background: rgba(184, 148, 31, .1);
    color: #b8941f;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.leni-card-title {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.33;
    font-weight: 600;
}

.leni-stats-layout {
    gap: 64px;
    margin: 0;
}

.leni-stats-grid {
    gap: 24px;
    margin: 0 0 24px;
}

.leni-stats-grid:last-child { margin-bottom: 0; }

.leni-stat-card {
    min-height: 136px;
    padding: 28px 32px;
    border-radius: 12px;
    background: #f9f6f0;
}

.leni-stat-value {
    margin: 0 0 8px;
    color: #b8941f;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 700;
}

.leni-stat-label {
    margin: 0;
    color: #4b5563;
    font-family: Inter, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

@media (max-width: 1024px) {
    .leni-section { padding: 64px 0; }
    .leni-split, .leni-stats-layout { gap: 40px; }
    .leni-feature-card { padding: 32px; min-height: 340px; }
}

@media (max-width: 781px) {
    .leni-page-container { width: min(100% - 32px, 640px); }
    .leni-section { padding: 48px 0; }
    .leni-section--hero { min-height: auto; }
    .leni-split, .leni-stats-layout { gap: 32px; }
    .leni-page-image img, .leni-page-image--hero img { height: min(440px, 90vw); }
    .leni-feature-grid, .leni-stats-grid { gap: 20px; }
    .leni-feature-card { min-height: 0; padding: 28px; }
}

@media (max-width: 480px) {
    .leni-page-container { width: calc(100% - 24px); }
    .leni-section { padding: 40px 0; }
    .leni-page-hero-title { font-size: 40px; }
    .leni-section-title { font-size: 30px; }
    .leni-page-lead, .leni-section p:not(.leni-feature-icon):not(.leni-stat-value):not(.leni-stat-label) { font-size: 16px; }
    .leni-page-image img, .leni-page-image--hero img { height: 340px; }
    .leni-button-primary, .leni-button-primary .wp-block-button__link { width: 100%; text-align: center; }
}

/* Editor parity */
.editor-styles-wrapper .leni-page-container {
    width: min(1280px, calc(100% - 48px));
    margin-inline: auto;
}
.editor-styles-wrapper .leni-section { padding: 64px 24px; }


/* v0.9.0.6 – extended About and editorial pattern library */
.leni-section-heading {
    max-width: 880px;
    margin: 0 auto 56px;
}

.leni-editorial-copy {
    max-width: 880px;
}

.leni-editorial-copy > p {
    max-width: 760px;
}

.leni-section--cta {
    background: #171918;
}

.leni-section--cta .leni-section-title {
    color: #b8941f;
}

.leni-section--cta .leni-section-subtitle {
    max-width: 720px;
    margin-inline: auto;
    color: #d1d5db;
}

.leni-cta-banner {
    text-align: center;
}

/* Make the page library predictable when users add native block spacing. */
.leni-flexible-page__content .leni-section > .leni-page-container > :first-child {
    margin-top: 0;
}

.leni-flexible-page__content .leni-section > .leni-page-container > :last-child {
    margin-bottom: 0;
}

@media (max-width: 781px) {
    .leni-section-heading { margin-bottom: 36px; }
    .leni-editorial-copy { max-width: 640px; }
}

/* v0.9.0.7 – Figma About page alignment and spacing */
.leni-split--hero > .wp-block-column:first-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-height: 500px;
}

.leni-split--hero .wp-block-buttons {
    margin-top: 0;
}

.leni-section-heading .leni-section-title {
    margin-bottom: 12px;
}

.leni-section-heading .leni-section-subtitle {
    margin-bottom: 0;
}

.leni-feature-card > :last-child,
.leni-stat-card > :last-child {
    margin-bottom: 0;
}

@media (max-width: 781px) {
    .leni-split--hero > .wp-block-column:first-child {
        min-height: auto;
    }
}

/* v0.9.0.8 – keep the Figma hero grid centered at every viewport width. */
.leni-section--hero {
    justify-content: center;
    padding: 48px 0;
}

.leni-section--hero > .leni-page-container {
    flex: 0 1 1280px;
    width: calc(100% - 48px);
    max-width: 1280px;
    margin-inline: auto;
}

.leni-section--hero .leni-split {
    width: 100%;
}

@media (max-width: 781px) {
    .leni-section--hero {
        padding: 48px 0;
    }

    .leni-section--hero > .leni-page-container {
        width: calc(100% - 32px);
    }
}

@media (max-width: 480px) {
    .leni-section--hero > .leni-page-container {
        width: calc(100% - 24px);
    }
}
