/* Editor overflow fix */
.block-editor-block-list__layout .home-overview-block,
.editor-styles-wrapper .home-overview-block,
.wp-block-acf-home-overview .home-overview-block {
    max-width: 100%;
    overflow-x: hidden;
}

/* Home Overview Block */
.home-overview-block {
    --home-overview-container-padding-inline: 9.375rem;
    --home-overview-headline-size-fluid: clamp(1.5rem, 0.75rem + 1.2vw, 2.5rem);
    --home-overview-headline-line-fluid: clamp(2rem, 1.25rem + 1.2vw, 3rem);
    --home-overview-stat-value-size-fluid: clamp(3rem, 2.25rem + 1.2vw, 4rem);
    --home-overview-stat-value-line-fluid: clamp(3rem, 2.25rem + 1.2vw, 4rem);
    width: 100%;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--color-white);
    padding: 7.5rem 0 12.5rem;
    box-sizing: border-box;
}

.home-overview-content {
    max-width: 1728px;
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--home-overview-container-padding-inline);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6.25rem;
    align-items: start;
    box-sizing: border-box;
}

.home-overview-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 34.5rem;
    box-sizing: border-box;
}

.home-overview-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 8px; */
    width: 100%;
    /* max-width: 584px; */
    box-sizing: border-box;
}

/* Typography */
.home-overview-headline {
    font-family: 'Outfit', sans-serif;
    font-size: var(--home-overview-headline-size-fluid);
    font-weight: 400;
    font-style: normal;
    line-height: var(--home-overview-headline-line-fluid);
    letter-spacing: 0;
    color: var(--color-green-primary);
    margin: 0;
}

.home-overview-description {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0;
    color: var(--color-primary-dark);
    margin: 0;
}

.home-overview-description p {
    margin: 0 0 1.5rem 0;
}

.home-overview-description p:last-child {
    margin-bottom: 0;
}

/* Statistics */
.home-overview-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 35.9375rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-gray-ui);
    box-sizing: border-box;
    gap: 0;
}

.home-overview-stat:first-child {
    padding-top: 0;
}

.home-overview-stat:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.home-overview-stat-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    padding: 0;
    box-sizing: border-box;
}

.home-overview-stat-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-style: normal;
    font-size: var(--home-overview-stat-value-size-fluid);
    line-height: var(--home-overview-stat-value-line-fluid);
    letter-spacing: 0;
    color: var(--color-gray-border);
    /* Increased contrast on white for WCAG AA */
    width: 11rem;
    height: 4.5rem;
    text-transform: uppercase;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    /* margin-left: 20px; */
}

.home-overview-stat-description {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.375rem;
    width: 15.5rem;
    flex-shrink: 0;
    cursor: pointer;
    box-sizing: border-box;
    border: none;
    outline: none;
    padding-top: 0.75rem;
}

.home-overview-stat-description:focus {
    outline: none;
    border: none;
}

.home-overview-stat-description:focus .home-overview-stat-text {
    border: none;
    outline: none;
}

.home-overview-stat-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0;
    color: var(--color-black-soft);
    width: 13rem;
    height: 4.5rem;
    display: flex;
    align-items: center;
    vertical-align: middle;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    margin: 0;
    border: none;
    outline: none;
}

