/* ==========================================================================
   CINEMATIC HERO CONTAINER (HOMEPAGE & INNER HEADER MODULES)
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 650px;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Changed to left-aligned start */
    overflow: hidden;
    background-color: var(--color-text-primary);
}

.hero-slider-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-slide.active {
    opacity: 1.0; /* Full opacity to make the beautiful cinematic video vibrant and pop */
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%; /* Centering the Burj Khalifa tower body and spire elegantly */
}

.hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(10, 10, 10, 0.7) 0%, 
        rgba(10, 10, 10, 0.45) 40%, 
        rgba(10, 10, 10, 0.15) 75%, 
        rgba(10, 10, 10, 0) 100%
    ); /* Make overlay much more transparent on the right to show video clearly */
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    color: var(--color-bg-primary);
    text-align: left; /* Sidebar aligned */
    max-width: 580px; /* Sidebar limit */
    margin-left: 8%; /* Off the left edge */
    margin-right: auto;
    padding: 0 var(--space-md);
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Sidebar align start */
}

.hero-pretitle {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    color: var(--color-gold-sand);
    margin-bottom: var(--space-xs);
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    display: inline-block;
}

.hero-title {
    font-family: 'Playfair Display', serif; /* Elegant luxury serif - matches premium real estate brand */
    font-size: clamp(3.5rem, 7.8vw, 6.8rem);
    margin-bottom: 0;
    line-height: 1.05;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.01em;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8), 0 2px 8px rgba(0, 0, 0, 0.6);
    font-style: italic; /* Premium italic gives luxury editorial feel */
}

/* Animated decorative divider line between title and subtitle */
.hero-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    width: 100%;
    max-width: 420px;
    opacity: 0;
    animation: heroLineReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.2s forwards;
}

@keyframes heroLineReveal {
    0% { opacity: 0; transform: translateX(-20px); }
    100% { opacity: 1; transform: translateX(0); }
}

.hero-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--color-gold-sand), rgba(212, 184, 140, 0));
    position: relative;
    overflow: hidden;
}

.hero-divider-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.8), transparent);
    animation: shimmerLine 2.5s ease-in-out 2.2s infinite;
}

@keyframes shimmerLine {
    0% { left: -100%; }
    100% { left: 200%; }
}

.hero-divider-diamond {
    width: 7px;
    height: 7px;
    background: var(--color-gold-sand);
    transform: rotate(45deg);
    flex-shrink: 0;
    animation: pulseDiamond 2s ease-in-out 2s infinite;
}

@keyframes pulseDiamond {
    0%, 100% { opacity: 1; transform: rotate(45deg) scale(1); }
    50% { opacity: 0.6; transform: rotate(45deg) scale(1.3); }
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
    max-width: 500px;
    letter-spacing: 0.04em;
    line-height: 1.65;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 0.6);
    text-transform: uppercase;
    font-family: var(--font-body);
    font-size: clamp(0.7rem, 1.4vw, 0.9rem);
    letter-spacing: 0.18em;
}

.hero-buttons {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    justify-content: flex-start; /* Sidebar align */
}

/* Overhauled Unified Floating Search Bar Capsule */
.search-widget {
    position: relative;
    margin-top: -55px; /* Float elegantly on top of the hero transitions */
    z-index: 10;
    padding: 0 var(--space-md);
}

.search-deck {
    background: rgba(15, 15, 15, 0.65);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(212, 184, 140, 0.25); /* sand-gold border */
    padding: 8px 10px 8px 24px;
    border-radius: 100px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    transition: var(--transition-smooth);
}

.search-divider {
    width: 1px;
    height: 28px;
    background-color: rgba(212, 184, 140, 0.25); /* sand-gold divider */
    flex-shrink: 0;
}

