/*
 * Employer frontend contract integration.
 *
 * The immutable source references live in resources/frontend-contract.
 * This stylesheet only repairs layout, responsiveness and runtime
 * integration. It intentionally avoids introducing a new visual system.
 */

body[data-employer-home-page] {
    background: #fff;
}

body[data-employer-home-page] .home-shell {
    width: min(1400px, calc(100% - 32px));
}

body[data-employer-home-page] .home-announcement {
    background: #31541f;
    color: #fff;
}

body[data-employer-home-page] .home-announcement__inner {
    min-height: 42px;
    justify-content: center;
}

body[data-employer-home-page] .home-announcement__inner p {
    font-weight: 700;
    text-align: center;
}

body[data-employer-home-page] .home-announcement__inner a {
    display: none;
}

body[data-employer-home-page] .home-header {
    position: relative;
    top: auto;
    border: 0;
    background: #fff;
    box-shadow: none;
    backdrop-filter: none;
}

body[data-employer-home-page] .home-header__main {
    min-height: 112px;
    grid-template-columns:
        128px
        minmax(260px, 620px)
        minmax(300px, auto);
    justify-content: space-between;
    gap: clamp(18px, 3vw, 48px);
}

body[data-employer-home-page] .home-brand {
    width: 112px;
    height: 78px;
}

body[data-employer-home-page] .home-search {
    min-height: 46px;
    padding: 3px 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(192, 255, 128, 0.7);
    box-shadow: none;
}

body[data-employer-home-page] .home-search__icon {
    display: none;
}

body[data-employer-home-page] .home-search input {
    height: 40px;
    color: #31541f;
    font-size: 0.92rem;
}

body[data-employer-home-page] .home-search button {
    display: none;
}

body[data-employer-home-page] .home-header__actions {
    gap: 12px;
}

body[data-employer-home-page] .home-seller-entry {
    min-height: 46px;
    padding: 8px 16px;
    border-radius: 14px;
    background: #31541f;
}

body[data-employer-home-page] .home-icon-button,
body[data-employer-home-page] .home-cart-button {
    min-height: 46px;
    border: 0;
    background: #f1f1f1;
}

body[data-employer-home-page] .home-icon-button {
    padding-inline: 15px;
}

body[data-employer-home-page] .home-navigation {
    border: 0;
    background: #faf7f2;
}

body[data-employer-home-page] .home-navigation ul {
    min-height: 68px;
    justify-content: center;
    gap: clamp(2px, 1vw, 14px);
}

body[data-employer-home-page] .home-navigation a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #384e1b;
    font-size: 0.88rem;
    font-weight: 800;
}

body[data-employer-home-page] .home-navigation a:hover,
body[data-employer-home-page] .home-navigation a:focus-visible {
    background: rgba(100, 154, 50, 0.18);
}

.employer-home--contract {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 clamp(54px, 7vw, 96px);
}

.employer-home--contract > section {
    width: min(1320px, calc(100% - 32px));
    margin-inline: auto;
}

.home-contract-hero {
    margin-top: clamp(18px, 3vw, 34px);
}

.home-contract-hero .home-hero__viewport {
    min-height: 0;
    height: clamp(290px, 33vw, 475px);
    overflow: hidden;
    border-radius: 28px;
    background: #ede8df;
    box-shadow: none;
}

.home-contract-hero .home-hero__track,
.home-contract-hero .employer-hero-slide {
    width: 100%;
    height: 100%;
}

.home-contract-hero .employer-hero-slide {
    object-fit: cover;
}

.home-contract-hero .home-hero__shade {
    background:
        linear-gradient(
            270deg,
            rgba(24, 34, 20, 0.52) 0%,
            rgba(24, 34, 20, 0.12) 52%,
            transparent 78%
        );
}

.home-contract-hero .home-hero__content {
    top: 50%;
    right: clamp(28px, 7vw, 110px);
    bottom: auto;
    width: min(480px, calc(100% - 80px));
    transform: translateY(-50%);
    color: #fff;
}

.home-contract-hero .home-hero__content h1 {
    max-width: none;
    color: #fff;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.35;
    text-shadow: 0 3px 16px rgba(0, 0, 0, 0.28);
}

