/** Featured categories hero **/

.featured-categories-hero {
    position: relative;
    background: #f3f4f6;
    padding: clamp(148px, 13vw, 176px) 0 72px;
}

.featured-categories-hero__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 36px;
}

.featured-categories-hero__heading {
    flex: 1 1 auto;
    min-width: 0;
}

.featured-categories-hero__header h1 {
    font-family: var(--title-font);
    font-size: clamp(26px, 3.6vw, 42px);
    line-height: 1.2;
    font-weight: 700;
    color: var(--title-color);
    max-width: 640px;
    margin: 0;
}

.featured-categories-hero__intro {
    max-width: 520px;
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    margin-top: 12px;
}

.featured-categories-hero__awards {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 20px 32px;
    flex: 0 0 auto;
    padding-left: 16px;
}

.hero-award {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    flex-shrink: 0;
}

.hero-award__text {
    font-family: var(--title-font);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--title-color);
    max-width: 118px;
    text-align: center;
}

.hero-award__text p {
    margin: 0;
}

.hero-award__leaf {
    width: auto;
    height: 40px;
    flex-shrink: 0;
    object-fit: contain;
    opacity: 0.85;
}

.hero-award__leaf--right {
    transform: scaleX(-1);
}

.featured-categories-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
}

.featured-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 24px 24px 20px;
    border-radius: 18px;
    background: #ffffff;
    border: 2px solid transparent;
    box-shadow: 0 10px 40px rgba(17, 17, 17, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transform-origin: center bottom;
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.3s ease;
}

.featured-category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(145deg, rgba(120, 235, 84, 0.12) 0%, rgba(120, 235, 84, 0) 55%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
    pointer-events: none;
}

.featured-category-card:hover,
.featured-category-card:focus-visible {
    transform: translateY(-14px) scale(1.045);
    z-index: 3;
    border-color: rgba(120, 235, 84, 0.45);
    box-shadow:
        0 28px 64px rgba(17, 17, 17, 0.16),
        0 0 0 1px rgba(120, 235, 84, 0.2);
    color: inherit;
}

.featured-category-card:hover::before,
.featured-category-card:focus-visible::before {
    opacity: 1;
}

.featured-category-card--hero {
    grid-column: span 6;
    grid-row: span 2;
    min-height: 440px;
    padding: 28px;
}

.featured-category-card--compact {
    grid-column: span 3;
    min-height: 210px;
}

.featured-category-card__content {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 72%;
    padding-bottom: 12px;
}

.featured-category-card--compact .featured-category-card__content {
    max-width: 100%;
    padding-right: 0;
}

.featured-category-card__badge {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(120, 235, 84, 0.18);
    color: var(--secondary-color);
    font-size: 12px;
    line-height: 1.35;
    font-weight: 600;
    white-space: normal;
    text-align: left;
    align-self: flex-start;
}

.featured-category-card__title {
    font-family: var(--title-font);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--title-color);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.featured-category-card:hover .featured-category-card__title {
    color: var(--secondary-color);
}

.featured-category-card--hero .featured-category-card__title {
    font-size: 30px;
}

.featured-category-card__summary {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.45;
    margin: 0;
}

.featured-category-card__link {
    position: relative;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-top: auto;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid rgba(17, 17, 17, 0.12);
    color: var(--title-color);
    background: #fff;
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        box-shadow 0.3s ease;
}

.featured-category-card:has(.featured-category-card__image) .featured-category-card__content {
    max-width: 100%;
}

.featured-category-card:has(.featured-category-card__image) .featured-category-card__link {
    margin-top: 16px;
}

.featured-category-card:hover .featured-category-card__link {
    background: var(--theme-color);
    border-color: var(--theme-color);
    color: var(--secondary-color);
    transform: translateX(6px);
    box-shadow: 0 8px 20px rgba(120, 235, 84, 0.35);
}

.featured-category-card__image {
    position: absolute;
    right: 8px;
    bottom: 56px;
    z-index: 1;
    max-width: 42%;
    max-height: calc(100% - 88px);
    object-fit: contain;
    object-position: bottom right;
    pointer-events: none;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.featured-category-card:hover .featured-category-card__image {
    transform: scale(1.08) translateY(-6px);
}

.featured-category-card--hero .featured-category-card__image {
    max-width: 46%;
    max-height: calc(100% - 96px);
}

.featured-category-card--compact .featured-category-card__image {
    max-width: 40%;
    max-height: calc(100% - 92px);
    bottom: 52px;
}

/** Partners marquee **/

.partners-marquee-section {
    position: relative;
    margin-top: -56px;
    z-index: 2;
}

.partners-marquee-section--inline {
    margin-top: 0;
}

.partners-marquee {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.1);
    padding: 36px 0;
}

