/**
 * Home Page Styles
 * Modern, lightweight, and SEO-friendly design
 * RTL compatible
 */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary-color: #1C6EA4;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #1C6EA4;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition: all 0.3s ease;
}

/* ========================================
   Global Styles
   ======================================== */
.home-page {
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-light) !important;
    max-width: 600px;
    margin: initial !important;
}

.section-header-content {
    flex: 1;
}

/* ========================================
   Hero Section - Ultra-Modern Redesign
   ======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    padding: 8rem 0 4rem;
    overflow: hidden;
}

/* Modern Dark Overlay with Solid Color */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(28, 110, 164, 0.7);
    z-index: 1;
}

/* Removed gradient overlay for cleaner design */

/* Animated Particles Background - GPU Optimized */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 3;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 15% 90%, rgba(255, 255, 255, 0.3), transparent);
    background-size: 100% 100%;
    pointer-events: none;
    /* Use opacity animation instead of background-position for GPU acceleration */
    animation: particlesFade 8s ease-in-out infinite;
    will-change: opacity;
}

@keyframes particlesFade {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* Modern Hero Badge - GPU Optimized */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: var(--white);
    font-size: 0.938rem;
    font-weight: 600;
    margin-bottom: 2rem;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    /* GPU-accelerated animation using transform only */
    animation: badgePulse 3s ease-in-out infinite;
    will-change: transform;
}

.hero-badge svg {
    flex-shrink: 0;
    animation: arrowSlide 2s ease-in-out infinite;
    will-change: transform;
}

/* GPU-optimized: Only animate transform, not box-shadow */
@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes arrowSlide {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(4px);
    }
}

