/**
 * Home Page Styles - Compass Design
 * 
 * Features:
 * - Hero Section with Search (mobile-first)
 * - Featured Properties Grid
 * - Value Propositions
 * - Call-to-Action Sections
 * 
 * Performance: Only loads on Homepage
 * 
 * @package Sokna
 * @since 1.0.0
 */

/* ============================================
   STACKING: Header above hero/menu visible
   ============================================ */
body.home .site-main,
body.page-template-template-home .site-main {
    position: relative;
    z-index: 0;
}

/* ============================================
   HERO SECTION - Mobile-First (hero-section)
   Keep below header (z-index) so menu is always on top.
   ============================================ */
.hero-section {
    position: relative;
    z-index: 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #1a1a1a;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

.hero-section__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
}

.hero-section__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.hero-section__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-section__text {
    margin-bottom: 32px;
}

.hero-section__title {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 12px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero-section__desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.5;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* Hero search + tabs: all styles here (no inline CSS in head). Local-friendly. */
.hero-section__search {
    width: 100%;
    max-width: 1000px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}
html[dir="rtl"] .hero-section__search {
    overflow: visible !important;
}

/* Search Tabs - visibility forced so RTL/theme cannot hide (override defaults) */
.hero-search-tabs {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 100;
    gap: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 8px 0;
}

.hero-search-tab {
    flex: 1;
    min-height: 48px;
    padding: 12px 16px;
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    background: transparent;
    border: none;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
}

.hero-search-tab:hover {
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.08);
}

.hero-search-tab.active {
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}

.hero-search-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 5px solid #fff;
}

.hero-search-form--premium {
    border-radius: 0;
}

/* Search Form - Mobile: Vertical stack; Glassmorphism / clean card */
.hero-search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-search-form__field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
}

.hero-search-form__field .hero-search-form__select,
.hero-search-form__field .hero-search-form__input {
    align-self: stretch;
}

.hero-search-form__label {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    color: #666;
}

.hero-search-form__icon {
    flex-shrink: 0;
}

.hero-search-form__select,
.hero-search-form__input {
    flex: 1;
    min-height: 48px;
    min-width: 0; /* Allow flex shrink on mobile */
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    background: #fff;
    color: #1a1a1a;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-inline-end: 36px;
    /* Prevent text overflow on mobile */
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-search-form__input {
    background-image: none;
    padding-inline-end: 16px;
}

.hero-search-form__input::placeholder {
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-search-form__select:focus,
.hero-search-form__input:focus {
    outline: none;
    border-color: #0061DF;
}

.hero-search-form__submit {
    margin-top: 4px;
}

/* Mobile: Prominent search button, 48px min touch target (WCAG 2.5.5) */
.hero-search-form__btn {
    width: 100%;
    min-height: 48px;
    min-width: 48px;
    padding: 14px 24px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.hero-search-form__btn:hover {
    background: #333;
}

/* Desktop: Horizontal bar */
@media (min-width: 768px) {
    .hero-section {
        min-height: 80vh;
        background-attachment: scroll;
    }
    .hero-section__bg {
        background-attachment: scroll;
    }
    .hero-section__title {
        font-size: 3rem;
    }
    .hero-section__desc {
        font-size: 1.125rem;
    }
    .hero-search-form {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
        padding: 24px;
    }
    .hero-search-form__field {
        flex: 1;
        min-width: 140px;
    }
    .hero-search-form__field.hero-search-form__submit {
        flex: 0 0 auto;
        margin-top: 0;
    }
    .hero-search-form__btn {
        width: auto;
        min-width: 140px;
    }
}

@media (min-width: 1024px) {
    .hero-section__title {
        font-size: 3.5rem;
    }
}

/* Z-index for dropdowns (select options) */
.hero-search-form__select {
    z-index: 10;
}

.hero-section__search {
    position: relative;
    z-index: 20;
}

/* ============================================
   CITY EXPLORER - Premium floating cards
   ============================================ */
.city-explorer-section {
    padding: 48px 0 56px;
}

/* Ensure City Explorer is never hidden in RTL (Arabic); no display:none override */
html[dir="rtl"] .city-explorer-section {
    display: block !important;
}

/* English home: sync title and subtitle centering (same as FR/AR) */
html[lang="en"] .section-title,
html[lang="en"] .section-subtitle,
html[lang="en"] .section-description,
html[lang="en"] .city-explorer-title,
html[lang="en"] .section-header {
    text-align: center !important;
}

.city-explorer-title {
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 32px 0;
    text-align: center !important;
}

.city-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 10px 0;
}

.city-premium-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 10px 5px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    min-height: 90px;
}

.city-premium-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: #00adbb;
}