.home-overview-stat-arrow {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.25rem 0.275625rem 0.276875rem 0.27625rem;
    box-sizing: border-box;
    flex-shrink: 0;
    color: var(--color-green-primary);
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* Expanded State */
.home-overview-stat.expanded {
    background-color: var(--color-surface-muted);
    padding-top: 0.5rem;
    padding-bottom: 2rem;
}

.home-overview-stat.expanded .home-overview-stat-arrow {
    transform: rotate(180deg);
}

.home-overview-stat.expanded .home-overview-stat-value {
    color: var(--color-green-primary);
    margin-left: 0;
}

.home-overview-stat.expanded .home-overview-stat-row {
    background-color: var(--color-surface-muted);
    /* width: 575px; */
    /* padding: 20px 24px; */
    box-sizing: border-box;
}

.home-overview-stat.expanded .home-overview-stat-description {
    width: calc(100% - 12.0625rem);
    align-items: center;
}

.home-overview-stat.expanded .home-overview-stat-text {
    width: auto;
    height: auto;
    flex: 1;
    max-width: none;
    display: block;
    line-height: 1.5rem;
    margin: 0;
    padding: 0;
}

.home-overview-stat.expanded .home-overview-stat-arrow {
    align-self: center;
    margin-top: 0;
    margin-right: 0;
    flex-shrink: 0;
    height: 1.5rem;
    width: 1.5rem;
    padding: 0.25rem 0.275625rem 0.276875rem 0.27625rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-overview-stat-content {
    display: none;
    /* width: 575px; */
    /* background-color: var(--color-surface-muted); */
    /* padding: 0 20px 20px 220px; */
    margin: 0;
    box-sizing: border-box;
    animation: slideDown 0.3s ease;
}

.home-overview-stat.expanded .home-overview-stat-content {
    display: block;
}

.home-overview-stat-expanded-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0;
    color: var(--color-black-soft);
    margin-bottom: 1.5rem;
}

.home-overview-stat.expanded .home-overview-stat-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0;
    margin-left: 0;
    padding-left: 0;
}

.home-overview-stat-expanded-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0;
    margin-left: 0;
    padding-left: 0;
    color: var(--color-black-soft);
    padding-right: 2.5rem;
}

.home-overview-stat-read-more {
    margin-left: 0;
    padding-left: 0;
}

.home-overview-stat-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0;
    color: var(--color-green-dark);
    text-decoration: none;
    padding: 14px 0;
    transition: color 0.2s ease;
}

.home-overview-stat-read-more:hover {
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 1rem;
    line-height: 1.5rem;
    letter-spacing: 0;
    text-align: center;
    color: var(--color-green-dark);
    text-decoration: none;
}

.home-overview-stat-read-more svg {
    width: 24px;
    height: 24px;
    color: var(--color-green-dark);
    transition: transform 0.2s ease;
}

.home-overview-stat-read-more:hover svg {
    transform: translateX(4px);
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 31.25rem;
    }
}

/* Block Alignment */
.home-overview-block.alignwide {
    max-width: 75rem;
    margin-left: auto;
    margin-right: auto;
}