[dir="rtl"] @keyframes arrowSlide {
    0%, 100% {
        transform: translateX(0) scaleX(-1);
    }
    50% {
        transform: translateX(-4px) scaleX(-1);
    }
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Modern Title with Better Shadow */
.hero-title {
    font-size: clamp(2.5rem, 7vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-shadow:
        0 4px 12px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.8s ease-out;
}

/* Modern Subtitle */
.hero-subtitle {
    font-size: clamp(1.125rem, 2.5vw, 1.75rem);
    margin-bottom: 3rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.3);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Fade in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modern Hero Search Bar */
.hero-search-bar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 1.5rem 1rem;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 10px 30px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* Modern Toggle */
.search-toggle {
    display: flex;
    gap: 0.5rem;
    padding: 0.375rem;
    background: var(--bg-light);
    border-radius: 12px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.toggle-option {
    background: transparent;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.838rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
    padding: 1px 9px;
}

.toggle-option.active {
    background: var(--primary-color);
    color: var(--white);
    box-shadow:
        0 4px 12px rgba(37, 99, 235, 0.3),
        0 2px 4px rgba(37, 99, 235, 0.2);
    transform: translateY(-1px);
}

.toggle-option:hover:not(.active) {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

/* Modern Search Input */
.search-input-wrapper {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    pointer-events: none;
    z-index: 1;
}

[dir="rtl"] .search-icon {
    left: auto;
    right: 1.25rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3.25rem;
    border: 2px solid transparent;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

[dir="rtl"] .search-input {
    padding: 1rem 3.25rem 1rem 1.25rem;
}

.search-input::placeholder {
    color: var(--text-light);
    font-weight: 400;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Modern Select Dropdown - NEW */
.search-select-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-select {
    width: 100%;
    padding: 0rem 0.25rem 0rem 3.25rem !important;
    border: 2px solid transparent;
    background: var(--bg-light);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

[dir="rtl"] .search-select {
    padding: 0rem 2.8rem 0rem 0.25rem !important;
    background-position: left 1rem center;
}

.search-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--white);
    box-shadow:
        0 0 0 4px rgba(37, 99, 235, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.search-select option {
    padding: 0.75rem;
    font-size: 1rem;
}

/* Modern Search Button */
.search-submit {
    padding: 0.5rem 2.5rem;
    background: #1C6EA4;
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow:
        0 4px 12px rgba(28, 110, 164, 0.3),
        0 2px 4px rgba(28, 110, 164, 0.2);
    position: relative;
    overflow: hidden;
}

.search-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-submit:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(28, 110, 164, 0.4),
        0 4px 8px rgba(28, 110, 164, 0.3);
}

.search-submit:hover::before {
    opacity: 1;
}

.search-submit:active {
    transform: translateY(0);
}

/* Modern Keyword Suggestions */
.keyword-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.suggestions-label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-dark);
    opacity: 0.7;
}

.suggestion-tag {
    padding: 0.625rem 1.25rem;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.suggestion-tag:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    border-color: var(--primary-color);
}

/* Hero Stats Section */
.hero-stats {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin-top: 4rem;
    padding: 2rem 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: countUp 1s ease-out;
}

.stat-label {
    font-size: clamp(0.813rem, 1.5vw, 0.938rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.95;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Modern Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    animation: fadeInUp 1s ease-out 0.8s both;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.scroll-indicator:hover .scroll-arrow {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.15);
}

.scroll-indicator:hover .scroll-arrow::before {
    background: var(--white);
}

.scroll-arrow {
    width: 32px;
    height: 52px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    position: relative;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.scroll-arrow::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: scroll-down 2s infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.scroll-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

@keyframes scroll-down {
    0%, 20% {
        transform: translateX(-50%) translateY(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(22px);
        opacity: 0;
    }
}

/* Hero Responsive Styles */
@media (max-width: 991px) {
    .hero-section {
        padding: 6rem 0 3rem;
        background-attachment: scroll;
        min-height: 90vh;
    }

    .hero-badge {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }

    .hero-title {
        font-size: clamp(2rem, 6vw, 3.5rem);
    }

    .hero-subtitle {
        font-size: clamp(1rem, 2.5vw, 1.375rem);
        margin-bottom: 2.5rem;
    }

    .hero-search-bar {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .hero-stats {
        gap: 2rem;
        padding: 1.5rem 2rem;
        margin-top: 3rem;
    }

    .stat-number {
        font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    }

    .stat-divider {
        height: 50px;
    }
}

@media (max-width: 640px) {
    .search-input {
        padding: 2rem 3.25rem 2rem 1.25rem;
    }

    .hero-section {
        padding: 5rem 0 2rem;
        min-height: auto;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-badge {
        padding: 0.5rem 1rem;
        font-size: 0.813rem;
        gap: 0.5rem;
        margin-bottom: 1.25rem;
    }

    .hero-badge svg {
        width: 14px;
        height: 14px;
    }

    .hero-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: clamp(0.938rem, 4vw, 1.125rem);
        margin-bottom: 2rem;
    }

    .hero-search-bar {
        padding: 1.25rem;
        border-radius: 14px;
    }

    .hero-search-form {
        flex-direction: column;
        gap: 0.875rem;
    }

    .search-toggle {
        width: 100%;
    }

    .toggle-option {
        flex: 1;
       padding: 0.275rem 0.5rem;
        font-size: 0.875rem;
    }

    .search-input-wrapper,
    .search-select-wrapper {
        min-width: 100%;
    }

    .search-submit {
        width: 100%;
        padding: 0.5rem;
    }

    .keyword-suggestions {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .suggestion-tag {
        padding: 0.5rem 1rem;
        font-size: 0.813rem;
    }

    /* Hero Stats Mobile */
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem;
        margin-top: 2.5rem;
        border-radius: 16px;
    }

    .stat-item {
        width: 100%;
    }

    .stat-number {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-divider {
        display: none;
    }

    /* Scroll Indicator Mobile */
    .scroll-indicator {
        bottom: 1.5rem;
    }

    .scroll-arrow {
        width: 28px;
        height: 46px;
    }

    .scroll-text {
        font-size: 0.75rem;
    }
}

/* Extra Small Devices */
@media (max-width: 375px) {
    .hero-section {
        padding: 4rem 0 1.5rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.875rem;
    }

    .hero-title {
        font-size: clamp(1.5rem, 9vw, 2rem);
        margin-bottom: 0.875rem;
    }

    .hero-subtitle {
        font-size: clamp(0.875rem, 4.5vw, 1rem);
        margin-bottom: 1.5rem;
    }

    .hero-search-bar {
        padding: 1rem;
    }

    .toggle-option {
        padding: 0.275rem 0.5rem;
        font-size: 0.813rem;
    }

    .hero-stats {
        padding: 1.25rem;
        margin-top: 2rem;
        gap: 1.25rem;
    }

    .stat-number {
        font-size: clamp(1.25rem, 7vw, 1.75rem);
    }

    .stat-label {
        font-size: 0.688rem;
    }
}

/* RTL Specific Adjustments */
[dir="rtl"] .toggle-option,
[dir="rtl"] .suggestion-tag {
    font-family: inherit;
}

[dir="rtl"] .hero-badge svg {
    transform: scaleX(-1);
}

[dir="rtl"] .stat-item {
    direction: rtl;
}

/* Landscape Mobile Optimization */
@media (max-width: 991px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: 4rem 0 2rem;
    }

    .hero-stats {
        margin-top: 2rem;
        padding: 1.25rem 2rem;
    }

    .stat-number {
        font-size: clamp(1.5rem, 3vw, 2rem);
    }

    .scroll-indicator {
        bottom: 1.5rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .toggle-option {
        min-height: 44px;
        padding: 0.275rem 0.5rem;
    }

    .search-submit {
        min-height: 48px;
    }

    .search-select,
    .search-input {
        min-height: 48px;
    }

    .suggestion-tag {
        min-height: 36px;
        padding: 0.625rem 1.25rem;
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-overlay {
        background: rgba(28, 110, 164, 0.75);
    }
}

/* ========================================
   Popular Properties Section - MODERN REDESIGN
   ======================================== */
.popular-properties-section {
    padding: 5rem 0;
    background: #fafafa;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

/* Carousel Wrapper */
.properties-carousel-wrapper {
    position: relative;
    margin: 0 -1rem;
    padding: 0 3.5rem;
}

/* Keen Slider Container */
.carousel-track {
    display: flex !important;
    padding: 1rem 0 2rem 0;
    align-items: stretch;
}

.carousel-track.keen-slider {
    overflow: hidden;
}

/* Modern Property Card - FIXED HEIGHT */
.property-card-modern {
    min-width: 340px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: auto;
}

.keen-slider .property-card-modern {
    flex-shrink: 0;
}

.property-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.property-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

/* Property Image - FIXED ASPECT RATIO */
.property-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
}

.property-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Placeholder for missing images */
.property-image-wrapper:not(:has(img))::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.property-image-wrapper:not(:has(img))::after {
    content: '🏠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    opacity: 0.3;
}

.property-card-modern:hover .property-image-wrapper img {
    transform: scale(1.05);
}

/* Property Badge - BETTER POSITIONED */
.property-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

[dir="rtl"] .property-badge {
    right: auto;
    left: 1rem;
}

/* Price Tag - REDESIGNED */
.property-price-tag {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 2;
}

/* Property Card Content - FLEXIBLE */
.property-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
}

.property-type-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    align-self: flex-start;
}

.property-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.property-location svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

/* Property Features - BETTER GRID */
.property-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    margin: auto 0 1rem 0;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.375rem;
}

.feature-item svg {
    flex-shrink: 0;
    color: var(--primary-color);
    width: 24px;
    height: 24px;
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.feature-value {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1;
}

.feature-label {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
    line-height: 1;
}

/* Card Footer */
.property-card-footer {
    padding-top: 1rem;
    margin-top: auto;
}

.view-details-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.875rem;
    background: var(--bg-light);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.938rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.property-card-modern:hover .view-details-btn {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Carousel Navigation Buttons */
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.carousel-nav-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.carousel-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

[dir="rtl"] .carousel-prev {
    left: auto;
    right: 0;
}

[dir="rtl"] .carousel-next {
    right: auto;
    left: 0;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    background: var(--border-color);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary-color);
    width: 32px;
    border-radius: 5px;
}

.carousel-dot:hover:not(.active) {
    background: var(--text-light);
}

/* ========================================
   Popular Properties - Responsive Styles
   ======================================== */

/* Tablet - Adjust for 2 columns */
@media (max-width: 991px) {
    .popular-properties-section {
        padding: 3.5rem 0;
    }

    .property-card-modern {
        min-width: 320px;
    }

    .property-card-title {
        font-size: 1.125rem;
        min-height: 3rem;
    }

    .property-price-tag {
        font-size: 1.375rem;
        padding: 0.875rem;
    }

    .feature-value {
        font-size: 1.063rem;
    }

    .carousel-nav-btn {
        width: 48px;
        height: 48px;
    }

    .carousel-prev {
        left: -8px;
    }

    .carousel-next {
        right: -8px;
    }

    [dir="rtl"] .carousel-prev {
        left: auto;
        right: -8px;
    }

    [dir="rtl"] .carousel-next {
        right: auto;
        left: -8px;
    }
}

/* Mobile - Single column */
@media (max-width: 640px) {
    .popular-properties-section {
        padding: 2.5rem 0;
    }

    .property-card-modern {
        min-width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .property-card-content {
        padding: 1.25rem;
    }

    .property-card-title {
        font-size: 1rem;
        min-height: 2.8rem;
        line-height: 1.4;
    }

    .property-location {
        font-size: 0.813rem;
        margin-bottom: 0.875rem;
    }

    .property-price-tag {
        font-size: 1.25rem;
        padding: 0.75rem;
        bottom: 0.75rem;
        left: 0.75rem;
        right: 0.75rem;
    }

    .property-features-grid {
        gap: 0.75rem;
        padding: 0.875rem 0;
        margin-bottom: 0.875rem;
    }

    .feature-item svg {
        width: 20px;
        height: 20px;
    }

    .feature-value {
        font-size: 1rem;
    }

    .feature-label {
        font-size: 0.688rem;
    }

    .view-details-btn {
        padding: 0.75rem;
        font-size: 0.875rem;
    }

    .carousel-nav-btn {
        width: 44px;
        height: 44px;
    }

    .carousel-prev {
        left: -4px;
    }

    .carousel-next {
        right: -4px;
    }

    [dir="rtl"] .carousel-prev {
        left: auto;
        right: -4px;
    }

    [dir="rtl"] .carousel-next {
        right: auto;
        left: -4px;
    }

    .carousel-dots {
        margin-top: 1.5rem;
        gap: 0.375rem;
    }

    .carousel-dot {
        width: 8px;
        height: 8px;
    }

    .carousel-dot.active {
        width: 24px;
    }
}

/* ========================================
   Property Types Section
   ======================================== */
.property-types-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.property-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.property-type-card {
    position: relative;
    display: block;
    aspect-ratio: 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
}

.property-type-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.property-type-image {
    position: absolute;
    inset: 0;
}

.property-type-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.property-type-card:hover .property-type-image img {
    transform: scale(1.1);
}

.property-type-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.property-type-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: var(--white);
    z-index: 1;
}

.property-type-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.property-type-count {
    font-size: 0.875rem;
    opacity: 0.9;
}

.property-type-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
}

[dir="rtl"] .property-type-arrow {
    right: auto;
    left: 1rem;
}

.property-type-card:hover .property-type-arrow {
    opacity: 1;
    transform: scale(1);
}

/* ========================================
   Cities Section
   ======================================== */
.cities-section {
    padding: 5rem 0;
    background: var(--white);
}

.cities-carousel {
    position: relative;
    overflow: hidden;
}

.cities-track {
    display: flex !important;
    padding-bottom: 1rem;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.cities-track.keen-slider {
    overflow: hidden;
}

.cities-track:not(.keen-slider) {
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.cities-track:not(.keen-slider)::-webkit-scrollbar {
    display: none;
}

.city-card {
    flex: 0 0 300px;
    width: 300px;
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition: var(--transition);
}

/* Keen Slider slide */
.keen-slider .city-card {
    flex-shrink: 0;
}

.city-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.city-image {
    position: absolute;
    inset: 0;
}

.city-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.city-card:hover .city-image img {
    transform: scale(1.1);
}

.city-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 60%);
}

.city-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: var(--white);
    z-index: 1;
}

.city-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.city-count {
    font-size: 0.875rem;
    opacity: 0.9;
}

.city-icon {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition);
}

[dir="rtl"] .city-icon {
    right: auto;
    left: 1rem;
}

.city-card:hover .city-icon {
    opacity: 1;
    transform: scale(1);
}

.carousel-nav-cities {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-nav-cities:hover {
    background: var(--primary-color);
    color: var(--white);
}

.carousel-nav-cities.prev {
    left: -24px;
}

.carousel-nav-cities.next {
    right: -24px;
}

[dir="rtl"] .carousel-nav-cities.prev {
    left: auto;
    right: -24px;
}

[dir="rtl"] .carousel-nav-cities.next {
    right: auto;
    left: -24px;
}

/* ========================================
   YouTube Feed Section
   ======================================== */
.youtube-feed-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.youtube-video-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.youtube-video-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.video-thumbnail {
    position: relative;
    aspect-ratio: 16 / 9;
    cursor: pointer;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.youtube-video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.youtube-video-card:hover .video-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.play-button {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-button:hover {
    transform: scale(1.1);
    background: var(--white);
}

.video-title {
    padding: 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

.btn-youtube {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: #154D71;
    color: var(--white);
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.btn-youtube:hover {
    background: #0f3d5a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Video Modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-modal.active {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 1200px;
    z-index: 1;
}

.video-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--white);
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.video-modal-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.video-modal-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    position: relative;
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
}

.cta-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.quick-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.contact-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.contact-option.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--white);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: var(--transition);
}

.btn-cta-primary:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.3);
}

.btn-cta-secondary {
    display: inline-flex;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    transition: var(--transition);
}

.btn-cta-secondary:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-4px);
}

.cta-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: radial-gradient(circle at 1px 1px, var(--white) 1px, transparent 0);
    background-size: 40px 40px;
}

/* ========================================
   Responsive Design
   ======================================== */
/* Keen Slider Animation */
.keen-slider {
    cursor: grab;
}

.keen-slider:active {
    cursor: grabbing;
}

/* Smooth animation */
.keen-slider__slide {
    position: relative;
    overflow: visible;
}

/* Prevent layout shift */
.keen-slider[data-keen-slider-disabled] {
    display: flex !important;
}

@media (max-width: 991px) {
    /* Popular Properties Responsive */
    .popular-properties-section {
        padding: 4rem 0;
    }

    .section-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1.5rem;
    }

    .carousel-nav-btn {
        width: 44px;
        height: 44px;
    }

    .properties-carousel-wrapper {
        padding: 0 2.5rem;
    }

    .property-card-modern {
        min-width: 300px;
    }

    .property-price-tag {
        font-size: 1.25rem;
        padding: 0.875rem;
    }

    .property-features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }

    .property-types-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {
    .hero-search-form {
        flex-direction: column;
    }

    .search-input-wrapper {
        min-width: 100%;
    }

    .search-submit {
        width: 100%;
    }

    .property-card-carousel {
        flex: 0 0 100%;
        min-width: 280px;
    }

    .city-card {
        flex: 0 0 280px;
    }

    .quick-contact {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-actions {
        flex-direction: column;
    }

    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        justify-content: center;
    }

    .youtube-videos-grid {
        grid-template-columns: 1fr;
    }

    .property-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* ========================================
   Accessibility
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}



