/**
 * Main Homepage Styles - All Cities Landing Page
 */

/* ================================
   VARIABLES
   ================================ */
:root {
    --mh-primary: #2563eb;
    --mh-primary-dark: #1d4ed8;
    --mh-secondary: #64748b;
    --mh-success: #22c55e;
    --mh-warning: #f59e0b;
    --mh-info: #06b6d4;
    --mh-dark: #1e293b;
    --mh-light: #f8fafc;
    --mh-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --mh-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --mh-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ================================
   GLOBAL OVERRIDES
   ================================ */
.main-home-page {
    font-family: 'Poppins', sans-serif;
}

.main-home-page .btn-primary {
    background: var(--mh-primary);
    border-color: var(--mh-primary);
}

.main-home-page .btn-primary:hover {
    background: var(--mh-primary-dark);
    border-color: var(--mh-primary-dark);
}

.main-home-page .btn-outline-primary {
    color: var(--mh-primary);
    border-color: var(--mh-primary);
}

.main-home-page .btn-outline-primary:hover {
    background: var(--mh-primary);
    border-color: var(--mh-primary);
    color: white;
}

.main-home-page .text-primary {
    color: var(--mh-primary) !important;
}

.main-home-page .bg-primary {
    background: var(--mh-primary) !important;
}

/* ================================
   LANGUAGE BAR
   ================================ */
.language-bar {
    font-size: 0.85rem;
    background: #1e293b;
}

.top-header-links a {
    text-decoration: none;
    transition: color 0.2s ease;
}

.top-header-links a:hover {
    color: white !important;
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.language-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.language-link:hover,
.language-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

/* ================================
   HEADER & HERO
   ================================ */
.main-home-header {
    background: #1e293b;
    min-height: auto;
    position: relative;
    overflow: visible;
    z-index: 1050;
}

.main-home-header::before {
    display: none;
}


.main-home-header .navbar {
    position: relative;
    z-index: 1051;
}

/* Logo Styling */
.logo-box {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.logo-box i {
    font-size: 1.5rem;
    color: white;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-weight: 700;
    font-size: 1.3rem;
    color: white;
    letter-spacing: -0.5px;
}

.logo-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
}

.logo-immobilier {
    height: 22px !important;
    width: auto !important;
    max-width: 150px !important;
    vertical-align: middle;
    object-fit: contain;
}

.main-home-header .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
}

.main-home-header .nav-link:hover,
.main-home-header .nav-link.active {
    color: white;
}

/* Hero Panorama - full width image with text */
.hero-panorama {
    width: 100%;
    height: 350px;
    background-image: url('../images/hero-panorama.avif');
    background-size: cover;
    background-position: top center;
    position: relative;
}

.hero-panorama::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-panorama .container {
    position: relative;
    z-index: 1;
}

.hero-panorama h1 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-panorama .lead {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
    .hero-panorama {
        height: 450px;
    }
}

/* Stats Bar */
.stats-bar {
    background: #1e293b !important;
}

/* Pre-Footer Stats Bar */
.pre-footer-stats {
    background: #1e293b !important;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Stats Bar Blue (same as header gradient) */
.stats-bar-blue {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
}

.stats-bar .stat-number {
    font-weight: 700;
}

.stats-bar .text-info {
    color: #38bdf8 !important;
}

.stats-bar .text-warning {
    color: #fbbf24 !important;
}

.stats-bar .text-success {
    color: #4ade80 !important;
}

/* ================================
   CITY CARDS
   ================================ */
.city-card {
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.city-card:hover {
    transform: translateY(-5px);
}

.city-card:hover .card {
    box-shadow: var(--mh-shadow-lg);
}

.city-card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.city-card-image-small {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.city-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.city-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.featured-city-card .card {
    border-radius: 16px;
}

.featured-city-card .city-card-image {
    border-radius: 16px 16px 0 0;
}

.other-city-card .card {
    border-radius: 12px;
}

.other-city-card .city-card-image-small {
    border-radius: 12px 12px 0 0;
}

/* Badge styles */
.badge.bg-success-subtle {
    background-color: rgba(34, 197, 94, 0.1) !important;
}

.badge.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.1) !important;
}

.badge.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.1) !important;
}

/* ================================
   FEATURES SECTION
   ================================ */
.feature-icon {
    box-shadow: var(--mh-shadow);
}

/* ================================
   STATS SECTION
   ================================ */
.stat-item .display-5 {
    font-weight: 700;
}

/* ================================
   FOOTER
   ================================ */
.main-home-footer {
    background: var(--mh-dark) !important;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-links a:hover {
    background: var(--mh-primary);
    color: white;
}

.language-flags a {
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.language-flags a:hover {
    transform: scale(1.2);
}

/* ================================
   BACK TO TOP BUTTON
   ================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--mh-primary);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--mh-shadow);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--mh-primary-dark);
    transform: translateY(-3px);
}

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 991.98px) {
    .main-home-header {
        min-height: auto;
    }

    .hero-section {
        padding: 2rem 0 4rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .city-card-image {
        height: 160px;
    }
}

@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .search-box {
        padding: 1rem !important;
    }

    .search-box .btn {
        font-size: 0.85rem;
    }

    .city-card-image-small {
        height: 100px;
    }

    .stat-item .display-5 {
        font-size: 2rem;
    }
}

/* ================================
   CITY BACKGROUND IMAGES
   ================================ */
/* Real city images with fallback gradients */
.city-bg-telaviv {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('../images/cities/tel aviv.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-jerusalem {
    background: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    background-image: url('../images/cities/jerusalem.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-ashdod {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    background-image: url('../images/cities/ashdod.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-netanya {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    background-image: url('../images/cities/netanya.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-herzliya {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    background-image: url('../images/cities/herzliya.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-eilat {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
    background-image: url('../images/cities/eilat.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-raanana {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    background-image: url('../images/cities/raanana.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-ashkelon {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    background-image: url('../images/cities/ashkelon.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-batyam {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    background-image: url('../images/cities/bat yam.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-caesarea {
    background: linear-gradient(135deg, #8e2de2 0%, #4a00e0 100%);
}

.city-bg-hadera {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    background-image: url('../images/cities/hadera.webp');
    background-size: cover;
    background-position: center;
}

.city-bg-ramatgan {
    background: linear-gradient(135deg, #3a7bd5 0%, #00d2ff 100%);
    background-image: url('../images/cities/ramat-gan.jpg');
    background-size: cover;
    background-position: center;
}

/* City name overlay on images */
.city-card-image::after,
.city-card-image-small::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
    pointer-events: none;
}

/* ================================
   LATEST LISTINGS SECTION
   ================================ */
.latest-listings-section {
    background: #f8fafc;
}

.latest-listings-section .annonce-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest-listings-section .annonce-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--mh-shadow-lg);
}

/* ================================
   FOOTER CITY LINKS
   ================================ */
.footer-links-list li {
    margin-bottom: 0.5rem;
}

.footer-links-list a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-links-list a:hover {
    color: white;
}
