/**
 * Modern Layout Grid System
 * Complete CSS for all modern layout classes used in the home page
 * Author: Claude Code
 * Date: 2025-10-26
 */

/* ============================================
   CONTAINER OVERRIDE - ENSURE PROPER WIDTH
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ============================================
   HERO SECTION - MODERN
   ============================================ */
.hero-section-modern {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-overlay-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 1;
}

.hero-background-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-content-modern {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hero-title-modern {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-subtitle-modern {
    font-size: clamp(16px, 2.5vw, 20px);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    font-weight: 400;
}

/* ============================================
   SEARCH CONTAINER - MODERN
   ============================================ */
.search-container-modern {
    max-width: 900px;
    margin: 0 auto 30px;
    width: 100%;
}

.search-form-modern {
    width: 100%;
}

.search-grid-modern {
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 12px;
    align-items: center;
}

.search-field-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    position: relative;
}

.search-field-with-border {
    border-right: 2px solid #e2e8f0;
}

.search-field-location {
    /* No border for location field */
}

.search-icon-modern {
    color: #667eea;
    font-size: 20px;
    flex-shrink: 0;
}

.search-input-modern {
    border: none;
    padding: 12px 0;
    font-size: 15px;
    color: #1e293b;
    background: transparent;
    outline: none;
    width: 100%;
    flex: 1;
}

.search-input-modern::placeholder {
    color: #94a3b8;
}

.search-input-modern:focus {
    box-shadow: none;
    outline: none;
}

.location-btn-modern {
    background: transparent;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: all 0.3s ease;
}

.location-btn-modern:hover {
    color: #764ba2;
    transform: scale(1.1);
}

.search-btn-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 600;
    padding: 16px 40px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.search-results-dropdown-modern {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.search-results-dropdown-modern li {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-results-dropdown-modern li:last-child {
    border-bottom: none;
}

.search-results-dropdown-modern li:hover {
    background: #f8fafc;
}

/* ============================================
   POPULAR TAGS - MODERN
   ============================================ */
.popular-tags-modern {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.popular-tags-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 14px;
}

.popular-icon-modern {
    color: #fbbf24;
    font-size: 16px;
}

.popular-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.popular-tag-modern {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
}

.popular-tag-modern:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-2px);
}

/* ============================================
   SECTION HEADER - MODERN
   ============================================ */
.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header-left {
    flex: 1;
    min-width: 250px;
}

.section-header-right {
    flex-shrink: 0;
}

.section-header-center {
    text-align: center;
    display: block;
}

.section-header-center .section-title-modern,
.section-header-center .section-subtitle-modern {
    margin-left: auto;
    margin-right: auto;
}

.section-title-modern {
    font-size: clamp(28px, 4vw, 36px);
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    line-height: 1.2;
}

.section-title-white {
    color: #ffffff !important;
}

.section-subtitle-modern {
    font-size: 16px;
    color: #64748b;
    line-height: 1.6;
}

.section-subtitle-white {
    color: rgba(255, 255, 255, 0.9) !important;
}

.view-all-link-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667eea;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all-link-modern:hover {
    color: #764ba2;
    transform: translateX(4px);
}

.view-all-link-modern i {
    transition: transform 0.3s ease;
}

.view-all-link-modern:hover i {
    transform: translateX(4px);
}

/* ============================================
   CATEGORIES SECTION - MODERN
   ============================================ */
.categories-section-modern {
    background: #f8fafc;
    padding: 80px 0;
}

/* THIS IS THE KEY - GRID LAYOUT FOR CATEGORIES */
.categories-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.category-card-modern {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 280px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    display: block;
}

.category-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.category-link-modern {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.category-image-wrapper {
    width: 100%;
    height: 100%;
    margin: 0;
    position: relative;
}

.category-image-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card-modern:hover .category-image-modern {
    transform: scale(1.1);
}

.category-overlay-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.85) 100%
    );
    z-index: 1;
    transition: all 0.4s ease;
}

.category-card-modern:hover .category-overlay-modern {
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.85) 0%,
        rgba(118, 75, 162, 0.85) 100%
    );
}

.category-content-modern {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 2;
}

.category-name-modern {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-bullet {
    font-size: 8px;
    color: #fbbf24;
}

.category-count-modern {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #667eea;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    z-index: 2;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.category-count-modern i {
    font-size: 12px;
}

/* ============================================
   SERVICES SECTION - MODERN
   ============================================ */
.services-section-modern {
    padding: 80px 0;
}

.services-section-light {
    background: #f8fafc;
}

.services-section-white {
    background: #ffffff;
}

.services-carousel-modern {
    margin: 0 -12px;
}

.service-card-modern {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    margin: 12px;
    height: auto;
    display: flex;
    flex-direction: column;
}

.service-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-card-header {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.service-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.service-image-wrapper {
    width: 100%;
    height: 100%;
    margin: 0;
    position: relative;
}

.service-image-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card-modern:hover .service-image-modern {
    transform: scale(1.1);
}

.service-overlay-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.2) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 1;
}

