/* =========================
   TYPE COLOR VARIABLES
   ========================= */

.heras-categories-grid.heras-type-life_science {
    --heras-accent-color: #CF1114;
}

.heras-categories-grid.heras-type-pharma {
    --heras-accent-color: #00A161;
}

.heras-categories-grid.heras-type-health_care {
    --heras-accent-color: #03A8DC;
}

/* =========================
   CATEGORIES GRID
   ========================= */

.heras-categories-grid {
    display: grid;
    gap: 32px;
}

.heras-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.heras-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.heras-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }

/* =========================
   CARD
   ========================= */

.heras-category-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 1px solid #eee;
}

.heras-category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

/* =========================
   IMAGE
   ========================= */

.heras-category-card-image {
    height: 200px;
    background: #FFFFFF;
    overflow: hidden;
}

.heras-category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* =========================
   CONTENT
   ========================= */

.heras-category-card-content {
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title */
.heras-category-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111;
    margin-bottom: 14px;
    line-height: 1.3;
}

/* Points */
.heras-category-card-points {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
}

.heras-category-card-points li {
    position: relative;
    padding-left: 18px;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #444;
    margin-bottom: 8px;
}

.heras-category-card-points li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--heras-accent-color);
    font-weight: 700;
}

/* =========================
   ACTION (CTA)
   ========================= */

.heras-category-card::after {
    display: block;
    margin: auto 22px 22px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--heras-accent-color);
    transition: transform 0.25s ease;
}

.heras-category-card.text-category::after {
    content: "Ver categoría →";
}

.heras-category-card.text-product::after {
    content: "Ver productos →";
}

.heras-category-card:hover::after {
    transform: translateX(4px);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1200px) {
    .heras-grid-cols-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .heras-categories-grid {
        margin-top: 30px !important;
        display: grid;
        grid-template-columns: none !important;
        grid-auto-flow: column;
        grid-auto-columns: minmax(260px, 80%);
        gap: 20px;

        overflow-x: auto;
        overflow-y: hidden;

        padding: 0 16px 10px;
        scroll-padding-left: 16px;

        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;

        align-items: start;
    }

    .heras-category-card {
        height: auto !important;
        align-self: start;
        scroll-snap-align: start;
    }

    .heras-category-card:first-child {
        scroll-margin-left: 16px;
    }
}

@media (max-width: 576px) {
    .heras-categories-grid {
        grid-auto-columns: 85%;
        padding: 0 14px 10px;
        scroll-padding-left: 14px;
    }

    .heras-category-card:first-child {
        scroll-margin-left: 14px;
    }
}

/* =========================
   FORCE ACCENT COLOR ON CARD LINKS
   ========================= */

/* Base link color */
.heras-categories-grid.heras-type-life_science .heras-category-card,
.heras-categories-grid.heras-type-pharma .heras-category-card,
.heras-categories-grid.heras-type-health_care .heras-category-card {
    color: var(--heras-accent-color);
}

/* Hover / focus / visited */
.heras-categories-grid.heras-type-life_science .heras-category-card:hover,
.heras-categories-grid.heras-type-life_science .heras-category-card:focus,
.heras-categories-grid.heras-type-life_science .heras-category-card:visited,

.heras-categories-grid.heras-type-pharma .heras-category-card:hover,
.heras-categories-grid.heras-type-pharma .heras-category-card:focus,
.heras-categories-grid.heras-type-pharma .heras-category-card:visited,

.heras-categories-grid.heras-type-health_care .heras-category-card:hover,
.heras-categories-grid.heras-type-health_care .heras-category-card:focus,
.heras-categories-grid.heras-type-health_care .heras-category-card:visited {
    color: var(--heras-accent-color);
}

/* =========================
   BRANDS GRID – PROFESSIONAL
   ========================= */

.heras-brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

/* Brand card */
.heras-brand-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e6e6e6;
    padding: 28px;
    text-decoration: none;
    transition:
            transform 0.25s ease,
            box-shadow 0.25s ease,
            border-color 0.25s ease;
}

/* Subtle hover (corporate) */
.heras-brand-item:hover {
    transform: translateY(-6px);
    border-color: #d0d0d0;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* Logo */
.heras-brand-item img {
    max-width: 75%;
    max-height: 55%;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.85;
    transition:
            filter 0.25s ease,
            opacity 0.25s ease,
            transform 0.25s ease;
}

/* Logo hover effect */
.heras-brand-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.04);
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 1200px) {
    .heras-brands-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .heras-brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .heras-brand-item {
        padding: 22px;
    }

    .heras-brand-item img {
        max-width: 80%;
        max-height: 60%;
    }
}