.city-premium-card:focus {
    outline: 2px solid #00adbb;
    outline-offset: 2px;
}

.city-premium-card__icon {
    width: 24px;
    height: 24px;
    color: #00adbb;
    flex-shrink: 0;
}

.city-premium-card__icon svg {
    width: 100%;
    height: 100%;
}

.city-name {
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    display: block;
}

.city-explore-text {
    font-size: 0.7rem;
    color: #00adbb;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.city-premium-card:hover .city-explore-text {
    opacity: 1;
    color: #0099a8;
}

@media (min-width: 768px) {
    .city-grid-container {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
        padding: 0;
    }
    .city-premium-card {
        padding: 30px 20px;
        gap: 8px;
        min-height: 140px;
    }
    .city-premium-card__icon {
        width: 32px;
        height: 32px;
    }
    .city-name {
        font-size: 1.125rem;
    }
    .city-explore-text {
        font-size: 0.85rem;
    }
}

/* ============================================
   HOME HERO SECTION - Compass.com Full-Screen Style (legacy)
   z-index: 0 so header/menu stay on top.
   ============================================ */
.home-hero {
    position: relative;
    z-index: 0;
    min-block-size: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Full-screen background image */
    background-image: url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=2000&q=90');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Dark overlay for text contrast */
.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

/* Hero Background Elements (Keep for compatibility) */
.hero-background {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.hero-bg-image {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    object-position: center;
}

/* Hero Overlay (Keep for compatibility) */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 2;
}

/* Fallback if using old structure */
.home-hero:not(:has(.hero-bg-image)) .hero-background {
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-gray-900) 100%
    );
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    inline-size: 100%;
    max-inline-size: 1200px;
    padding-block: var(--space-8);
    padding-inline: var(--space-4);
}

.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-6);
    text-align: center;
}

/* ============================================
   HERO TEXT - Compass.com Large & Bold
   ============================================ */
