/**
 * Sokna Elite Property Template Styles - LUXURY EDITION
 * Compass.com Aesthetic: Minimalist, High Contrast, Luxurious
 * 
 * Design Principles:
 * - Premium luxury digital brochure experience
 * - Generous whitespace (luxury feeling)
 * - Floating card designs with elegant shadows
 * - Sophisticated typography with perfect spacing
 * - Clean sans-serif fonts
 * - High contrast black/white with royal blue accents
 * - Smooth transitions and hover effects
 */

/* ============================================
   GLOBAL LUXURY ENHANCEMENTS
   ============================================ */

html {
    scroll-behavior: smooth;
}

body.single-property {
    background: #fafafa;
}

/* Elegant selection color */
::selection {
    background: #0061DF;
    color: #ffffff;
}

::-moz-selection {
    background: #0061DF;
    color: #ffffff;
}

/* ============================================
   HERO GALLERY SECTION (LUXURY UPGRADE)
   ============================================ */

.sokna-hero-gallery {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #FFFFFF;
}

.hero-gallery-container {
    width: 100%;
}

.hero-main-image {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: opacity 0.5s ease;
}

/* LUXURY UPGRADE: Gradient Overlay for smooth text transition */
.hero-main-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
    pointer-events: none;
    z-index: 1;
}

.property-status-badge {
    position: absolute;
    top: 30px;
    inset-inline-start: 30px;
    background: #0061DF;
    color: #FFFFFF;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 97, 223, 0.3);
}

.hero-thumbnails {
    display: flex;
    gap: 15px;
    padding: 30px 0;
    overflow-x: auto;
    max-width: 1400px;
    margin: 0 auto;
    scrollbar-width: thin;
    scrollbar-color: #E0E0E0 transparent;
}

/* LUXURY UPGRADE: Elegant thumbnail styling */
.hero-thumbnails > div {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-thumbnails > div:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hero-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.hero-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.hero-thumbnails::-webkit-scrollbar-thumb {
    background: #E0E0E0;
    border-radius: 4px;
}

.hero-thumbnails::-webkit-scrollbar-thumb:hover {
    background: #CCCCCC;
}

/* ============================================
   MAIN CONTENT AREA - LUXURY UPGRADE
   ============================================ */

.sokna-property-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 30px;
    background: #ffffff;
}

/* Flex-based 2-column layout with clean RTL support */
.content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    align-items: start;
}

/* Bootstrap standard proportions: col-md-8 (66.67%) and col-md-4 (33.33%) */
.main-property-info {
    flex: 0 0 calc(66.666667% - 30px);
    max-width: calc(66.666667% - 30px);
}

.property-sidebar {
    flex: 0 0 calc(33.333333% - 30px);
    max-width: calc(33.333333% - 30px);
    padding-inline-start: 30px;
}

/* ============================================
   MAIN PROPERTY INFO (LEFT COLUMN)
   ============================================ */

.main-property-info {
    width: 100%;
}

.main-property-info h1 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 20px 0;
    line-height: 1.2;
    letter-spacing: -0.5px;
    /* Font inherited from global.css (IBM Plex Sans Arabic) */
}

/* LUXURY UPGRADE: Address Styling */
.main-property-info > p:first-of-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    color: #666666;
    margin: 0 0 30px 0;
    font-weight: 400;
    padding: 12px 0;
    border-bottom: 1px solid #eeeeee;
}

.main-property-info > p:first-of-type svg {
    color: #0061DF;
    flex-shrink: 0;
}

.main-property-info h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 30px 0;
    letter-spacing: -0.5px;
    /* Font inherited from global.css (IBM Plex Sans Arabic) */
    position: relative;
    padding-bottom: 15px;
}

/* LUXURY UPGRADE: Elegant underline for section headings */
.main-property-info h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #0061DF, transparent);
    border-radius: 2px;
}

