/* Custom CSS Overrides */

/* ===========================================
   CATEGORY CARDS - Simple Grid 4-2-1
   =========================================== */
.categories-area {
    background: #f8f9fa;
}

.category-card {
    display: block;
    padding: 30px 24px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    height: 100%;
    min-height: 160px;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: var(--tg-theme-primary, #0070f3);
    border-color: var(--tg-theme-primary, #0070f3);
}

.category-icon {
    width: 50px;
    height: 50px;
    background: #f0f2f5;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.category-icon i {
    font-size: 24px;
    color: var(--tg-theme-primary, #0070f3);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: rgba(255, 255, 255, 0.2);
}

.category-card:hover .category-icon i {
    color: #fff;
}

.category-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #212529;
    transition: all 0.3s ease;
}

.category-card:hover .category-title {
    color: #fff;
}

.category-count {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
    transition: all 0.3s ease;
}

.category-card:hover .category-count {
    color: rgba(255, 255, 255, 0.85);
}

/* Responsive: 4-2-1 Grid
   - Desktop (≥1200px): 4 columns (col-xl-3)
   - Tablet (768-1199px): 2 columns (col-md-6)
   - Mobile (<768px): 1 column (col-12)
*/

@media (max-width: 991px) {
    .category-card {
        padding: 24px 20px;
        min-height: 140px;
    }
    
    .category-icon {
        width: 46px;
        height: 46px;
    }
    
    .category-icon i {
        font-size: 22px;
    }
    
    .category-title {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .category-card {
        padding: 20px 18px;
        min-height: 130px;
    }
    
    .category-icon {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
    }
    
    .category-icon i {
        font-size: 20px;
    }
    
    .category-title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .category-count {
        font-size: 13px;
    }
}

/* Dark Mode Support */
.dark-mode .categories-area {
    background: #1a1d23;
}

.dark-mode .category-card {
    background: #2d3138;
    border-color: #3a3f47;
}

.dark-mode .category-icon {
    background: #3a3f47;
}

.dark-mode .category-title {
    color: #f8f9fa;
}

.dark-mode .category-count {
    color: #adb5bd;
}

.dark-mode .category-card:hover {
    background: var(--tg-theme-primary, #0070f3);
    border-color: var(--tg-theme-primary, #0070f3);
}

.dark-mode .category-card:hover .category-icon {
    background: rgba(255, 255, 255, 0.2);
}

/* ===========================================
   CONTACT MAP - Google Maps Embed
   =========================================== */
.contact-map {
    position: relative;
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

@media (max-width: 991px) {
    .contact-map {
        height: 400px;
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    .contact-map {
        height: 350px;
        border-radius: 8px;
    }
}

/* Featured Post Area - Uniform Image Size */
.featured-post-thumb {
    border-radius: 6px;
    overflow: hidden;
    height: 350px !important;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    position: relative;
}

.featured-post-thumb img {
    height: 350px !important;
    width: 100% !important;
    object-fit: contain !important;
    object-position: center;
}

/* Keep hover effect smooth */
.featured-post-item:hover .featured-post-thumb img {
    transform: scale(1.05);
}

/* Responsive adjustments - Uniform heights */
@media (max-width: 1199px) {
    .featured-post-thumb {
        height: 300px !important;
    }
    
    .featured-post-thumb img {
        height: 300px !important;
    }
}

@media (max-width: 991px) {
    .featured-post-thumb {
        height: 280px !important;
    }
    
    .featured-post-thumb img {
        height: 280px !important;
    }
}

@media (max-width: 767px) {
    .featured-post-thumb {
        height: 250px !important;
    }
    
    .featured-post-thumb img {
        height: 250px !important;
    }
}

@media (max-width: 575px) {
    .featured-post-thumb {
        height: 220px !important;
    }
    
    .featured-post-thumb img {
        height: 220px !important;
    }
}