.hero-text {
    max-inline-size: 900px;
    margin-block-end: var(--space-4);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: #FFFFFF;
    margin-block-end: var(--space-2);
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
    font-size: var(--text-lg);
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.6;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

/* Responsive Typography */
@media (min-width: 768px) {
    .hero-title {
        font-size: var(--text-5xl);
    }
    .hero-subtitle {
        font-size: var(--text-xl);
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* Arabic Typography Enhancement */
[dir="rtl"] .hero-title,
[dir="rtl"] .hero-subtitle {
    font-family: var(--font-arabic);
}

/* ============================================
   HERO SEARCH BAR
   ============================================ */
.hero-search {
    inline-size: 100%;
    max-inline-size: 1000px;
}

/* ============================================
   SEARCH TABS - Compass.com Button Style (Sitting on Bar)
   ============================================ */
.search-tabs {
    display: flex;
    gap: 0;
    margin-block-end: 0;
    padding: 0;
    background: transparent;
    border: none;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
}

.search-tab {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 500;
    background-color: rgba(255, 255, 255, 0.85);
    color: #333333;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    position: relative;
    letter-spacing: 0.3px;
    border-block-end: 3px solid transparent;
    margin-inline-end: 4px;
}

.search-tab:last-child {
    margin-inline-end: 0;
}

.search-tab:hover {
    background-color: rgba(255, 255, 255, 0.95);
    color: #000000;
}

.search-tab.active {
    background-color: #0061ff;
    color: #FFFFFF;
    font-weight: 600;
    border-block-end: 3px solid #0061ff;
    box-shadow: 0 -2px 8px rgba(0, 97, 255, 0.2);
}

/* RTL: Hero + archive tabs visible and aligned (override theme RTL) */
html[dir="rtl"] .hero-search-tabs,
html[dir="rtl"] .search-tabs {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 100 !important;
    justify-content: flex-end;
    flex-direction: row-reverse;
}

html[dir="rtl"] .hero-search-tab,
html[dir="rtl"] .search-tab {
    margin-inline-end: 4px;
    margin-inline-start: 0;
    text-align: right;
}

html[dir="rtl"] .hero-search-tab:first-child,
html[dir="rtl"] .search-tab:first-child {
    margin-inline-end: 0;
}

html[dir="rtl"] .hero-search-tab:last-child,
html[dir="rtl"] .search-tab:last-child {
    margin-inline-end: 4px;
}

/* Mobile: Center on small screens */
@media (max-width: 767px) {
    .search-tabs {
        gap: 4px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-tab {
        font-size: 14px;
        padding: 10px 20px;
        margin-inline-end: 0;
    }
}

.search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background-color: #FFFFFF;
    padding: 20px 28px;
    border-radius: 0 6px 6px 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: none;
    min-block-size: 70px;
    position: relative;
    z-index: 1;
}

/* RTL: Flip border-radius */
html[dir="rtl"] .search-form {
    border-radius: 6px 0 6px 6px;
}

/* Desktop Layout - Horizontal (2 fields + button) */
@media (min-width: 768px) {
    .search-form {
        display: flex;
        align-items: stretch;
        gap: 0;
        padding: 0;
        min-block-size: 70px;
    }
    
    /* RTL: Reverse flex order */
    html[dir="rtl"] .search-form {
        flex-direction: row-reverse !important;
    }
}

/* ============================================
   SEARCH FIELDS - Compass.com Clean Inputs
   ============================================ */
.search-field {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 28px;
    flex: 1;
    background-color: #FFFFFF;
}

.search-field:hover {
    background-color: #FFFFFF;
}

/* Desktop: Faint Vertical Separators */
@media (min-width: 768px) {
    .search-field {
        padding: 24px 32px;
    }
    
    .search-field:not(:last-child) {
        border-inline-end: 1px solid #e8e8e8;
    }
    
    /* RTL: Flip border */
    html[dir="rtl"] .search-field:not(:last-child) {
        border-inline-end: none;
        border-inline-start: 1px solid #e8e8e8;
    }
}

/* Search Label (Icon) - Medium Gray */
.search-label {
    display: flex;
    align-items: center;
    color: #999999;
    margin: 0;
    flex-shrink: 0;
}

.search-label svg {
    inline-size: 20px;
    block-size: 20px;
    stroke-width: 2;
}

/* Search Input & Select - Compass.com Clean Typography */
.search-input,
.search-select {
    flex: 1;
    inline-size: 100%;
    padding: 0;
    font-size: 16px;
    font-weight: 500;
    color: #000000;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    line-height: 1.5;
}

.search-input::placeholder {
    color: #999999;
    font-weight: 400;
}

/* Select Box - Clean, No Browser Defaults */
.search-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-weight: 500;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 8px) center;
    padding-inline-end: 28px;
}

/* Remove ALL browser focus styles */
.search-select:focus {
    outline: none;
    border: none;
    box-shadow: none;
    color: #000000;
    background-color: transparent;
}

/* Remove blue highlight on selection */
.search-select:focus-visible {
    outline: none;
    box-shadow: none;
}

/* RTL: Arrow on left */
html[dir="rtl"] .search-select {
    background-position: 8px center;
    padding-inline-end: 0;
    padding-inline-start: 28px;
}

/* Options styling */
.search-select option {
    font-weight: 400;
    background-color: #FFFFFF;
    color: #000000;
}

.search-select option:checked {
    background-color: #f5f5f5;
}

/* ============================================
   SEARCH SUBMIT BUTTON - Compass.com Royal Blue
   ============================================ */
.search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 35px;
    font-family: var(--font-main) !important;
    font-size: 16px;
    font-weight: 600 !important;
    color: #FFFFFF;
    background-color: #0061ff;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    inline-size: 100%;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .search-submit {
        inline-size: auto;
        padding: 24px 45px;
        min-inline-size: 150px;
    }
}