.search-select-container {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-select-custom {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 10px 30px 10px 5px;
    font-size: 0.88rem;
    font-weight: 500;
    width: 100%;
    color: #ffffff; /* White dropdown text */
    transition: var(--transition-smooth);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23D4B88C' stroke-width='2.5' viewBox='0 0 24 24'><polyline points='6 9 12 15 18 9'/></svg>"); /* Gold dropdown indicator */
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.search-select-custom option {
    background-color: #0c0c0e; /* Clean background for readable dropdown list */
    color: #ffffff;
}

.search-select-custom:focus {
    outline: none;
    box-shadow: none;
}

.search-pill-btn {
    background: linear-gradient(135deg, var(--color-gold) 0%, var(--color-gold-light) 100%);
    color: #ffffff !important;
    border-radius: 100px;
    padding: 12px 36px;
    border: none;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 24px rgba(184, 144, 71, 0.25);
    flex-shrink: 0;
}

.search-pill-btn:hover {
    background: linear-gradient(135deg, var(--color-gold-dark) 0%, var(--color-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(184, 144, 71, 0.35);
}

.search-pill-btn svg {
    width: 15px;
    height: 15px;
    stroke-width: 2.5;
}

@media (max-width: 767px) {
    .hero-section {
        justify-content: center; /* Center-align on mobile view */
    }
    .hero-content {
        text-align: center;
        align-items: center;
        margin-left: 0;
        max-width: 100%;
    }
    .hero-buttons {
        justify-content: center;
    }
    .hero-overlay {
        background: linear-gradient(to bottom, 
            rgba(10, 10, 10, 0.55) 0%, 
            rgba(10, 10, 10, 0.25) 50%, 
            rgba(10, 10, 10, 0.6) 100%
        ); /* Much more transparent vertical mask to let the video shine on mobile */
    }
    .search-widget {
        margin-top: -30px;
    }
    .search-deck {
        flex-direction: column;
        border-radius: var(--radius-lg);
        padding: 20px;
        gap: var(--space-sm);
        background: rgba(15, 15, 15, 0.85);
    }
    .search-divider {
        display: none;
    }
    .search-select-custom {
        background-color: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(212, 184, 140, 0.2);
        border-radius: var(--radius-md);
        padding: 12px 35px 12px 15px !important;
        color: #ffffff;
    }
    .search-pill-btn {
        width: 100%;
        justify-content: center;
    }
}


/* ==========================================================================
   INNER PAGE HEADER (PENTHOUSE BANNER)
   ========================================================================== */
.page-header {
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    padding: calc(var(--nav-height) + var(--space-lg)) 0 var(--space-xl);
    position: relative;
    overflow: hidden;
}

.page-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.2;
    z-index: 1;
}

.page-header-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-weight: 400;
    margin-bottom: var(--space-xs);
}

.page-header h1 span {
    font-family: var(--font-serif-sub);
    font-style: italic;
    color: var(--color-gold-light);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-gold-light);
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.6);
}

.breadcrumbs a:hover {
    color: var(--color-bg-primary);
}


/* ==========================================================================
   PAGE: ABOUT US MODULES
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 992px) {
    .about-grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.about-img-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 480px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-medium);
}

.about-img-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CEO Showcase Block */
.ceo-section {
    background-color: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.ceo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: center;
}

@media (min-width: 768px) {
    .ceo-grid {
        grid-template-columns: 0.8fr 1.2fr;
    }
}

.ceo-img-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 420px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-medium);
}

.ceo-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ceo-quote {
    font-family: var(--font-serif-sub);
    font-size: 1.35rem;
    font-style: italic;
    color: var(--color-emerald);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
    position: relative;
    padding-left: var(--space-md);
    border-left: 3px solid var(--color-gold);
}

.ceo-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.ceo-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-gold);
    font-weight: 700;
}


/* ==========================================================================
   PAGE: SERVICES GRID & SPECS
   ========================================================================== */
.services-detail-block {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    align-items: center;
    margin-bottom: var(--space-xl);
}

@media (min-width: 992px) {
    .services-detail-block {
        grid-template-columns: 1fr 1fr;
    }
    .services-detail-block.reverse {
        direction: rtl;
    }
    .services-detail-block.reverse .services-detail-content {
        direction: ltr;
    }
}

.services-detail-img {
    height: 380px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--color-border);
}