.service-meta-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 2;
}

.service-provider-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px 6px 6px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.provider-avatar-modern {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
}

.service-price-modern {
    font-weight: 700;
    font-size: 14px;
    color: #667eea;
}

.service-category-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.service-category-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.service-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-title-modern {
    margin-bottom: 12px;
}

.service-title-modern a {
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.service-title-modern a:hover {
    color: #667eea;
}

.service-rating-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.stars-modern {
    display: flex;
    gap: 2px;
}

.stars-modern i {
    font-size: 14px;
}

.star-filled {
    color: #fbbf24;
}

.star-half {
    color: #fbbf24;
}

.star-empty {
    color: #cbd5e1;
}

.rating-value-modern {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

.service-footer-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
}

.service-contact-modern,
.service-location-modern {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 13px;
}

.service-contact-modern i,
.service-location-modern i {
    color: #667eea;
    font-size: 12px;
}

/* ============================================
   BLOG SECTION - MODERN
   ============================================ */
.blog-section-modern {
    background: #f8fafc;
    padding: 80px 0;
}

.blog-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card-modern {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.blog-image-link {
    display: block;
}

.blog-image-wrapper {
    height: 220px;
    overflow: hidden;
    margin: 0;
}

.blog-image-modern {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card-modern:hover .blog-image-modern {
    transform: scale(1.1);
}

.blog-overlay-modern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.3) 100%
    );
    z-index: 1;
}

.blog-content-modern {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-title-modern {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.blog-title-modern a {
    color: #1e293b;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.blog-title-modern a:hover {
    color: #667eea;
}

.blog-meta-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.blog-date-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

.blog-date-modern i {
    color: #667eea;
}

.blog-read-more-modern {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-read-more-modern:hover {
    color: #764ba2;
}

.blog-read-more-modern i {
    transition: transform 0.3s ease;
}

.blog-read-more-modern:hover i {
    transform: translateX(4px);
}

/* ============================================
   HOW IT WORKS SECTION - MODERN
   ============================================ */
.how-it-works-section-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 80px 0;
}

.steps-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.step-card-modern {
    text-align: center;
    padding: 30px;
}

.step-icon-wrapper {
    position: relative;
    margin-bottom: 30px;
}

.step-number-modern {
    position: absolute;
    top: -15px;
    right: calc(50% - 75px);
    width: 50px;
    height: 50px;
    background: #ffffff;
    color: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.step-icon-modern {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.step-icon-modern img {
    width: 60px;
    height: 60px;
    filter: brightness(0) invert(1);
}

.step-title-modern {
    font-size: 22px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
}

.step-description-modern {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

/* ============================================
   APP DOWNLOAD SECTION - MODERN
   ============================================ */
.app-download-section-modern {
    background: #f8fafc;
    padding: 80px 0;
    text-align: center;
}

.app-download-content {
    max-width: 800px;
    margin: 0 auto;
}

.app-buttons-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.app-store-btn-modern,
.play-store-btn-modern {
    display: inline-block;
    transition: all 0.3s ease;
}

.app-store-badge,
.play-store-badge {
    height: 56px;
    width: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.app-store-btn-modern:hover .app-store-badge,
.play-store-btn-modern:hover .play-store-badge {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ============================================
   EMPTY STATE - MODERN
   ============================================ */
.empty-state-modern {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon-modern {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-message-modern {
    font-size: 18px;
    color: #64748b;
    margin: 0;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 991px) {
    .categories-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .search-grid-modern {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .search-field-with-border {
        border-right: none;
        border-bottom: 2px solid #e2e8f0;
        padding-bottom: 8px;
    }

    .search-btn-modern {
        width: 100%;
        justify-content: center;
    }

    .section-header-modern {
        flex-direction: column;
        align-items: flex-start;
    }

    .steps-grid-modern {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 767px) {
    .hero-section-modern {
        padding: 100px 0 60px;
        min-height: 500px;
    }

    .categories-grid-modern {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .category-card-modern {
        height: 240px;
    }

    .blog-grid-modern {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card-header {
        height: 200px;
    }
}

@media (max-width: 575px) {
    .search-grid-modern {
        padding: 8px;
    }

    .search-field-modern {
        padding: 4px 12px;
    }

    .search-btn-modern {
        padding: 14px 30px;
        font-size: 15px;
    }

    .category-card-modern {
        height: 200px;
    }

    .section-title-modern {
        font-size: 24px;
    }
}

/* ============================================
   LAZYLOAD SUPPORT
   ============================================ */
.lazyload,
.lazyloading {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazyloaded {
    opacity: 1;
}
