/* Optimized CSS for home.blade.php */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* Hero Section Styles */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: 900px;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    z-index: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-bg.active {
    opacity: 1;
}

.hero-bg[data-bg="1"] {
    background-image: linear-gradient(rgba(15, 23, 42, 0.5), rgba(30, 41, 59, 0.4)), 
                      url('https://images.unsplash.com/photo-1541432901042-2d8bd64b4a9b?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

.hero-bg[data-bg="2"] {
    background-image: linear-gradient(rgba(20, 30, 48, 0.5), rgba(41, 37, 88, 0.4)),
                      url('https://images.unsplash.com/photo-1524231757912-21f4fe3a7200?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

.hero-bg[data-bg="3"] {
    background-image: linear-gradient(rgba(17, 24, 39, 0.5), rgba(55, 65, 81, 0.4)),
                      url('https://images.unsplash.com/photo-1527838832700-5059252407fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.3);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: 20px;
    width: 100%;
    max-width: 100%;
}

.hero-title {
    font-size: clamp(28px, 8vw, 64px);
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0 10px;
    transition: all 1s ease-in-out;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-accent {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 1s ease-in-out;
}

.hero-subtitle {
    font-size: clamp(14px, 4vw, 20px);
    margin-bottom: 32px;
    color: #f1f5f9;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    font-weight: 300;
    padding: 0 10px;
    transition: all 1s ease-in-out;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

.hero-cta-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
    align-items: center;
    margin-bottom: 48px;
    padding: 0 20px;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: clamp(14px, 3.5vw, 16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    max-width: 280px;
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.trust-indicators {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.trust-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

.trust-stat {
    text-align: center;
    min-width: 80px;
}

.trust-number {
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
    line-height: 1;
}

.trust-stat:nth-child(1) .trust-number {
    color: #3b82f6;
}

.trust-stat:nth-child(2) .trust-number {
    color: #8b5cf6;
}

.trust-stat:nth-child(3) .trust-number {
    color: #06b6d4;
}

.trust-label {
    font-size: clamp(10px, 2.5vw, 12px);
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { 
        transform: translateX(-50%) translateY(0); 
    }
    50% { 
        transform: translateX(-50%) translateY(-8px); 
    }
}

/* Search Section Styles */
.search-section {
    width: 100%;
    background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
    padding: 24px 0 32px;
}

.search-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 16px 24px;
    margin: 0 auto;
    max-width: 100%;
}

.search-header {
    margin-bottom: 16px;
    text-align: center;
}

.search-title {
    font-size: clamp(20px, 5vw, 32px);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.search-subtitle {
    font-size: clamp(14px, 3vw, 16px);
    color: #6b7280;
}

.search-form-unified-horizontal {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.search-input-field {
    flex: 1;
    min-width: 140px;
    max-width: 200px;
    height: 44px;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input-field:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    height: 44px;
    padding: 0 24px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
}

.search-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.advanced-toggle-btn {
    height: 44px;
    padding: 0 24px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 140px;
}

.advanced-toggle-btn:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.advanced-filters {
    margin-top: 24px;
}

.advanced-filters.hidden {
    display: none;
}

.advanced-filters-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
}

.advanced-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 16px;
}

.advanced-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-group {
    margin-bottom: 16px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group-title {
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
    font-size: 14px;
}

.filter-actions {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.btn-reset {
    height: 44px;
    padding: 0 24px;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
}

.btn-reset:hover {
    background: #e5e7eb;
    color: #1f2937;
}

/* Property Cards */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 16px 0;
}

.property-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    min-height: 320px;
}

.property-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.property-image {
    height: 192px;
    background: #f3f4f6;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-content {
    padding: 16px;
}

.property-title {
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 8px;
    color: #1f2937;
}

.property-location {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 8px;
}

.property-price {
    color: #3b82f6;
    font-weight: 700;
    font-size: 16px;
}

/* Section Styles */
.section-spacing {
    padding: 32px 0 64px;
}

.section-header {
    text-center;
    margin-bottom: 24px;
}

.section-title {
    font-size: clamp(24px, 6vw, 48px);
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: clamp(14px, 4vw, 20px);
    color: #6b7280;
    max-width: 768px;
    margin: 0 auto;
}

.section-description {
    font-size: clamp(14px, 3vw, 16px);
    color: #6b7280;
    max-width: 768px;
    margin: 16px auto 0;
}

/* Trust Badges */
.trust-badges-section {
    background: #f9fafb;
    padding: 32px 0 64px;
}

.trust-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.trust-badge-card {
    text-align: center;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.trust-badge-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.trust-badge-icon {
    width: 64px;
    height: 64px;
    background: #dbeafe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 24px;
}

.trust-badge-icon .fa-shield-halved {
    color: #16a34a;
}

.trust-badge-icon .fa-user-check {
    color: #3b82f6;
}

.trust-badge-icon .fa-lock {
    color: #8b5cf6;
}

.trust-badge-icon .fa-globe {
    color: #f59e0b;
}

.trust-badge-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    font-size: clamp(14px, 3vw, 16px);
}

.trust-badge-desc {
    font-size: clamp(12px, 2.5vw, 14px);
    color: #6b7280;
    line-height: 1.5;
}

/* Services Section */
.services-section {
    width: 100%;
    padding: 32px 0 64px;
    background: white;
}

.services-grid-optimized-mobile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Hot Offers */
.hot-offers {
    background: linear-gradient(to bottom right, #fef2f2, #fef7ed);
}

.hot-offers-title {
    color: #dc2626;
}

.hot-offers-subtitle {
    color: #ea580c;
}

/* Blog Section */
.blog-section {
    width: 100%;
    background: #f9fafb;
    padding: 32px 0 64px;
}

/* Testimonials */
.testimonials-section {
    width: 100%;
    background: #f9fafb;
    padding: 32px 0 64px;
}

.testimonials-trust {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.testimonials-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stars {
    color: #fbbf24;
    margin-bottom: 8px;
    font-size: 18px;
}

.rating-text {
    font-weight: 600;
    color: #1f2937;
}

.testimonials-count {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.count-number {
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 700;
    color: #3b82f6;
    line-height: 1;
}

.count-text {
    font-size: clamp(10px, 2.5vw, 12px);
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

.testimonials-verified {
    display: flex;
    align-items: center;
    gap: 8px;
}

.testimonials-verified .fa-check-circle {
    color: #16a34a;
}

.verified-text {
    color: #1f2937;
    font-weight: 500;
}

.testimonial-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 16px 24px;
    transition: all 0.3s ease;
    height: 100%;
}

.testimonial-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
}

.testimonial-info {
    flex: 1;
}

.testimonial-name {
    font-weight: 600;
    font-size: clamp(14px, 3vw, 16px);
    color: #1f2937;
    margin-bottom: 4px;
}

.testimonial-stars {
    color: #fbbf24;
    font-size: 12px;
}

.testimonial-text {
    color: #6b7280;
    font-size: clamp(12px, 2.5vw, 14px);
    line-height: 1.5;
}

/* No Properties Fallback */
.no-properties {
    text-align: center;
    padding: 48px 0;
}

.no-properties-icon {
    width: 96px;
    height: 96px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
    color: #9ca3af;
}

.no-properties-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.no-properties-desc {
    color: #6b7280;
    margin-bottom: 24px;
}

.view-all-container {
    text-align: center;
    margin-top: 24px;
}

/* Property Card Enhanced Spacing */
.property-card-enhanced-spacing {
    height: 100%;
    padding: 0 4px;
}

.property-card-enhanced-spacing .compact-mobile {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    min-height: 320px;
}

.property-card-enhanced-spacing .compact-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Swiper Styles */
.swiper {
    width: 100%;
    padding: 20px 0;
}

.swiper-slide {
    height: auto;
}

.swiper-button-next,
.swiper-button-prev {
    color: #3b82f6;
    background: white;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    margin-top: -22px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 16px;
}

.swiper-pagination-bullet {
    background: #3b82f6;
    opacity: 0.3;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

.mobile-hidden {
    display: none;
}

/* Responsive Design */
@media (min-width: 640px) {
    .search-form-unified-horizontal {
        gap: 16px;
    }
    
    .search-input-field {
        min-width: 160px;
        max-width: 180px;
    }
    
    .services-grid-optimized-mobile {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .property-card-enhanced-spacing {
        padding: 0 8px;
    }
    
    .property-card-enhanced-spacing .compact-mobile {
        min-height: 380px;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
    
    .mobile-hidden {
        display: block;
    }
}

@media (min-width: 768px) {
    .hero-cta-container {
        flex-direction: row;
        max-width: 600px;
        margin: 0 auto 48px;
    }
    
    .search-container {
        padding: 24px 32px;
    }
    
    .section-spacing {
        padding: 64px 0 128px;
    }
    
    .services-grid-optimized-mobile {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .trust-badges-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }
    
    .testimonials-trust {
        gap: 48px;
    }
    
    .testimonial-avatar {
        width: 48px;
        height: 48px;
        margin-right: 16px;
    }
}

@media (min-width: 1024px) {
    .services-grid-optimized-mobile {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 24px;
    }
    
    .properties-grid {
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .search-input-field {
        min-width: 120px;
        max-width: 160px;
        height: 42px;
        font-size: 12px;
    }
    
    .search-btn {
        height: 42px;
        padding: 0 16px;
        font-size: 12px;
        min-width: 80px;
    }
    
    .advanced-toggle-btn {
        height: 42px;
        padding: 0 16px;
        font-size: 12px;
        min-width: 120px;
    }
    
    .search-form-unified-horizontal {
        gap: 8px;
        justify-content: center;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}


@media (max-width: 640px) {
    .clear-filters-btn {
        min-width: 90px !important;
        max-width: 90px !important;
        padding: 10px 12px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
    }
    
    .clear-filters-btn .material-icons {
        font-size: 16px !important;
        margin-right: 4px !important;
    }
    
    .clear-filters-btn span:not(.material-icons) {
        display: inline !important;
        font-size: 13px !important;
    }
}




/* Fix Home Type Dropdown Overflow & Scrolling */
.home-type-dropdown {
    max-height: 600px !important;
    overflow-y: auto !important;
}

.home-type-dropdown .mb-4 {
    max-height: none !important;
}

.home-type-dropdown .overflow-y-auto {
    max-height: 300px !important;
    overflow-y: auto !important;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
}

/* Ensure items don't overflow */
.type-checkbox-item {
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.type-checkbox-item:hover {
    background-color: #f3f4f6;
}

/* Mobile specific fixes */
@media (max-width: 768px) {
    .home-type-dropdown {
        max-height: 80vh !important;
        padding-bottom: 60px; /* Space for Apply button */
    }
}
