/* ============================================
   MODERN CATEGORY CARDS - Bootstrap 3.3
   Premium Design with Glassmorphism Effect
   ============================================ */

/* Helper Classes */
.mb-30 {
    margin-bottom: 30px;
}

/* ========================================
   Modern Category Card
   ======================================== */
.modern-category-card {
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.6);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    -webkit-box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.modern-category-card:hover {
    -webkit-box-shadow: 0 22px 56px rgba(0, 0, 0, 0.12);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.12);
    -webkit-transform: translateY(-4px);
    -ms-transform: translateY(-4px);
    transform: translateY(-4px);
}

/* ========================================
   Image Section
   ======================================== */
.category-image-wrapper {
    position: relative;
    height: 240px;
    width: 100%;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
}

.category-image {
    position: absolute;
    height: 100%;
    width: 100%;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    -o-object-fit: cover;
    object-fit: cover;
    border-radius: 20px 20px 0 0;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: -webkit-transform 0.3s ease;
    -o-transition: transform 0.3s ease;
    transition: transform 0.3s ease;
    transition: transform 0.3s ease, -webkit-transform 0.3s ease;
}

.modern-category-card:hover .category-image {
    -webkit-transform: scale(1.02);
    -ms-transform: scale(1.02);
    transform: scale(1.02);
}

/* ========================================
   Content Section
   ======================================== */
.category-content-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    height: auto;
    padding: 28px 24px 32px;
    background: rgba(255, 255, 255, 0.85);
    text-align: center;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.category-title {
    font-size: 28px;
    line-height: 1.3;
    color: #14b8a6;
    font-weight: 600;
    margin: 0 0 12px 0;
}

.category-description {
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.6;
    color: #52525b;
    margin-bottom: 0;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

/* ========================================
   Button Section
   ======================================== */
.category-button-wrapper {
    margin-top: auto;
    padding-top: 24px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
}

.btn-category-modern {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid #14b8a6;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #14b8a6;
    background: transparent;
    -webkit-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-category-modern:hover,
.btn-category-modern:focus {
    background: #14b8a6;
    color: #ffffff;
    text-decoration: none;
    outline: none;
}

.btn-category-modern:focus {
    -webkit-box-shadow: 0 0 0 2px #14b8a6;
    box-shadow: 0 0 0 2px #14b8a6;
}

.btn-arrow {
    margin-left: 8px;
    height: 20px;
    width: 20px;
    stroke: currentColor;
    fill: none;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (min-width: 768px) and (max-width: 991px) {
    .category-image-wrapper {
        height: 220px;
    }
    
    .category-title {
        font-size: 24px;
    }
    
    .category-description {
        font-size: 15px;
    }
}

@media (max-width: 767px) {
    .category-image-wrapper {
        height: 200px;
    }
    
    .category-title {
        font-size: 22px;
    }
    
    .category-description {
        font-size: 15px;
    }
    
    .category-content-wrapper {
        padding: 24px 20px 28px;
    }
    
    .btn-category-modern {
        font-size: 15px;
        padding: 10px 20px;
    }
}

@media (max-width: 480px) {
    .modern-category-card {
        border-radius: 16px;
    }
    
    .category-image-wrapper {
        height: 180px;
        border-radius: 16px 16px 0 0;
    }
    
    .category-image {
        border-radius: 16px 16px 0 0;
    }
    
    .category-title {
        font-size: 20px;
    }
    
    .category-description {
        font-size: 14px;
        line-height: 1.5;
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        -webkit-transform: translateY(30px);
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        -webkit-transform: translateY(0);
        transform: translateY(0);
    }
}

.modern-category-card {
    -webkit-animation: fadeInUp 0.6s ease-out;
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation */
.modern-category-cards .col-md-4:nth-child(1) .modern-category-card,
.modern-category-cards .col-md-3:nth-child(1) .modern-category-card,
.modern-category-cards .col-md-6:nth-child(1) .modern-category-card {
    -webkit-animation-delay: 0.1s;
    animation-delay: 0.1s;
}

.modern-category-cards .col-md-4:nth-child(2) .modern-category-card,
.modern-category-cards .col-md-3:nth-child(2) .modern-category-card,
.modern-category-cards .col-md-6:nth-child(2) .modern-category-card {
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
}

.modern-category-cards .col-md-4:nth-child(3) .modern-category-card,
.modern-category-cards .col-md-3:nth-child(3) .modern-category-card {
    -webkit-animation-delay: 0.3s;
    animation-delay: 0.3s;
}

.modern-category-cards .col-md-4:nth-child(4) .modern-category-card,
.modern-category-cards .col-md-3:nth-child(4) .modern-category-card {
    -webkit-animation-delay: 0.4s;
    animation-delay: 0.4s;
}

.modern-category-cards .col-md-4:nth-child(5) .modern-category-card,
.modern-category-cards .col-md-3:nth-child(5) .modern-category-card {
    -webkit-animation-delay: 0.5s;
    animation-delay: 0.5s;
}

.modern-category-cards .col-md-4:nth-child(6) .modern-category-card,
.modern-category-cards .col-md-3:nth-child(6) .modern-category-card {
    -webkit-animation-delay: 0.6s;
    animation-delay: 0.6s;
}

/* ========================================
   Color Variants (Optional)
   ======================================== */
.btn-category-modern.btn-teal {
    border-color: #14b8a6;
    color: #14b8a6;
}

.btn-category-modern.btn-teal:hover {
    background: #14b8a6;
    color: #ffffff;
}

.btn-category-modern.btn-blue {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-category-modern.btn-blue:hover {
    background: #3b82f6;
    color: #ffffff;
}

.btn-category-modern.btn-purple {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.btn-category-modern.btn-purple:hover {
    background: #8b5cf6;
    color: #ffffff;
}

/* ========================================
   IE9+ Fallbacks
   ======================================== */
.no-flexbox .modern-category-card {
    display: block;
}

.no-flexbox .category-content-wrapper {
    display: block;
}

.no-flexbox .category-button-wrapper {
    display: block;
    text-align: center;
}

.no-backdrop-filter .modern-category-card {
    background: rgba(255, 255, 255, 0.95);
}

.no-backdrop-filter .category-content-wrapper {
    background: rgba(255, 255, 255, 0.98);
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .modern-category-card {
        -webkit-box-shadow: none;
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}