.home-overview-block.alignfull {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.block-editor-block-list__layout .home-overview-block.alignfull,
.editor-styles-wrapper .home-overview-block.alignfull,
.wp-block-acf-home-overview .home-overview-block.alignfull {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Responsive */
@media (min-width: 1025px) {
    .home-overview-headline {
        max-width: 29.9375rem;
    }

    .home-overview-content {
        gap: 4.5rem;
    }

    .home-overview-stat {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .home-overview-stat-description {
        gap: 1rem;
    }

    .home-overview-stat-arrow {
        margin-left: 0;
    }
}

@media (min-width: 1541px) {
    .home-overview-block {
        --home-overview-container-padding-inline: clamp(6rem, 15.046vw, 16.25rem);
    }
}

@media (min-width: 1281px) and (max-width: 1540px) {
    .home-overview-block {
        --home-overview-container-padding-inline: 9.375rem;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .home-overview-block {
        --home-overview-container-padding-inline: 5rem;
    }
}

@media (min-width: 871px) and (max-width: 1024px) {
    .home-overview-block {
        --home-overview-container-padding-inline: 3.125rem;
    }
}

@media (min-width: 768px) and (max-width: 870px) {
    .home-overview-block {
        --home-overview-container-padding-inline: 2rem;
    }
}

@media (max-width: 767.98px) {
    .home-overview-block {
        --home-overview-container-padding-inline: 1rem;
    }
}

@media (min-width: 1001px) and (max-width: 1199px) {
    .home-overview-content {
        gap: 3.75rem;
        /* Reduce gap from 100px to 60px */
    }

    .home-overview-left {
        max-width: 100%;
        /* Remove fixed max-width */
    }

    .home-overview-right {
        max-width: 100%;
        /* Remove fixed max-width */
    }

    .home-overview-stat {
        width: 100%;
        /* Make stat full width of container */
        max-width: 100%;
    }

    .home-overview-stat.expanded .home-overview-stat-row {
        width: 100%;
        /* Ensure expanded state fits */
        max-width: 100%;
    }

    .home-overview-stat-content {
        width: 100%;
        /* Ensure expanded content fits */
        max-width: 100%;
    }
}

@media (min-width: 1001px) and (max-width: 1024px) {

    .home-overview-headline {
        font-size: clamp(1.875rem, 0.792rem + 1.988vw, 2.5rem);
        line-height: clamp(2.375rem, 1.292rem + 1.988vw, 3rem);
    }

    .home-overview-stat {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .home-overview-stat-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center !important;
    }

    .home-overview-stat-description {
        width: 15.5rem !important;
        flex: 0 0 auto !important;
        gap: 1rem;
    }

    .home-overview-stat.expanded .home-overview-stat-row {
        flex-direction: row;
        align-items: center !important;
        gap: 1.25rem;
    }

    .home-overview-stat.expanded .home-overview-stat-description {
        width: calc(100% - 12.0625rem) !important;
        max-width: calc(100% - 12.0625rem);
        flex: 0 0 auto !important;
        margin-bottom: 0;
    }

    .home-overview-stat.expanded .home-overview-stat-content {
        width: calc(100% - 12.0625rem);
        max-width: calc(100% - 12.0625rem);
        margin-left: 12.0625rem;
        padding-top: 0.5rem;
    }
}

@media (min-width: 1025px) {
    .home-overview-stat.expanded .home-overview-stat-content {
        width: calc(100% - 12.0625rem);
        max-width: calc(100% - 12.0625rem);
        margin-left: 12.0625rem;
        padding-top: 0.5rem;
        box-sizing: border-box;
    }
}

@media (max-width: 767.98px) {
    .home-overview-stat-expanded-text {
        padding-right: 0px !important;
    }

}

@media (max-width: 1000px) {
    .home-overview-block {
        padding: 3.75rem 0 8.75rem;

    }

    .home-overview-content {
        padding: 0 var(--home-overview-container-padding-inline);
        grid-template-columns: 1fr;
        gap: 3.75rem;
    }

    .home-overview-left {
        /* max-width: 329px; Mobile width from Figma */
        gap: 1.5rem;
        /* 24px gap from Figma */
        max-width: 100%;
        /* padding: 0 1rem; */
    }

    .home-overview-right {
        /* max-width: 376px; Container width from Figma */
        align-items: center;
        /* Center alignment from Figma */
        /* gap: 16px; 16px gap from Figma */
    }

    .home-overview-headline {
        font-size: 1.5rem;
        /* Headline Regular 24 from Figma */
        line-height: 1.333em;
        /* 1.333em from Figma */
    }

    .home-overview-description {
        font-size: 1rem;
        /* Body Light 16 from Figma */
        font-weight: 300;
        /* Light weight from Figma */
        line-height: 1.5em;
        /* 1.5em from Figma */
    }

    .home-overview-stat {
        width: 100%;
        flex-direction: column;
        /* Column layout from Figma */
        flex-wrap: nowrap;
        gap: 0;
        padding: 1rem;
        align-items: stretch;
    }

    .home-overview-stat:first-child {
        padding-top: 0;
    }

    .home-overview-stat:last-child {
        padding-bottom: 0;
    }

    .home-overview-stat-row {
        width: 100%;
        flex-direction: column;
        /* Column layout on mobile from Figma */
        gap: 0;
        padding: 0;
        align-items: stretch;
    }

    .home-overview-stat-value {
        font-size: 4rem;
        /* Display Bold 64 from Figma */
        width: 100%;
        height: 4.5rem;
        /* Height from Figma */
        min-width: auto;
    }

    .home-overview-stat-description {
        width: 100%;
        max-width: none;
        gap: 1rem;
        justify-content: space-between;
        align-self: stretch;
    }

    .home-overview-stat-text {
        width: 13rem;
        /* Text width from Figma */
        height: 4.5rem;
        /* Height from Figma */
        max-width: 13rem;
    }

    .home-overview-stat.expanded .home-overview-stat-text {
        width: auto;
        height: auto;
        max-width: none;
        flex: 1;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .home-overview-stat-arrow {
        width: 1.5rem;
        height: 1.5rem;
    }

    .home-overview-stat-content {
        width: 100%;
        max-width: 100%;
        /* padding: 0 1rem 1rem 1rem; */
        box-sizing: border-box;
    }

    .home-overview-stat.expanded .home-overview-stat-row {
        width: 100%;
        max-width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        box-sizing: border-box;
    }

    .home-overview-stat.expanded .home-overview-stat-description {
        width: 100%;
        max-width: none;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .home-overview-stat.expanded .home-overview-stat-content {
        padding-right: 2.5rem;
    }
}

@media (min-width: 768px) and (max-width: 1000px) {
    .home-overview-right {
        align-items: stretch;
    }

    .home-overview-stat {
        width: 100%;
        flex-direction: column;
        padding: 0.5rem 0;
        align-items: stretch;
    }

    .home-overview-stat:first-child {
        padding-top: 0;
    }

    .home-overview-stat:last-child {
        padding-bottom: 0;
    }

    .home-overview-stat-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1.25rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .home-overview-stat-value {
        width: 11rem;
        height: 4.5rem;
        min-width: 11rem;
    }

    .home-overview-stat-description {
        width: 15.5rem;
        max-width: none;
        gap: 1rem;
        justify-content: flex-start;
        align-self: auto;
    }

    .home-overview-stat-text {
        width: 13rem;
        max-width: none;
        height: 4.5rem;
    }

    .home-overview-stat-content {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .home-overview-stat.expanded .home-overview-stat-row {
        flex-direction: row;
        align-items: center !important;
        gap: 1.25rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .home-overview-stat.expanded .home-overview-stat-description {
        width: calc(100% - 12.0625rem) !important;
        max-width: calc(100% - 12.0625rem);
        flex: 0 0 auto !important;
        justify-content: flex-start;
        align-items: flex-start;
        margin-bottom: 0;
    }

    .home-overview-stat.expanded .home-overview-stat-content {
        width: calc(100% - 13.0625rem);
        max-width: calc(100% - 13.0625rem);
        margin-left: 13.0625rem;
        padding-top: 0.5rem;
        padding-right: 1rem;
        box-sizing: border-box;
    }
}

/* Editor Preview */
.wp-block-acf-home-overview .home-overview-block {
    border: 2px dashed var(--color-border-medium);
    position: relative;
}

.wp-block-acf-home-overview .home-overview-block::after {
    content: "🏠 Home Overview Section - Headline, description & statistics";
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 0.75rem;
    font-size: 0.6875rem;
    border-radius: 0.25rem;
    z-index: 10;
    font-weight: 500;
    max-width: 17.5rem;
    text-align: center;
    line-height: 1.3;
}

@media (max-width: 1000px) {
    .home-overview-stat-description {
        width: auto !important;
        flex: 1 !important;
    }

    .home-overview-stat-row {
        align-items: stretch !important;
    }
}

.home-overview-stat-arrow {
    margin-left: 0;
}

.home-overview-stat-description:focus-visible {
    outline: 0.1875rem solid var(--color-focus-ring) !important;
    outline-offset: 0.25rem;
}

.home-overview-stat-row button {
    background: none !important;
    text-align: left;
    flex: unset !important;
}