.home-contract-hero .home-hero__lead {
    max-width: none;
    margin-top: 4px;
    color: #fff;
    font-size: clamp(0.95rem, 1.5vw, 1.25rem);
    font-weight: 700;
}

.home-contract-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 9px 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.86);
    color: #263b1d;
    font-weight: 900;
}

.home-contract-button:hover {
    background: #fff;
}

.home-contract-hero .home-hero__control {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.94);
    color: #1f2b1b;
    box-shadow: none;
}

.home-contract-hero .home-hero__control--previous {
    right: 18px;
}

.home-contract-hero .home-hero__control--next {
    left: 18px;
}

.home-contract-hero .home-hero__dots {
    bottom: 16px;
}

.home-contract-categories {
    margin-top: clamp(48px, 7vw, 90px);
    padding: 0;
}

.home-contract-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.home-contract-heading img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.home-contract-heading h2,
.home-contract-products-heading h2 {
    color: #2a3127;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.5;
}

.home-contract-categories .employer-category-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
}

.home-contract-categories .employer-category-card {
    min-width: 0;
    min-height: 148px;
    padding: 12px 8px;
    border: 1px solid rgba(42, 49, 39, 0.12);
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
}

.home-contract-categories .employer-category-card img {
    width: 94px;
    height: 94px;
    object-fit: contain;
}

.home-contract-categories .employer-category-card span {
    color: #26311f;
    font-size: 0.9rem;
    font-weight: 800;
    text-align: center;
}

.home-contract-offer {
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: clamp(54px, 8vw, 110px);
    padding: clamp(26px, 5vw, 58px);
    overflow: hidden;
    border-radius: 26px;
    background: #315d2b;
    color: #fff;
}

.home-contract-offer__content {
    position: relative;
    z-index: 1;
}

.home-contract-offer h2 {
    display: flex;
    flex-direction: column;
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    line-height: 1.55;
}

.home-contract-offer h2 strong {
    color: #d8ea58;
}

.home-contract-offer__content > a {
    display: inline-flex;
    margin-top: 20px;
    padding: 9px 20px;
    border-radius: 9px;
    background: #fff;
    color: #31541f;
    font-weight: 900;
}

.home-contract-offer > img {
    width: min(310px, 34vw);
    max-height: 230px;
    object-fit: contain;
}

.employer-home--contract .employer-products-section {
    margin-top: clamp(58px, 8vw, 110px);
    padding: 0;
}

.home-contract-products-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.home-contract-products-heading > a {
    color: #3f6c32;
    font-weight: 900;
}

.employer-home--contract .employer-products-grid {
    grid-template-columns:
        repeat(5, minmax(210px, 1fr));
    gap: 16px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
}

.employer-home--contract .employer-products-grid .pro {
    min-width: 210px;
    border: 1px solid rgba(42, 49, 39, 0.12);
    border-radius: 16px;
    background: #fff;
    box-shadow: none;
    scroll-snap-align: start;
}

.employer-home--contract .employer-products-grid .im-c {
    aspect-ratio: 1 / 1;
    background: #f6f4ef;
}