.partners-marquee__track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: partners-marquee-scroll 35s linear infinite;
}

.partners-marquee:hover .partners-marquee__track {
    animation-play-state: paused;
}

.partners-marquee__item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 0 32px;
}

.partners-marquee__item img {
    max-height: 42px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.65;
    transition: all 0.25s ease;
}

.partners-marquee__item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.partners-marquee__item span {
    font-size: 18px;
    font-weight: 700;
    color: #777;
    letter-spacing: 0.04em;
}

@keyframes partners-marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@media only screen and (min-width: 992px) {
    .featured-categories-hero__awards {
        flex-wrap: nowrap;
        gap: 36px;
    }

    .hero-award__text {
        font-size: 13px;
        max-width: 128px;
    }
}

@media only screen and (max-width: 1199px) {
    .featured-category-card--hero {
        grid-column: span 6;
        grid-row: span 2;
        min-height: 380px;
    }

    .featured-category-card--compact {
        grid-column: span 3;
    }
}

@media only screen and (max-width: 991px) {
    .featured-categories-hero__header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 18px;
        margin-bottom: 28px;
    }

    .featured-categories-hero__heading {
        width: 100%;
    }

    .featured-categories-hero__header h1 {
        max-width: 520px;
        margin-inline: auto;
        font-size: clamp(22px, 5vw, 30px);
    }

    .featured-categories-hero__awards {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 16px 28px;
        max-width: none;
        width: 100%;
        padding-left: 0;
    }

    /* ACKO-style 2-column mosaic */
    .featured-categories-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: minmax(132px, auto);
        gap: 12px;
    }

    .featured-category-card {
        min-height: 132px;
        padding: 16px;
        border-radius: 14px;
    }

    .featured-category-card--hero {
        grid-column: 1;
        grid-row: 1 / span 2;
        min-height: 276px;
    }

    .featured-category-card--compact:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }

    .featured-category-card--compact:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .featured-category-card--compact:nth-child(4) {
        grid-column: 1;
        grid-row: 3;
    }

    .featured-category-card--compact:nth-child(5) {
        grid-column: 2;
        grid-row: 3;
    }

    .featured-category-card--compact:nth-child(n+6) {
        grid-column: 1 / -1;
    }

    .featured-category-card--hero .featured-category-card__title {
        font-size: 18px;
    }

    .featured-category-card__title {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .featured-category-card__summary {
        font-size: 12px;
        line-height: 1.4;
    }

    .featured-category-card__badge {
        font-size: 10px;
        padding: 4px 8px;
        margin-bottom: 8px;
    }

    .featured-category-card__link {
        width: 32px;
        height: 32px;
    }

    .featured-category-card__content {
        max-width: 100%;
    }

    .featured-category-card:has(.featured-category-card__image) .featured-category-card__content {
        max-width: 100%;
    }

    .featured-category-card__image,
    .featured-category-card--hero .featured-category-card__image,
    .featured-category-card--compact .featured-category-card__image {
        max-width: 48%;
        max-height: calc(100% - 72px);
        bottom: 48px;
        right: 4px;
    }

    .featured-category-card--hero .featured-category-card__image {
        max-width: 72%;
        max-height: calc(100% - 80px);
    }
}

@media only screen and (max-width: 767px) {
    .featured-categories-hero {
        padding-top: 134px;
        padding-bottom: 48px;
    }

    .partners-marquee-section {
        margin-top: -24px;
    }

    .partners-marquee {
        border-radius: 0;
        padding: 24px 0;
    }
}

@media only screen and (max-width: 499px) {
    .featured-categories-hero {
        padding-top: 128px;
    }

    .hero-award__text {
        font-size: 11px;
    }

    .featured-category-card--hero {
        min-height: 260px;
    }

    .featured-category-card--hero .featured-category-card__title {
        font-size: 16px;
    }

    .featured-category-card__title {
        font-size: 14px;
    }
}