[dir="rtl"] .main-property-info h2::after {
    background: linear-gradient(270deg, #0061DF, transparent);
}

/* Price Display - LUXURY UPGRADE */
.main-property-info > div:nth-of-type(3) {
    /* Legacy: targets price row when it is the third block */
    margin: 40px 0 50px 0;
}

/* Price row: margin; flex/gap from global .sokna-price-row */
.sokna-price-row {
    margin: 40px 0 50px 0;
}

/* Tighter line-height so flex align-items: center matches visual middle of numbers */
.sokna-price-value {
    font-size: 48px;
    font-weight: 700;
    color: #000000;
    letter-spacing: -1px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    align-self: center;
}

/* Property Meta Grid - LUXURY DETAIL CARDS (Vertical Layout) */
.property-meta-luxury {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 60px;
}

.luxury-detail-card {
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    min-height: 140px;
    justify-content: center;
}

.luxury-detail-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

/* Icon on Top */
.luxury-detail-card i {
    font-size: 32px;
    color: #0061ff;
    transition: transform 0.3s ease, color 0.3s ease;
}

.luxury-detail-card:hover i {
    transform: scale(1.15);
    color: #0052C2;
}

/* Value (Number) */
.luxury-detail-value {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    line-height: 1;
}

/* Label (Text) */
.luxury-detail-label {
    font-size: 13px;
    font-weight: 500;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* LUXURY UPGRADE: Description Styling with Better Readability */
.main-property-info > div:nth-of-type(4) {
    /* Description container */
    line-height: 1.8;
    color: #333333;
    font-size: 18px;
}

.main-property-info > div:nth-of-type(4) p {
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Features & Amenities Grid - LUXURY ICON GRID */
.property-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #f8f9fa;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #333333;
    transition: all 0.3s ease;
    cursor: default;
}

.feature-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.feature-item i {
    font-size: 20px;
    color: #0061ff;
    flex-shrink: 0;
    transition: transform 0.3s ease, color 0.3s ease;
}

.feature-item:hover i {
    transform: scale(1.15);
    color: #0052C2;
}

.feature-item span {
    line-height: 1.4;
    flex: 1;
}

/* Property Details Grid - LUXURY UPGRADE */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 60px;
}

.details-grid > div {
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 20px;
    transition: border-color 0.3s ease;
}

.details-grid > div:hover {
    border-color: #0061DF;
}

/* ============================================
   STICKY SIDEBAR (RIGHT COLUMN) - LUXURY UPGRADE
   ============================================ */

.property-sidebar {
    position: sticky;
    top: 100px;
}

/* LUXURY UPGRADE: Floating Card Design */
.agent-contact-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    width: 100%; /* Ensure card fills sidebar */
}

.agent-contact-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.agent-contact-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 30px 0;
    /* Font inherited from global.css (IBM Plex Sans Arabic) */
    line-height: 1.3;
}

/* LUXURY UPGRADE: Agent Information Styling */
.agent-contact-card > div:last-child {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-top: 30px;
}

.agent-contact-card > div:last-child > div:first-child {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999999;
}

.agent-contact-card > div:last-child > div:nth-child(2) {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 10px 0 15px 0;
}

.agent-contact-card > div:last-child > div:not(:first-child):not(:nth-child(2)) {
    padding: 8px 0;
    border-bottom: 1px solid #eeeeee;
    transition: padding-left 0.3s ease;
}

.agent-contact-card > div:last-child > div:not(:first-child):not(:nth-child(2)):hover {
    padding-inline-start: 5px;
}

/* Form Styles - LUXURY UPGRADE */
.agent-contact-card form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.agent-contact-card input,
.agent-contact-card textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #e8e8e8;
    background: #fafafa;
    font-size: 16px;
    font-family: inherit;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.agent-contact-card input:focus,
.agent-contact-card textarea:focus {
    outline: none;
    border-color: #0061DF;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 97, 223, 0.1);
}

.agent-contact-card textarea {
    resize: vertical;
    min-height: 120px;
}

/* LUXURY UPGRADE: Premium Button Styling */
.agent-contact-card button[type="submit"] {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #0061DF 0%, #0052C2 100%);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 97, 223, 0.3);
    position: relative;
    overflow: hidden;
}

.agent-contact-card button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.agent-contact-card button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 97, 223, 0.4);
}

.agent-contact-card button[type="submit"]:hover::before {
    left: 100%;
}

.agent-contact-card button[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 97, 223, 0.3);
}

/* ============================================
   RTL SUPPORT - LUXURY REFINEMENTS
   ============================================ */

/**
 * SURGICAL LAYOUT FIX: Float-based positioning for RTL
 * Bypasses all Flexbox/Grid conflicts from parent theme
 * Uses traditional float layout - the "old reliable" method
 */

/* Kill any conflicting Flexbox logic in RTL */
body.rtl .sokna-property-content .row {
    display: block !important;
}

/* Move Sidebar to LEFT in RTL */
body.rtl .sokna-property-content .col-md-4 {
    float: left !important; /* Sidebar on left */
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-right: 30px !important; /* Space between sidebar and content */
}

