/* Page-specific styles – fully compatible with existing theme */
.bar-category-section {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.category-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(1, 16, 30, 0.08);
    transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    height: 100%;
    border: 1px solid rgba(4, 143, 208, 0.1);
    position: relative;
}

.category-card:hover {
    transform: translateY(-14px);
    box-shadow: 0 28px 55px rgba(4, 143, 208, 0.18);
}

.category-img-box {
    height: 240px;
    position: relative;
    overflow: hidden;
}

.category-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.category-card:hover .category-img-box img {
    transform: scale(1.12);
}

.category-img-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(1, 16, 30, 0.92) 0%, rgba(1, 16, 30, 0.62) 42%, rgba(1, 16, 30, 0.08) 100%);
    z-index: 1;
}

.category-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 22px 26px;
    z-index: 2;
    color: #fff !important;
}

.category-title-overlay h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 4px;
    letter-spacing: 0.3px;
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

.category-title-overlay span {
    font-size: 13px;
    opacity: 1;
    font-weight: 400;
    color: #f1f5f9 !important;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
}

.category-body {
    padding: 26px 26px 30px;
}

.grade-list {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
}

.grade-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    margin-bottom: 8px;
    border-radius: 10px;
    font-size: 15px;
    color: #2d3748;
    background: #f8fafc;
    border: 1px solid transparent;
    transition: all 0.35s ease;
    cursor: default;
}

.grade-list a {
    display: flex;
    flex: 1;
    color: inherit;
    text-decoration: none;
}

.grade-list a:hover {
    color: inherit;
}

.grade-list a:focus-visible {
    outline: 2px solid #048FD0;
    outline-offset: 3px;
    border-radius: 2px;
}

.grade-list li.clickable-grade:hover {
    background: linear-gradient(90deg, #e0f2fe, #f0f9ff);
    border-color: rgba(4, 143, 208, 0.25);
    color: #048FD0;
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(4, 143, 208, 0.1);
}

.grade-list li i {
    color: #048FD0;
    font-size: 13px;
    transition: transform 0.3s ease;
    min-width: 16px;
}

.grade-list li.clickable-grade:hover i {
    transform: translateX(4px);
}

.category-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #048FD0, #0369a1);
    color: #fff !important;
    padding: 12px 26px;
    border-radius: 30px;
    font-size: 14.5px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.4s ease;
    box-shadow: 0 6px 18px rgba(4, 143, 208, 0.28);
}

.category-btn:hover {
    background: linear-gradient(90deg, #0369a1, #025a8a);
    transform: translateX(5px);
    box-shadow: 0 8px 24px rgba(4, 143, 208, 0.4);
    color: #fff !important;
}

.category-btn i {
    transition: transform 0.3s ease;
}

.category-btn:hover i {
    transform: translateX(5px);
}

/* Accent bar on top of card */
.category-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #048FD0, #0ea5e9, #38bdf8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
    z-index: 3;
}

.category-card:hover::before {
    transform: scaleX(1);
}

/* Section title spacing */
.section-title {
    margin-bottom: 50px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .category-img-box {
        height: 210px;
    }
    .category-title-overlay h3 {
        font-size: 21px;
    }
}

@media (max-width: 767px) {
    .bar-category-section {
        padding: 60px 0 40px;
    }
    .category-img-box {
        height: 200px;
    }
    .category-body {
        padding: 20px 18px 24px;
    }
    .grade-list li {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Subtle entrance animation helper */
.wow {
    visibility: hidden;
}