.search-submit:hover {
    background-color: #0052C2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 97, 255, 0.3);
}

.search-submit:active {
    background-color: #004399;
}

.search-submit svg {
    inline-size: 20px;
    block-size: 20px;
    stroke-width: 2.5;
    stroke: #FFFFFF;
}

/* Hide text on mobile, show icon only */
@media (max-width: 767px) {
    .search-submit span {
        display: none;
    }
    
    .search-submit {
        padding: 20px 25px;
    }
}

/* ============================================
   QUICK LINKS - Compass.com Elegant Style
   ============================================ */
.quick-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    margin-block-start: var(--space-5);
    justify-content: center;
}

.quick-links-label {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.quick-link {
    font-size: 15px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: 0;
    border: none;
    border-block-end: 1px solid transparent;
    transition: all var(--transition-fast);
    background: transparent;
}

.quick-link:hover {
    color: #FFFFFF;
    border-block-end-color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   FEATURED PROPERTIES SECTION
   ============================================ */
.featured-properties {
    padding-block: var(--space-10);
}

.section-header {
    text-align: center !important;
    margin-block-end: var(--space-6);
}

.section-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-primary);
    margin-block-end: var(--space-2);
    text-align: center !important;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: var(--color-gray-400);
    text-align: center !important;
}

/* Global: all section descriptions centered (Certified, ad grids, etc.) */
.section-description {
    text-align: center !important;
}

/* ============================================
   CERTIFIED BY SOKNA - Elite Section (Compass)
   ============================================ */
.sokna-certified-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.section-certified.sokna-certified-section {
    padding-block-end: var(--space-14);
}

.sokna-certified-section .section-header {
    margin-block-end: 50px;
}

.sokna-certified-section .section-header.text-center {
    text-align: center;
}

.sokna-certified-section .section-title {
    font-size: 36px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 12px 0;
}

.sokna-certified-section .section-description {
    font-size: 18px;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.2;
    text-align: center !important;
}

.sokna-certified-header {
    margin-block-end: var(--space-6);
}

.sokna-certified-header .section-title {
    margin: 0;
}

/* Certified grid - Premium spacing */
.sokna-certified-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}

@media (min-width: 768px) {
    .sokna-certified-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
}

@media (min-width: 1024px) {
    .sokna-certified-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 36px;
    }
}

/* ============================================
   MINIMALIST LUXURY - Vogue / Arch Digest
   Full-bleed image, glass price, clean typography
   ============================================ */
.sokna-certified-card .minimalist-card {
    display: block;
    height: 320px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #e8e8e8;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.sokna-certified-card:hover .minimalist-card {
    transform: translateY(-6px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
}

/* Overlay - darkens on hover for text pop */
.sokna-certified-card .minimalist-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%);
    opacity: 0.7;
    transition: opacity 0.4s ease, background 0.4s ease;
}

.sokna-certified-card:hover .minimalist-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.15) 50%);
}

/* Image zoom on hover */
.sokna-certified-card .minimalist-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: inherit;
    background-position: inherit;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.sokna-certified-card:hover .minimalist-card::before {
    transform: scale(1.05);
}

