/**
 * PCOS Ferticure Clinic - Homepage Health Tools Categorized Grid
 * PF-187 Category Redesign Styles
 */

.tools-section {
    padding: 64px 0 72px;
    background: #faf4f7;
    border-top: 1px solid #ebdce4;
    border-bottom: 1px solid #ebdce4;
}

@media (min-width: 768px) {
    .tools-section {
        padding: 80px 0 96px;
    }
}

.tools-section .section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.tools-section .section-heading h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.1rem;
    line-height: 1.25;
    color: #4a1738;
    margin: 6px 0 0;
    font-weight: 700;
}

@media (min-width: 768px) {
    .tools-section .section-heading h2 {
        font-size: 2.6rem;
    }
}

.tools-section .tool-introduction {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #55444e;
    max-width: 780px;
    margin: 0 0 36px;
}

/* Category Grid */
.ht-category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .ht-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
}

@media (min-width: 1100px) {
    .ht-category-grid {
        gap: 32px;
    }
}

/* Category Card */
.ht-category-card {
    background: #ffffff;
    border: 1.5px solid #ebd8e5;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(100, 32, 57, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-sizing: border-box;
}

.ht-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(100, 32, 57, 0.10);
    border-color: #d4a9c3;
}

/* 5th Category Card Centering */
@media (min-width: 768px) {
    .ht-category-card.ht-category-card-center {
        grid-column: 1 / -1;
        max-width: 720px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Category Banner */
.ht-category-banner {
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: #fbf2f7;
    position: relative;
}

.ht-category-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.ht-category-card:hover .ht-category-banner img {
    transform: scale(1.015);
}

/* Category Body */
.ht-category-body {
    padding: 24px 22px 26px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

@media (min-width: 768px) {
    .ht-category-body {
        padding: 28px 28px 30px;
    }
}

.ht-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.ht-category-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    color: #4a1738;
    margin: 0;
    font-weight: 700;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .ht-category-title {
        font-size: 1.45rem;
    }
}

.ht-category-count {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #fbf0f6;
    border: 1px solid #ebd0e0;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #8f2f6a;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    white-space: nowrap;
}

.ht-category-intro {
    font-size: 0.94rem;
    color: #5c4a55;
    line-height: 1.55;
    margin: 0 0 20px;
}

/* Tools List */
.ht-category-tools {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1.5px solid #f3e5ee;
}

.ht-tool-item {
    padding: 13px 0;
    border-bottom: 1px solid #f6edf3;
    transition: background 0.15s;
}

.ht-tool-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ht-tool-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #6e2554;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.02rem;
    line-height: 1.35;
    transition: color 0.2s;
    min-height: 28px;
}

.ht-tool-link:hover,
.ht-tool-link:focus {
    color: #9d2f6f;
    text-decoration: underline;
}

.ht-tool-arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #9d2f6f;
    transition: transform 0.2s ease;
}

.ht-tool-link:hover .ht-tool-arrow {
    transform: translateX(4px);
}

.ht-tool-desc {
    font-size: 0.88rem;
    color: #685762;
    line-height: 1.45;
    margin: 4px 0 0;
}

/* Touch device target optimization */
@media (max-width: 640px) {
    .ht-tool-link {
        font-size: 1rem;
        min-height: 36px;
    }
    .ht-tool-item {
        padding: 14px 0;
    }
}

