/* ============================================================
   HOMEPAGE BLOCKS — Categories & Schools
   File: bosa_child/assets/css/homepage-blocks.css
   ============================================================ */

/* --- Block container --- */
.hp-block {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hp-block__title {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
    text-align: center;
    margin: 0 0 32px;
    line-height: 1.3;
}

/* --- Grid --- */
.hp-block__grid {
    display: grid;
    gap: 16px;
}

.hp-block__grid--2 { grid-template-columns: repeat(2, 1fr); }
.hp-block__grid--3 { grid-template-columns: repeat(3, 1fr); }
.hp-block__grid--4 { grid-template-columns: repeat(4, 1fr); }
.hp-block__grid--5 { grid-template-columns: repeat(5, 1fr); }
.hp-block__grid--6 { grid-template-columns: repeat(6, 1fr); }

/* ============================================================
   CARD — shared styles for category & school cards
   ============================================================ */
.hp-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.hp-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.1);
    border-color: transparent;
}

/* --- Icon --- */
.hp-card__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.hp-card:hover .hp-card__icon {
    transform: scale(1.1);
}

.hp-card__icon svg {
    width: 28px;
    height: 28px;
}

/* Category card icon colors */
.hp-card--category .hp-card__icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
}

/* School card icon colors */
.hp-card--school .hp-card__icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

/* --- Content --- */
.hp-card__content {
    flex: 1;
    min-width: 0;
}

.hp-card__name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 3px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-card:hover .hp-card__name {
    color: #2563eb;
}

.hp-card__count {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

/* --- Arrow --- */
.hp-card__arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    transition: all 0.25s ease;
}

.hp-card__arrow svg {
    width: 18px;
    height: 18px;
}

.hp-card:hover .hp-card__arrow {
    color: #2563eb;
    transform: translateX(3px);
}

/* ============================================================
   CATEGORY CARD — accent stripe on hover
   ============================================================ */
.hp-card--category::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #f59e0b, #d97706);
    border-radius: 14px 0 0 14px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hp-card--category:hover::before {
    opacity: 1;
}

/* ============================================================
   SCHOOL CARD — accent stripe on hover
   ============================================================ */
.hp-card--school::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
    border-radius: 14px 0 0 14px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.hp-card--school:hover::before {
    opacity: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .hp-block__grid--4,
    .hp-block__grid--5,
    .hp-block__grid--6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hp-block__title {
        font-size: 26px;
        margin-bottom: 24px;
    }

    .hp-block__grid--2,
    .hp-block__grid--3,
    .hp-block__grid--4,
    .hp-block__grid--5,
    .hp-block__grid--6 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-card {
        padding: 14px 16px;
        gap: 12px;
    }

    .hp-card__icon {
        width: 40px;
        height: 40px;
    }

    .hp-card__icon svg {
        width: 22px;
        height: 22px;
    }

    .hp-card__name {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hp-block__grid--2,
    .hp-block__grid--3,
    .hp-block__grid--4,
    .hp-block__grid--5,
    .hp-block__grid--6 {
        grid-template-columns: 1fr;
    }

    .hp-block {
        padding: 0 16px;
    }
}
