/* Homepage categories, adapted from the approved light SurinNet prototype.
   Scope is the category widget only; all URLs come from the live menu model. */

html.html-home-page .surin-category-section {
    box-sizing: border-box;
    height: auto;
    margin: 0;
    padding: 55px 28px 70px;
    background: #fff;
    color: #0f2438;
    direction: rtl;
}

html.html-home-page .surin-category-section *,
html.html-home-page .surin-category-section *::before,
html.html-home-page .surin-category-section *::after {
    box-sizing: border-box;
}

html.html-home-page .surin-category-container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

html.html-home-page .surin-category-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 27px;
}

html.html-home-page .surin-category-kicker {
    margin: 0 0 6px;
    color: #e01843;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

html.html-home-page .surin-category-heading h2 {
    margin: 0;
    color: #0f2438;
    font-size: clamp(25px, 2.5vw, 33px);
    font-weight: 800;
    line-height: 1.5;
}

html.html-home-page .surin-category-description {
    margin: 6px 0 0;
    color: #52697b;
    font-size: 14px;
    line-height: 1.8;
}

html.html-home-page .surin-category-all {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    color: #e01843;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

html.html-home-page .surin-category-all:hover,
html.html-home-page .surin-category-all:focus-visible {
    color: #b5102f;
}

html.html-home-page .surin-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: 12px;
}

html.html-home-page .surin-category-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e2eaf0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 36, 56, .05);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

html.html-home-page .surin-category-card:hover,
html.html-home-page .surin-category-card:focus-within {
    border-color: #f6ccd6;
    box-shadow: 0 6px 18px rgba(15, 36, 56, .08);
    transform: translateY(-2px);
}

html.html-home-page .surin-category-card--service {
    grid-column: span 2;
    border-color: #f6ccd6;
    background: linear-gradient(120deg, #fff1f4, #fff 70%);
}

html.html-home-page .surin-category-main {
    display: grid;
    min-height: 93px;
    grid-template-columns: 56px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    color: #0f2438;
    text-decoration: none;
}

html.html-home-page .surin-category-main:hover {
    color: #0f2438;
    text-decoration: none;
}

html.html-home-page .surin-category-main img {
    display: block;
    width: 56px;
    height: 56px;
    padding: 4px;
    border-radius: 12px;
    background: #f6f9fb;
    object-fit: contain;
}

html.html-home-page .surin-category-copy {
    min-width: 0;
}

html.html-home-page .surin-category-copy strong,
html.html-home-page .surin-category-copy small {
    display: block;
}

html.html-home-page .surin-category-copy strong {
    color: #0f2438;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.55;
}

html.html-home-page .surin-category-copy small {
    overflow: hidden;
    margin-top: 3px;
    color: #52697b;
    font-size: 12px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html.html-home-page .surin-category-arrow {
    color: #e01843;
    font-size: 19px;
    line-height: 1;
}

html.html-home-page .surin-category-more {
    border-top: 1px solid #eef3f6;
    color: #52697b;
    font-size: 12px;
}

html.html-home-page .surin-category-more summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 31px;
    padding: 4px 15px;
    cursor: pointer;
    list-style: none;
}

html.html-home-page .surin-category-more summary::-webkit-details-marker {
    display: none;
}

html.html-home-page .surin-category-more summary::after {
    content: "+";
    color: #e01843;
    font-size: 17px;
    line-height: 1;
}

html.html-home-page .surin-category-more[open] summary::after {
    content: "−";
}

html.html-home-page .surin-category-more ul {
    max-height: 230px;
    margin: 0;
    padding: 7px 27px 12px 10px;
    overflow: auto;
    list-style: none;
}

html.html-home-page .surin-category-more ul ul {
    max-height: none;
    padding: 4px 12px 4px 0;
    overflow: visible;
}

html.html-home-page .surin-category-more li + li {
    margin-top: 5px;
}

html.html-home-page .surin-category-more a {
    color: #24425c;
    font-size: 12px;
    line-height: 1.7;
    text-decoration: none;
}

html.html-home-page .surin-category-more a:hover {
    color: #b5102f;
    text-decoration: underline;
}

html.html-home-page .surin-category-section a:focus-visible,
html.html-home-page .surin-category-section summary:focus-visible {
    outline: 3px solid #0b74c4;
    outline-offset: 2px;
}

@media (max-width: 991px) {
    html.html-home-page .surin-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    html.html-home-page .surin-category-section {
        padding: 36px 15px 52px;
    }

    html.html-home-page .surin-category-heading {
        display: block;
        margin-bottom: 22px;
    }

    html.html-home-page .surin-category-heading h2 {
        font-size: 26px;
    }

    html.html-home-page .surin-category-description {
        font-size: 13px;
    }

    html.html-home-page .surin-category-all {
        margin-top: 8px;
    }

    html.html-home-page .surin-category-grid {
        gap: 10px;
    }

    html.html-home-page .surin-category-main {
        min-height: 132px;
        grid-template-columns: minmax(0, 1fr) 18px;
        grid-template-rows: 46px auto;
        align-items: start;
        gap: 8px;
        padding: 13px;
    }

    html.html-home-page .surin-category-main img {
        width: 44px;
        height: 44px;
        grid-column: 1;
        grid-row: 1;
    }

    html.html-home-page .surin-category-arrow {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    html.html-home-page .surin-category-copy {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    html.html-home-page .surin-category-copy strong {
        font-size: 14px;
    }

    html.html-home-page .surin-category-copy small {
        white-space: normal;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        min-height: 37px;
    }

    html.html-home-page .surin-category-more summary {
        padding-inline: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.html-home-page .surin-category-card {
        transition: none;
    }
}
