/* static/pages/explore/explore.css */
/* Explore page styles using Bootstrap 5.3 CSS variables */

/* ============================================================================
   EXPLORE HERO
   ============================================================================ */

.explore-hero {
    position: relative;
    overflow: hidden;
}

.explore-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.05) 0%, rgba(var(--bs-info-rgb), 0.05) 100%);
    pointer-events: none;
}

/* ============================================================================
   CATEGORY CARDS
   ============================================================================ */

.category-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.category-card .card-img-top {
    transition: transform 0.3s ease;
}

.category-card:hover .card-img-top {
    transform: scale(1.05);
}

.category-card-image {
    overflow: hidden;
}

/* Mini category cards for subcategories */
.category-card-mini {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card-mini:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--bs-primary) !important;
}

/* ============================================================================
   EXPLORE CATEGORY HERO (Home Page - Apple-like 2-column layout)
   ============================================================================ */

.explore-category-hero {
    display: block;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 60vh;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.explore-category-hero:hover {
    filter: brightness(1.05);
}

.explore-category-hero:hover .btn-light {
    background-color: var(--bs-primary);
    color: white;
    border-color: var(--bs-primary);
    transform: scale(1.05);
}

.explore-category-hero .btn-light {
    transition: all 0.3s ease;
}

.explore-category-hero-content {
    height: 60vh;
    min-height: 400px;
}

.explore-category-hero-overlay {
    transition: opacity 0.3s ease;
}

/* Mobile: Stack vertically */
@media (max-width: 991.98px) {
    .explore-category-hero,
    .explore-category-hero-content {
        height: 50vh;
        min-height: 350px;
    }
}

/* ============================================================================
   EXPLORE ICON CIRCLES
   ============================================================================ */

.explore-icon-lg {
    width: 80px;
    height: 80px;
}

.explore-icon-md {
    width: 60px;
    height: 60px;
}

.explore-icon-sm {
    width: 48px;
    height: 48px;
}

/* ============================================================================
   CATEGORY DETAIL HERO (Detail Page - Apple-like)
   ============================================================================ */

.category-detail-hero {
    position: relative;
    min-height: 350px;
}

.category-detail-hero-content {
    min-height: 350px;
}

/* Tablet: Slightly smaller */
@media (max-width: 991.98px) {
    .category-detail-hero,
    .category-detail-hero-content {
        min-height: 300px;
    }
}

/* Phone: Compact hero */
@media (max-width: 576px) {
    .category-detail-hero,
    .category-detail-hero-content {
        min-height: 220px;
    }

    .category-detail-hero h1 {
        font-size: 1.75rem;
    }

    .category-detail-hero .lead {
        font-size: 0.95rem;
    }

    .category-detail-hero .explore-icon-lg {
        width: 56px;
        height: 56px;
    }

    .category-detail-hero .explore-icon-lg i {
        font-size: 1.25rem;
    }
}

/* Legacy class for backward compatibility */
.category-hero {
    position: relative;
}

.category-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), 0.03) 0%, transparent 100%);
    pointer-events: none;
}

/* ============================================================================
   BREADCRUMBS
   ============================================================================ */

.breadcrumb {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.breadcrumb::-webkit-scrollbar {
    display: none;
}

.breadcrumb-item {
    white-space: nowrap;
}

/* Truncate long breadcrumb items on mobile */
@media (max-width: 576px) {
    .breadcrumb-item {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* ============================================================================
   PAGE SECTIONS
   ============================================================================ */

.page-section {
    padding: 3rem 0;
}

@media (max-width: 768px) {
    .page-section {
        padding: 2rem 0;
    }
}

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

@media (max-width: 576px) {
    .explore-hero h1 {
        font-size: 2rem;
    }
    
    .category-hero h1 {
        font-size: 1.75rem;
    }
    
    .category-card .card-body {
        padding: 1rem;
    }
    
    .category-card-mini .card-body {
        padding: 0.75rem;
    }
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.empty-state-icon {
    opacity: 0.5;
}

/* ============================================================================
   TOPIC CHIPS
   ============================================================================ */

.btn-outline-secondary.rounded-pill:hover {
    background-color: var(--bs-secondary-bg);
}

/* ============================================================================
   ARTICLE CARDS GRID
   ============================================================================ */

.row-cols-1 > .col,
.row-cols-md-2 > .col,
.row-cols-lg-3 > .col {
    display: flex;
}

.row-cols-1 > .col > .card,
.row-cols-md-2 > .col > .card,
.row-cols-lg-3 > .col > .card {
    width: 100%;
}