@media (max-width: 1080px) {
    body[data-employer-home-page] .home-header__main {
        grid-template-columns: 100px minmax(220px, 1fr) auto;
        gap: 16px;
    }

    body[data-employer-home-page] .home-brand {
        width: 92px;
        height: 68px;
    }

    body[data-employer-home-page] .home-seller-entry {
        display: none;
    }

    body[data-employer-home-page] .home-navigation ul {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-block: 8px;
        scrollbar-width: none;
    }

    body[data-employer-home-page] .home-navigation ul::-webkit-scrollbar {
        display: none;
    }

    body[data-employer-home-page] .home-navigation li {
        flex: 0 0 auto;
    }

    .home-contract-categories .employer-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    body[data-employer-home-page] .home-shell,
    .employer-home--contract > section {
        width: min(100% - 20px, 1320px);
    }

    body[data-employer-home-page] .home-announcement__inner {
        min-height: 34px;
    }

    body[data-employer-home-page] .home-announcement__inner p {
        overflow: hidden;
        font-size: 0.67rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body[data-employer-home-page] .home-header__main {
        min-height: auto;
        grid-template-columns: 58px minmax(0, 1fr) auto;
        grid-template-areas:
            "brand search actions";
        gap: 8px;
        padding-block: 10px;
    }

    body[data-employer-home-page] .home-brand {
        grid-area: brand;
        width: 54px;
        height: 48px;
    }

    body[data-employer-home-page] .home-search {
        grid-area: search;
        min-height: 40px;
        padding-inline: 12px;
    }

    body[data-employer-home-page] .home-search input {
        height: 34px;
        font-size: 0.75rem;
    }

    body[data-employer-home-page] .home-header__actions {
        grid-area: actions;
        gap: 6px;
    }

    body[data-employer-home-page] .home-icon-button {
        width: 42px;
        min-width: 42px;
        padding: 6px;
    }

    body[data-employer-home-page] .home-icon-button > span {
        display: none;
    }

    body[data-employer-home-page] .home-cart-button {
        width: 42px;
        flex-basis: 42px;
    }

    body[data-employer-home-page] .home-menu-toggle {
        display: none;
    }

    body[data-employer-home-page] .home-navigation {
        display: block;
    }

    body[data-employer-home-page] .home-navigation ul {
        min-height: 48px;
    }

    body[data-employer-home-page] .home-navigation a {
        padding: 7px 11px;
        font-size: 0.73rem;
    }

    .home-contract-hero {
        margin-top: 10px;
    }

    .home-contract-hero .home-hero__viewport {
        height: 280px;
        border-radius: 18px;
    }

    .home-contract-hero .home-hero__shade {
        background:
            linear-gradient(
                270deg,
                rgba(24, 34, 20, 0.56),
                rgba(24, 34, 20, 0.1)
            );
    }

    .home-contract-hero .home-hero__content {
        right: 22px;
        width: calc(100% - 70px);
    }

    .home-contract-hero .home-hero__content h1 {
        font-size: clamp(1.55rem, 8vw, 2.15rem);
    }

    .home-contract-hero .home-hero__lead {
        font-size: 0.88rem;
    }

    .home-contract-button {
        min-height: 40px;
        margin-top: 14px;
        padding: 7px 16px;
        font-size: 0.8rem;
    }

    .home-contract-hero .home-hero__control {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .home-contract-hero .home-hero__control--previous {
        right: 8px;
    }

    .home-contract-hero .home-hero__control--next {
        left: 8px;
    }

    .home-contract-categories {
        margin-top: 44px;
    }

    .home-contract-heading {
        gap: 7px;
        margin-bottom: 20px;
    }

    .home-contract-heading img {
        width: 25px;
        height: 25px;
    }

    .home-contract-categories .employer-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }

    .home-contract-categories .employer-category-card {
        min-height: 112px;
        padding: 8px 5px;
        border-radius: 13px;
    }

    .home-contract-categories .employer-category-card img {
        width: 66px;
        height: 66px;
    }

    .home-contract-categories .employer-category-card span {
        font-size: 0.69rem;
    }

    .home-contract-offer {
        min-height: 205px;
        gap: 10px;
        margin-top: 48px;
        padding: 24px 20px;
        border-radius: 18px;
    }

    .home-contract-offer h2 {
        font-size: 1.35rem;
    }

    .home-contract-offer__content > a {
        padding: 7px 12px;
        font-size: 0.72rem;
    }

    .home-contract-offer > img {
        width: 42%;
    }

    .home-contract-products-heading {
        align-items: flex-end;
        margin-bottom: 18px;
    }

    .home-contract-products-heading > a {
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .employer-home--contract .employer-products-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: minmax(184px, 72vw);
    }

    .employer-home--contract .employer-products-grid .pro {
        min-width: 0;
    }

}

@media (max-width: 380px) {
    .home-contract-categories .employer-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-contract-offer {
        align-items: flex-end;
    }

    .home-contract-offer > img {
        width: 38%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-contract-hero *,
    .home-contract-categories *,
    .home-contract-offer * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