.sokna-certified-card .minimalist-overlay,
.sokna-certified-card .minimalist-price,
.sokna-certified-card .minimalist-content {
    z-index: 1;
}

/* Glassmorphism Price - top-right */
.sokna-certified-card .minimalist-price.glass {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 10px 18px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.04em;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

[dir="rtl"] .sokna-certified-card .minimalist-price.glass {
    right: auto;
    left: 20px;
}

/* Content - bottom, generous padding */
.sokna-certified-card .minimalist-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 28px 28px;
}

.sokna-certified-card .minimalist-title {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.02em;
    line-height: 1.35;
}

/* Amenities - single thin horizontal line */
.sokna-certified-card .minimalist-amenities {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 28px;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.01em;
}

.sokna-certified-card .minimalist-amenities .amenity {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sokna-certified-card .minimalist-amenities .houzez-icon {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* Mobile */
@media (max-width: 767px) {
    .sokna-certified-card .minimalist-card {
        height: 280px;
    }

    .sokna-certified-card .minimalist-content {
        padding: 24px 20px 20px;
    }

    .sokna-certified-card .minimalist-title {
        font-size: 18px;
    }

    .sokna-certified-card .minimalist-price.glass {
        font-size: 17px;
        padding: 8px 14px;
        top: 16px;
        right: 16px;
    }
}

.properties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-block-end: var(--space-6);
}

@media (min-width: 768px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .properties-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.no-properties {
    text-align: center;
    color: var(--color-gray-400);
    padding-block: var(--space-6);
}

.section-footer {
    text-align: center;
}

/* ============================================
   VALUE PROPOSITIONS SECTION
   ============================================ */
.value-props {
    padding-block: var(--space-8);
    background-color: var(--color-gray-100);
}

.props-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

@media (min-width: 768px) {
    .props-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-8);
    }
}

.prop-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
}

.prop-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 80px;
    block-size: 80px;
    background-color: var(--color-secondary);
    border-radius: var(--radius-lg);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.prop-icon svg {
    inline-size: 40px;
    block-size: 40px;
}

.prop-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

.prop-description {
    font-size: var(--text-base);
    color: var(--color-gray-400);
    line-height: 1.7;
    max-inline-size: 280px;
    margin: 0;
}

/* ============================================
   RTL SUPPORT - Compass.com Perfect Flip
   ============================================ */
html[dir="rtl"] .search-label {
    flex-direction: row-reverse;
}

html[dir="rtl"] .search-submit {
    flex-direction: row-reverse;
}

/* RTL: Flip all right-pointing arrows and chevrons */
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-long-arrow-right,
html[dir="rtl"] .fa-angle-right,
html[dir="rtl"] i.fa-chevron-right,
html[dir="rtl"] i.fa-arrow-right,
html[dir="rtl"] i.fa-long-arrow-right,
html[dir="rtl"] i.fa-angle-right {
    transform: scaleX(-1);
}

/* RTL: Flip SVG arrows in buttons */
html[dir="rtl"] .readmore-arrow,
html[dir="rtl"] button svg[viewBox*="24"] polyline[points*="19 12"],
html[dir="rtl"] a svg[viewBox*="24"] polyline[points*="19 12"] {
    transform: scaleX(-1);
}

/* RTL: Tabs use flex-start which automatically aligns right in RTL */
/* No override needed - flex-start respects dir="rtl" */

/* Mobile: Stack properly in RTL */
@media (max-width: 767px) {
    html[dir="rtl"] .search-form {
        direction: rtl;
    }
    
    html[dir="rtl"] .search-field {
        direction: rtl;
    }
    
    html[dir="rtl"] .search-tabs {
        justify-content: center;
        flex-direction: row-reverse;
    }
    
    html[dir="rtl"] .search-tab {
        margin-inline-end: 4px;
        margin-inline-start: 0;
    }
}