.services-detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.services-detail-content h3 {
    font-size: 1.8rem;
    margin-bottom: var(--space-sm);
}

.services-detail-content p {
    margin-bottom: var(--space-md);
}

.services-features-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.service-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.service-feature-item svg {
    color: var(--color-gold);
}


/* ==========================================================================
   PAGE: DYNAMIC LISTING MODULES
   ========================================================================== */
.listings-filter-bar {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.filter-pill {
    padding: 8px 18px;
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-pill.active, .filter-pill:hover {
    background-color: var(--color-emerald);
    color: var(--color-bg-primary);
    border-color: var(--color-emerald);
}

.listings-sort select {
    background-color: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
}


/* ==========================================================================
   PAGE: PROPERTIES LOCATION REGIONAL PORTALS
   ========================================================================== */
.location-hero {
    height: 70vh;
    min-height: 500px;
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.location-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.45;
    z-index: 1;
}

.location-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.location-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.location-hero-content h1 {
    font-weight: 400;
    margin-bottom: var(--space-sm);
}

.location-hero-content h1 span {
    font-family: var(--font-serif-sub);
    font-style: italic;
    color: var(--color-gold-light);
}

.location-highlights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

@media (min-width: 768px) {
    .location-highlights-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.highlight-stat-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--color-bg-primary);
}

.highlight-stat-card .stat-val {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-gold-light);
    margin-bottom: 2px;
}

.highlight-stat-card .stat-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.7);
}

/* Image grid styling */
.photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

@media (min-width: 768px) {
    .photo-gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .photo-gallery-grid .gallery-item:nth-child(1) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 200px;
    border: 1px solid var(--color-border);
    position: relative;
}

@media (min-width: 768px) {
    .photo-gallery-grid .gallery-item:nth-child(1) {
        height: 416px;
    }
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}


/* ==========================================================================
   PAGE: CAREERS & PORTALS
   ========================================================================== */
.career-hero-cta {
    background-color: var(--color-emerald);
    color: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    border: 1px solid var(--color-gold-light);
    box-shadow: var(--shadow-luxury);
    margin-top: var(--space-xl);
}

@media (min-width: 768px) {
    .career-hero-cta {
        padding: var(--space-xl);
    }
}

.career-hero-cta h2 {
    color: var(--color-bg-primary);
    margin-bottom: var(--space-sm);
}

.career-hero-cta p {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto var(--space-md);
}


/* ==========================================================================
   PAGE: CONTACT & MAP
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
}

@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 0.9fr 1.1fr;
    }
}

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.channel-card {
    background-color: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.channel-icon {
    width: 48px;
    height: 48px;
    background-color: var(--color-emerald-trans);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-emerald);
    flex-shrink: 0;
}

.channel-info h4 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 4px;
}

.channel-info p {
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.channel-info a {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-emerald);
}

.channel-info a:hover {
    color: var(--color-gold);
}

.map-container {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-medium);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==========================================================================
   RESPONSIVE LAYOUT OVERRIDES (PREVENT TEXT TOUCHING VIEWPORT MARGINS)
   ========================================================================== */
@media (max-width: 768px) {
    .section.container {
        padding-left: var(--space-md) !important;
        padding-right: var(--space-md) !important;
    }
    
    /* Override inline spacings on elements to prevent content compression on narrow viewports */
    div[style*="padding: var(--space-xl)"],
    div[style*="padding: var(--space-lg)"],
    section[style*="padding: var(--space-xl)"],
    section[style*="padding: var(--space-lg)"],
    div[style*="padding:var(--space-xl)"],
    div[style*="padding:var(--space-lg)"] {
        padding: var(--space-md) !important;
    }

    div[style*="padding: 15px"],
    div[style*="padding:15px"] {
        padding: 12px !important;
    }

    .about-grid, .ceo-grid {
        gap: var(--space-md) !important;
    }
    
    .grid, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
        gap: var(--space-md) !important;
    }
    
    /* Ensure tables scale nicely on tiny screens */
    table th, table td {
        padding: 8px 6px !important;
        font-size: 0.78rem !important;
    }
}