/* Move Content to RIGHT in RTL */
body.rtl .sokna-property-content .col-md-8 {
    float: right !important; /* Content on right */
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Clearfix to prevent layout collapse */
body.rtl .sokna-property-content .row::after {
    content: "";
    clear: both;
    display: table;
}

/* Mobile: Disable float on small screens */
@media (max-width: 768px) {
    body.rtl .sokna-property-content .col-md-4,
    body.rtl .sokna-property-content .col-md-8 {
        float: none !important;
        width: 100% !important;
        margin-right: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* Text direction and alignment */
[dir="rtl"] .main-property-info,
[dir="rtl"] .property-sidebar {
    direction: rtl;
    text-align: start;
}

[dir="rtl"] .property-status-badge {
    inset-inline-start: auto;
    inset-inline-end: 30px;
}

[dir="rtl"] .hero-thumbnails {
    direction: rtl;
}

/* RTL UPGRADE: Arabic Font Boldness */
[dir="rtl"] .main-property-info h1,
[dir="rtl"] .main-property-info h2,
[dir="rtl"] .main-property-info h3,
[dir="rtl"] .agent-contact-card h3 {
    /* Font inherited from global.css (IBM Plex Sans Arabic) */
    font-weight: 700;
}

[dir="rtl"] .main-property-info > div:nth-of-type(3) {
    /* Price in Arabic - Font inherited from global.css (IBM Plex Sans Arabic) */
    font-weight: 800;
}

/* RTL UPGRADE: Luxury Detail Cards (Icon remains centered on top) */
[dir="rtl"] .luxury-detail-card {
    /* Cards are already centered, no changes needed for RTL */
    text-align: center;
}

/* RTL UPGRADE: Features Grid - Icon moves to right of text */
[dir="rtl"] .property-features-grid .feature-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .property-features-grid .feature-item i {
    margin-inline-start: 14px;
    margin-inline-end: 0;
}

/* RTL UPGRADE: Form Styling */
[dir="rtl"] .agent-contact-card input,
[dir="rtl"] .agent-contact-card textarea {
    text-align: right;
    direction: rtl;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet: 1024px and below */
@media (max-width: 1024px) {
    .content-grid {
        flex-direction: column !important;
        gap: 40px !important;
    }
    
    .main-property-info,
    .property-sidebar {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding-inline-start: 0 !important;
    }
    
    .property-sidebar {
        position: relative !important;
        top: 0 !important;
    }
    
    .sokna-property-content {
        padding: 60px 20px;
    }
    
    .property-meta-luxury {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 16px;
    }
    
    .luxury-detail-card {
        padding: 24px 16px;
        min-height: 120px;
    }
    
    .luxury-detail-card i {
        font-size: 28px;
    }
    
    .luxury-detail-value {
        font-size: 24px;
    }
    
    .luxury-detail-label {
        font-size: 12px;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Mobile: 768px and below */
@media (max-width: 768px) {
    .hero-main-image {
        height: 50vh !important;
        min-height: 400px !important;
    }
    
    .hero-thumbnails {
        padding: 20px 0 !important;
        gap: 10px;
    }
    
    .sokna-property-content {
        padding: 40px 20px;
    }
    
    .main-property-info h1 {
        font-size: 28px;
    }
    
    .main-property-info h2 {
        font-size: 24px;
    }
    
    .main-property-info > div:nth-of-type(3) {
        /* Price */
        font-size: 36px;
        margin: 30px 0 40px 0;
    }
    
    .property-meta-luxury {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 40px;
    }
    
    .luxury-detail-card {
        padding: 20px 12px;
        min-height: 110px;
    }
    
    .luxury-detail-card i {
        font-size: 24px;
    }
    
    .luxury-detail-value {
        font-size: 22px;
    }
    
    .luxury-detail-label {
        font-size: 11px;
    }
    
    .property-features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .feature-item {
        padding: 14px 16px;
        font-size: 14px;
    }
    
    .feature-item i {
        font-size: 18px;
    }
    
    .agent-contact-card {
        padding: 30px 20px;
    }
    
    .property-status-badge {
        top: 20px;
        inset-inline-start: 20px;
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* Small Mobile: 480px and below */
@media (max-width: 480px) {
    .hero-main-image {
        height: 40vh !important;
        min-height: 300px !important;
    }
    
    .main-property-info h1 {
        font-size: 24px;
    }
    
    .main-property-info > div:nth-of-type(3) {
        /* Price */
        font-size: 28px;
    }
    
    .property-meta-luxury {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .luxury-detail-card {
        padding: 18px 10px;
        min-height: 100px;
    }
    
    .luxury-detail-card i {
        font-size: 22px;
    }
    
    .luxury-detail-value {
        font-size: 20px;
    }
    
    .luxury-detail-label {
        font-size: 10px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .property-sidebar,
    .hero-thumbnails,
    .property-status-badge {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: 1fr !important;
    }
    
    .hero-main-image {
        height: 400px !important;
        break-inside: avoid;
    }
}