/* Remove any browser autofill blue backgrounds */
.search-input:-webkit-autofill,
.search-select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset;
    -webkit-text-fill-color: #000000;
    transition: background-color 5000s ease-in-out 0s;
}

.search-input:-webkit-autofill:focus,
.search-select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #FFFFFF inset;
    -webkit-text-fill-color: #000000;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.search-input:focus,
.search-select:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

.search-submit:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .search-submit,
    .quick-link,
    .search-field {
        transition: none;
    }
    
    .search-submit:hover {
        transform: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
    
    .search-form {
        border: 2px solid var(--color-primary);
    }
}

/* ============================================
   SECTION COMMONS (Compass Style)
   ============================================ */
section[class^="section-"] {
    padding-block: 80px;
    background: #FFFFFF;
}

.container {
    max-inline-size: 1280px;
    margin-inline: auto;
    padding-inline: 24px;
}

/* Section Headers */
.section-header {
    text-align: center !important;
    margin-block-end: 60px;
}

.section-title {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
    color: #000000;
    margin-block-end: 12px;
    letter-spacing: -0.5px;
    text-align: center !important;
}

.section-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: #666666;
    max-inline-size: 600px;
    margin-inline: auto;
    text-align: center !important;
}

/* Section Footers (CTAs) */
.section-footer {
    text-align: center;
    margin-block-start: 48px;
}

/* ============================================
   BUTTONS (Sokna Elite Luxury Style)
   ============================================ */
.btn-primary,
.btn-dark,
.btn-outline,
.button,
.houzez-module-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 25px;
    font-family: var(--font-main) !important;
    font-size: 16px;
    font-weight: 600 !important;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.5;
}

.btn-primary {
    background-color: #0061ff;
    color: #FFFFFF;
}

.btn-primary:hover {
    background-color: #0052C2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 97, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 97, 255, 0.2);
}

.btn-dark {
    background-color: #000000;
    color: #FFFFFF;
}

.btn-dark:hover {
    background-color: #333333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-dark:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background-color: transparent;
    color: #000000;
    border-color: #000000;
}

.btn-outline:hover {
    background-color: #000000;
    color: #FFFFFF;
    transform: translateY(-2px);
}

.btn-outline:active {
    transform: translateY(0);
}

/* RTL: Flip directional icons in buttons */
html[dir="rtl"] .btn-primary i.fa-chevron-right,
html[dir="rtl"] .btn-primary i.fa-arrow-right,
html[dir="rtl"] .btn-dark i.fa-chevron-right,
html[dir="rtl"] .btn-dark i.fa-arrow-right,
html[dir="rtl"] .btn-outline i.fa-chevron-right,
html[dir="rtl"] .btn-outline i.fa-arrow-right,
html[dir="rtl"] .button i.fa-chevron-right,
html[dir="rtl"] .button i.fa-arrow-right,
html[dir="rtl"] .houzez-module-btn i.fa-chevron-right,
html[dir="rtl"] .houzez-module-btn i.fa-arrow-right {
    transform: scaleX(-1);
}

/* Alternative: Replace with left-pointing icons via CSS content (if using ::before/::after) */
html[dir="rtl"] .btn-primary .fa-chevron-right::before {
    content: "\f053"; /* fa-chevron-left */
}

html[dir="rtl"] .btn-primary .fa-arrow-right::before {
    content: "\f060"; /* fa-arrow-left */
}

/* ============================================
   SECTION 1: EXCLUSIVE LISTINGS (Featured)
   ============================================ */
