/**
 * WBF Related Categories - Frontend CSS
 *
 * @author    WBF
 * @copyright 2026 WBF
 * @license   MIT
 */

/* =========================================
   Container
   ========================================= */
.wbf-related-categories {
    margin: 40px 0;
    padding: 0 15px;
}

.wbf-rc-container {
    max-width: 1600px;
    margin: 0 auto;
}

.wbf-rc-title {
text-align: center;
  font-weight: 600;
  margin: 0 0 30px 0;
  margin-bottom: 30px;
  color: #000;
  position: relative;
  padding-bottom: 15px;
  font-size: 2.2rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  text-transform: uppercase !important;
}

.wbf-rc-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    border-radius: 2px;
}

.wbf-rc-header {
    margin-bottom: 30px;
    text-align: center;
}

.wbf-rc-header .wbf-rc-title {
    margin-bottom: 8px;
}

.wbf-rc-subtitle {
    max-width: 720px;
    margin: 0 auto;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* =========================================
   Grid Layout
   ========================================= */
.wbf-rc-grid {
    display: grid;
    gap: 20px;
}

.wbf-rc-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.wbf-rc-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.wbf-rc-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.wbf-rc-cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.wbf-rc-cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Responsive breakpoints */
@media (max-width: 1199px) {
    .wbf-rc-cols-5,
    .wbf-rc-cols-6 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .wbf-rc-cols-4,
    .wbf-rc-cols-5,
    .wbf-rc-cols-6 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .wbf-rc-cols-3,
    .wbf-rc-cols-4,
    .wbf-rc-cols-5,
    .wbf-rc-cols-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wbf-rc-title {
        font-size: 20px;
    }
}

@media (max-width: 479px) {
    .wbf-rc-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   Category Card
   ========================================= */
.wbf-rc-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wbf-rc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.wbf-rc-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* =========================================
   Card Image
   ========================================= */
.wbf-rc-card-image {
    position: relative;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: #f5f5f5;
}

.wbf-rc-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.wbf-rc-card:hover .wbf-rc-card-image img {
    transform: scale(1.05);
}

.wbf-rc-no-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.wbf-rc-no-image .material-icons {
    font-size: 48px;
    color: rgba(255,255,255,0.6);
}

/* =========================================
   Card Content
   ========================================= */
.wbf-rc-card-content {
    flex: 1;
    padding: 15px;
}

.wbf-rc-card-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.wbf-rc-card-description {
    margin: 0;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
}

/* =========================================
   Card Footer / Button
   ========================================= */
.wbf-rc-card-footer {
    padding: 0 15px 15px;
}

.wbf-rc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.wbf-rc-btn .material-icons {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.wbf-rc-card:hover .wbf-rc-btn {
    opacity: 0.9;
}

.wbf-rc-card:hover .wbf-rc-btn .material-icons {
    transform: translateX(3px);
}

/* =========================================
   Theme Compatibility - Akira
   ========================================= */
.theme-akira .wbf-related-categories {
    /* Akira-specific adjustments */
}

/* =========================================
   Theme Compatibility - Hummingbird
   ========================================= */
.theme-hummingbird .wbf-related-categories {
    /* Hummingbird-specific adjustments */
}

/* =========================================
   Animation
   ========================================= */
@keyframes wbf-rc-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wbf-rc-card {
    animation: wbf-rc-fadeInUp 0.5s ease forwards;
}

.wbf-rc-card:nth-child(1) { animation-delay: 0.1s; }
.wbf-rc-card:nth-child(2) { animation-delay: 0.15s; }
.wbf-rc-card:nth-child(3) { animation-delay: 0.2s; }
.wbf-rc-card:nth-child(4) { animation-delay: 0.25s; }
.wbf-rc-card:nth-child(5) { animation-delay: 0.3s; }
.wbf-rc-card:nth-child(6) { animation-delay: 0.35s; }