.hero-search-bar {
    margin-bottom: 80px;
}

/* ========================================
   Hero Counters Section
   ======================================== */
.hero-counters {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 1.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    max-width: 964px;
    margin-left: auto;
    margin-right: auto;
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.counter-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
}

[dir="rtl"] .counter-item:not(:last-child)::after {
    right: auto;
    left: -0.75rem;
}

.counter-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    margin-bottom: 1rem;
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.counter-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.counter-item:hover .counter-icon {
    transform: translateY(-4px) scale(1.08);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow:
        0 12px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.counter-content {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.counter-number {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-feature-settings: 'tnum';
    font-variant-numeric: tabular-nums;
}

.counter-plus {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    margin-left: 0.125rem;
}

[dir="rtl"] .counter-plus {
    margin-left: 0;
    margin-right: 0.125rem;
}

.counter-label {
    font-size: clamp(0.75rem, 1.2vw, 0.875rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.3;
    max-width: 150px;
}

/* Counter Animation */
@keyframes counterFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-item {
    animation: counterFadeIn 0.6s ease-out backwards;
}

.counter-item:nth-child(1) {
    animation-delay: 0.1s;
}

.counter-item:nth-child(2) {
    animation-delay: 0.2s;
}

.counter-item:nth-child(3) {
    animation-delay: 0.3s;
}

/* Tablet - 2 columns on medium screens */
@media (max-width: 991px) {
    .hero-counters {
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        margin-top: 3rem;
        border-radius: 20px;
    }

    .counter-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 1rem;
    }

    .counter-icon svg {
        width: 32px;
        height: 32px;
    }

    .counter-number {
        font-size: clamp(2rem, 4vw, 3rem);
    }

    .counter-plus {
        font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    }

    .counter-label {
        font-size: clamp(0.875rem, 1.5vw, 1rem);
        max-width: 160px;
    }

    .counter-item:not(:last-child)::after {
        height: 70px;
    }
}

/* Mobile - Keep 3 columns */
@media (max-width: 640px) {
    .hero-counters {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 1.5rem 1rem;
        margin-top: 2.5rem;
        border-radius: 18px;
    }

    .counter-item {
        padding: 0;
    }

    .counter-item:not(:last-child)::after {
        height: 60px;
    }

    .counter-icon {
        width: 48px;
        height: 48px;
        margin-bottom: 0.75rem;
    }

    .counter-icon svg {
        width: 24px;
        height: 24px;
    }

    .counter-number {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .counter-plus {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }

    .counter-label {
        font-size: clamp(0.625rem, 2.5vw, 0.75rem);
        max-width: 100%;
        letter-spacing: 0.03em;
    }
}

/* Extra Small Devices */
@media (max-width: 375px) {
    .hero-counters {
        grid-template-columns: repeat(3, 1fr);
        padding: 1.25rem 0.75rem;
        margin-top: 2rem;
        gap: 0.75rem;
    }

    .counter-icon {
        width: 44px;
        height: 44px;
    }

    .counter-icon svg {
        width: 22px;
        height: 22px;
    }

    .counter-number {
        font-size: clamp(1.25rem, 7vw, 1.75rem);
    }

    .counter-plus {
        font-size: clamp(0.875rem, 5vw, 1.125rem);
    }

    .counter-label {
        font-size: clamp(0.563rem, 2.8vw, 0.688rem);
    }

    .counter-item:not(:last-child)::after {
        height: 50px;
    }
}

/* RTL Specific Adjustments */
[dir="rtl"] .counter-item {
    direction: rtl;
}

[dir="rtl"] .counter-content {
    flex-direction: row-reverse;
}

/* Landscape Mobile Optimization */
@media (max-width: 991px) and (orientation: landscape) {
    .hero-counters {
        margin-top: 2rem;
        padding: 1.5rem;
        gap: 1.25rem;
    }

    .counter-icon {
        width: 56px;
        height: 56px;
    }

    .counter-icon svg {
        width: 28px;
        height: 28px;
    }

    .counter-number {
        font-size: clamp(1.75rem, 3vw, 2.25rem);
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .counter-icon {
        transition: none;
    }

    .counter-item:active .counter-icon {
        transform: scale(0.95);
    }
}

/* High Resolution Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-counters {
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .counter-icon {
        background: rgba(255, 255, 255, 0.18);
    }
}