.section-featured {
    background-color: #FFFFFF;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* Featured Card (Compass Style - Clean, Whitespace) */
.featured-card {
    background: #FFFFFF;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.featured-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Image Container (4:3 Aspect Ratio) */
.featured-image {
    position: relative;
    inline-size: 100%;
    padding-block-end: 75%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.featured-image img {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.05);
}

.featured-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    color: #cccccc;
}

/* Property Info (Minimalist) */
.featured-info {
    padding: 24px;
}

.featured-price {
    font-size: 24px;
    font-weight: 700;
    color: #000000;
    margin-block-end: 8px;
}

.featured-title {
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    margin-block-end: 8px;
    line-height: 1.4;
}

.featured-address {
    font-size: 14px;
    font-weight: 400;
    color: #666666;
    margin-block-end: 16px;
}

/* Meta (Beds/Baths/Area - Houzez Icons for RTL Compatibility) */
.featured-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    padding-block-start: 16px;
    border-block-start: 1px solid #f0f0f0;
}

.property-card-meta {
    padding-block-start: 16px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #666666;
}

/* Houzez Icon Styling for Property Cards */
.meta-item .meta-icon {
    font-size: 16px;
    color: #999999;
    line-height: 1;
    flex-shrink: 0;
}

/* Meta Value (Number) */
.meta-item .meta-value {
    font-weight: 600;
    color: #333333;
}

/* Meta Label (Text) */
.meta-item .meta-label {
    font-weight: 400;
    color: #888888;
    font-size: 13px;
}

/* Legacy SVG Icons (Fallback) */
.meta-item svg {
    color: #999999;
    flex-shrink: 0;
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SECTION 2: EXPLORE BY LOCATION
   ============================================ */
.section-locations {
    background-color: #f9f9f9;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* Location Card (Full Background Image) */
.location-card {
    position: relative;
    display: block;
    block-size: 320px;
    border-radius: 6px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.location-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.5));
    transition: background 0.3s ease;
}

.location-card:hover .location-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
}

.location-content {
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    inline-size: 100%;
    padding: 24px;
    color: #FFFFFF;
    z-index: 2;
}

.location-name {
    font-size: 28px;
    font-weight: 700;
    color: #FFFFFF;
    margin-block-end: 4px;
}

.location-count {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .locations-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   SECTION 3: PROPERTY TYPES (Quick Links Strip)
   ============================================ */
.section-types {
    background-color: #FFFFFF;
    padding-block: 60px;
}

.types-strip {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
}

.type-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0; /* Gap removed - using margin-top on label instead */
    text-decoration: none;
    color: #000000;
    transition: transform 0.2s ease, color 0.2s ease;
}

.type-item:hover {
    transform: translateY(-4px);
    color: #0061DF;
}

.type-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 72px;
    block-size: 72px;
    border-radius: 50%;
    background-color: #f5f5f5;
    transition: background-color 0.2s ease;
}

.type-item:hover .type-icon {
    background-color: #e8f2ff;
}

.type-label {
    font-family: var(--font-main) !important;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
    color: #000000;
    transition: color 0.2s ease;
}

.type-item:hover .type-label {
    color: #0061ff;
}

/* Mobile: 3 columns */
@media (max-width: 767px) {
    .types-strip {
        gap: 24px;
    }
    
    .type-icon {
        inline-size: 60px;
        block-size: 60px;
    }
    
    .type-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* ============================================
   SECTION 4: SELLER CTA
   ============================================ */
.section-cta {
    background-color: #f9f9f9;
    padding-block: 60px;
}

.cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    max-inline-size: 1000px;
    margin-inline: auto;
    padding: 48px;
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.cta-text {
    flex: 1;
}

.cta-title {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    font-weight: 700;
    color: #000000;
    margin-block-end: 8px;
    letter-spacing: -0.5px;
}

.cta-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #666666;
}

.cta-action {
    flex-shrink: 0;
}

/* Mobile: Stack */
@media (max-width: 767px) {
    .cta-content {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }
}

/* ============================================
   SECTION 5: WHY CHOOSE US (Trust Signals)
   ============================================ */
.section-trust {
    background-color: #FFFFFF;
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 48px;
}

.trust-item {
    text-align: center;
}

.trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    inline-size: 80px;
    block-size: 80px;
    margin-inline: auto;
    margin-block-end: 24px;
    border-radius: 50%;
    background-color: #f5f5f5;
    color: #0061DF;
}

.trust-title {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin-block-end: 12px;
}

.trust-description {
    font-size: 15px;
    font-weight: 400;
    color: #666666;
    line-height: 1.6;
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* ============================================
   SECTION 6: LATEST NEWS (Market Insights)
   ============================================ */
.section-news {
    background-color: #f9f9f9;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
}

/* News Card */
.news-card {
    background: #FFFFFF;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.news-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.news-image {
    position: relative;
    inline-size: 100%;
    padding-block-end: 60%;
    overflow: hidden;
    background-color: #f5f5f5;
}

.news-image img {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0;
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 24px;
}

.news-date {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #999999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-block-end: 8px;
}

.news-title {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-block-end: 12px;
    line-height: 1.4;
}

.news-excerpt {
    font-size: 14px;
    font-weight: 400;
    color: #666666;
    line-height: 1.6;
    margin-block-end: 16px;
}

.news-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-main) !important;
    font-size: 14px;
    font-weight: 600 !important;
    color: #0061ff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.news-readmore:hover {
    color: #0052C2;
    gap: 10px;
}

.news-readmore .readmore-arrow {
    transition: transform 0.3s ease;
}

/* RTL: Flip arrow direction */
html[dir="rtl"] .news-readmore .readmore-arrow {
    transform: scaleX(-1);
}

/* Mobile: 1 column */
@media (max-width: 767px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   NO RESULTS MESSAGE
   ============================================ */
.no-results {
    text-align: center;
    padding: 48px 24px;
    font-size: 16px;
    color: #666666;
}

/* ============================================
   RTL SUPPORT FOR NEW SECTIONS
   ============================================ */
html[dir="rtl"] .meta-item,
html[dir="rtl"] .trust-item,
html[dir="rtl"] .news-readmore {
    direction: rtl;
}

html[dir="rtl"] .types-strip {
    direction: rtl;
}

html[dir="rtl"] .type-label {
    direction: rtl;
    text-align: center;
    font-family: var(--font-arabic) !important;
}

html[dir="rtl"] .cta-content {
    flex-direction: row-reverse;
}

@media (max-width: 767px) {
    html[dir="rtl"] .cta-content {
        flex-direction: column;
    }
}

/* ============================================
   ARABIC TYPOGRAPHY
   ============================================ */
html[dir="rtl"] .section-title,
html[dir="rtl"] .featured-title,
html[dir="rtl"] .location-name,
html[dir="rtl"] .cta-title,
html[dir="rtl"] .trust-title,
html[dir="rtl"] .news-title {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
}

html[dir="rtl"] .section-subtitle,
html[dir="rtl"] .featured-address,
html[dir="rtl"] .trust-description,
html[dir="rtl"] .news-excerpt {
    font-family: 'Cairo', sans-serif;
    font-weight: 400;
}

/* ============================================
   ARABIC HEADINGS ALIGNMENT (Force Center)
   ============================================ */
/* 
 * Critical Fix: Arabic headings must be centered like English/French
 * By default, RTL causes text-align: start to become right-aligned
 * We explicitly force center alignment for all section titles
 */
html[dir="rtl"] .section-title,
html[dir="rtl"] .section-header,
html[dir="rtl"] h2,
html[dir="rtl"] .module-title,
html[dir="rtl"] .cta-title {
    text-align: center !important;
}

/* Ensure section header container is centered */
html[dir="rtl"] .section-header {
    margin-inline: auto;
    text-align: center !important;
}

/* Subtitle and description should also be centered */
html[dir="rtl"] .section-subtitle,
html[dir="rtl"] .section-description {
    text-align: center !important;
    margin-inline: auto;
}

/* Trust items are already centered, but reinforce */
html[dir="rtl"] .trust-item {
    text-align: center !important;
}
