/* ==========================================================================
   Homepage — matched to Framer Firmo template
   ========================================================================== */

/* ---- HERO VARIANT 2: Full image with text overlay ---- */
.hero-v2 {
    position: relative;
    max-width: var(--container-max);
    margin: 24px auto 0;
    padding: 0 var(--page-padding);
    overflow: hidden;
}

.hero-v2__image {
    border-radius: 8px;
    overflow: hidden;
}

.hero-v2__image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.hero-v2__overlay {
    position: absolute;
    top: 0;
    left: var(--page-padding);
    right: var(--page-padding);
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.25) 50%, rgba(0,0,0,0.15) 100%);
    border-radius: 8px;
    pointer-events: none;
}

.hero-v2__content {
    position: absolute;
    bottom: 48px;
    left: calc(var(--page-padding) + 40px);
    right: calc(var(--page-padding) + 40px);
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-v2__content h1 {
    font-family: var(--font-body);
    font-size: var(--text-3xl);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: var(--ls-heading-tight);
    color: var(--color-white);
    max-width: 700px;
}

.hero-v2__content p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
}

.hero-v2__content .btn {
    align-self: flex-start;
}

@media (max-width: 1023px) {
    .hero-v2__content {
        bottom: 32px;
        left: calc(var(--page-padding) + 24px);
        right: calc(var(--page-padding) + 24px);
    }

    .hero-v2__content h1 {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .hero-v2__content {
        bottom: 24px;
        left: calc(var(--page-padding) + 16px);
        right: calc(var(--page-padding) + 16px);
    }

    .hero-v2__content h1 {
        font-size: 28px;
    }

    .hero-v2__content p {
        display: none;
    }
}

/* ---- HERO: 50/50 split — text left, image right ---- */
.page-home .hero-section {
    padding: 0;
    max-height: calc(100vh - var(--nav-height));
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 3fr;
    height: calc(100vh - var(--nav-height));
    max-height: calc(100vh - var(--nav-height));
    padding: 24px 0;
    box-sizing: border-box;
    gap: 60px;
}

.hero-text {
    display: flex;
    flex-direction: column;
    padding-right: 100px;
}

.hero-text h1 {
    font-family: var(--font-body);
    font-size: clamp(2.2rem, 2.4vw + 1rem, 3.2rem);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -1.5px;
    color: var(--color-text-heading);
    margin-bottom: 20px;
}

.hero-text > p {
    font-family: var(--font-body);
    font-size: clamp(1rem, 0.3vw + 0.9rem, 1.15rem);
    line-height: 1.65;
    color: var(--color-text-body);
}

.hero-text .btn {
    align-self: flex-start;
    margin-top: auto;
}

.hero-image {
    position: relative;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
    display: block;
}

/* ---- SPEZIALISIERUNG: image left 50%, content right 50% ---- */
.specialization-section {
    padding: 52px 0;
}

.spec-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.spec-image {
    position: relative;
    overflow: hidden;
}

.spec-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 600px;
}

.spec-image--mobile {
    display: none;
}

.spec-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 0;
}

.spec-content h2 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: var(--ls-heading-tight);
    color: var(--color-text-heading);
}

.spec-content > p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--color-text-body);
}

.spec-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
}

.spec-feature h3 {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: var(--ls-heading);
    color: var(--color-text-heading);
    margin-bottom: 4px;
}

.spec-feature p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--color-text-body);
}

/* ---- RECHTSGEBIETE: accent bg, two-column ---- */
.rechtsgebiete-section {
    padding: 52px 0;
}

.rg-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 120px;
    align-items: start;
}

.rg-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rg-info h2 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: var(--ls-heading-tight);
    color: var(--color-text-heading);
}

.rg-info > p {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.5;
    color: var(--color-text-body);
}

.rg-list {
    display: flex;
    flex-direction: column;
}

.rechtsgebiete-section .practice-area-row {
    text-decoration: none;
    color: var(--color-text-body);
    font-family: var(--font-body);
    font-size: var(--text-base);
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease, padding-left 0.3s ease;
}

.rechtsgebiete-section .practice-area-row:hover {
    background-color: var(--color-bg-primary);
}

.rechtsgebiete-section .practice-area-row__title {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    color: var(--color-text-body);
}

.rechtsgebiete-section .practice-area-row__arrow {
    display: none;
}

.rg-btn {
    align-self: flex-start;
    margin-top: var(--space-md);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1023px) {
    .page-home .hero-section {
        max-height: none;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        padding: 40px;
        gap: 32px;
    }

    .hero-text {
        gap: 20px;
        padding-right: 0;
    }

    .hero-image {
        aspect-ratio: 4 / 3;
    }

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

    .spec-image:not(.spec-image--mobile) {
        display: none;
    }

    .spec-image--mobile {
        display: block;
        border-radius: 8px;
        overflow: hidden;
        margin: var(--space-md) 0;
    }

    .spec-image--mobile img {
        min-height: 250px;
        max-height: 350px;
    }

    .rg-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
}

@media (max-width: 767px) {
    .hero-grid {
        padding: 32px 24px;
        gap: 24px;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .hero-image {
        aspect-ratio: 3 / 2;
    }

    /* Rechtsgebiete: horizontal swipe slideshow */
    .rg-list {
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: var(--space-sm);
        padding-bottom: var(--space-sm);
        scrollbar-width: none;
    }

    .rg-list::-webkit-scrollbar {
        display: none;
    }

    .rechtsgebiete-section .practice-area-row {
        flex: 0 0 70%;
        scroll-snap-align: start;
        background: var(--color-bg, #fff);
        border-radius: 12px;
        padding: 20px 24px;
        justify-content: center;
    }

    .rg-btn {
        flex: 0 0 auto;
        scroll-snap-align: start;
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 479px) {
    .hero-grid {
        padding: 24px 20px;
    }

    .hero-text h1 {
        font-size: 28px;
    }
}
