/* ==========================================================================
   Ranjeet Associates — Luxury Real Estate & Architectural Stylesheet
   Version: 3.0 (Optimized, Modular & Reusable Component Architecture)
   ========================================================================== */

/* Core Typography & Resets */
body {
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
::selection {
    background: #e3cb84;
    color: #0a1626;
}
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f4f0e7;
}
::-webkit-scrollbar-thumb {
    background: #d4b157;
    border-radius: 10px;
}

/* Luxury Header & Navigation */
#navbar {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(19, 34, 56, 0.06);
    transition: all 0.45s ease;
}
#navbar.is-scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 14px 40px -26px rgba(19, 34, 56, 0.45);
    border-bottom-color: rgba(193, 154, 52, 0.3);
}
.nav-shell {
    height: 5.25rem;
    transition: height 0.45s ease;
}
#navbar.is-scrolled .nav-shell {
    height: 4.5rem;
}
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -7px;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #c19a34, #e3cb84);
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}
.nav-link.active {
    color: #a37e26;
}
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
#mobileMenu.open {
    max-height: 34rem;
}

/* Architectural Design Patterns & Rules */
.grid-pattern {
    background-image: linear-gradient(rgba(19, 34, 56, 0.045) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(19, 34, 56, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
}
.gold-rule {
    width: 68px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #c19a34, #e3cb84);
}
.text-gold-grad {
    background: linear-gradient(92deg, #a37e26 0%, #c19a34 45%, #82621d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Premium Buttons & Interactive States */
.btn-gold {
    background: linear-gradient(135deg, #e3cb84 0%, #c19a34 100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
    position: relative;
    overflow: hidden;
}
.btn-gold::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}
.btn-gold:hover::before {
    transform: translateX(100%);
}
.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px -14px rgba(193, 154, 52, 0.85);
}
.btn-outline-navy {
    border: 1px solid rgba(19, 34, 56, 0.28);
    color: #132238;
    transition: all 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn-outline-navy:hover {
    background: #132238;
    color: #ffffff;
    border-color: #132238;
    transform: translateY(-3px);
}

/* Floating & 3D Tilt Animations */
.float-card {
    transform-style: preserve-3d;
    animation: floatCard 6s ease-in-out infinite;
}
@keyframes floatCard {
    0%, 100% { transform: translateY(0) rotateY(-8deg) rotateX(4deg); }
    50% { transform: translateY(-18px) rotateY(-4deg) rotateX(2deg); }
}
.float-slow {
    animation: floatSlow 8s ease-in-out infinite;
}
@keyframes floatSlow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease;
    will-change: transform;
}
.tilt-card:hover {
    box-shadow: 0 34px 60px -32px rgba(19, 34, 56, 0.35);
}
.tilt-shine {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.45) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}
.tilt-card:hover .tilt-shine {
    opacity: 1;
}

/* Reveal on Scroll */
.reveal {
    opacity: 1;
    transform: none;
}
html.js-ready .reveal:not(.in-view) {
    opacity: 0;
    transform: translateY(28px);
}
html.js-ready .reveal.in-view {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Hover Lift & Zoom Wrappers */
.card-lift {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease, border-color 0.5s ease;
}
.card-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 34px 60px -30px rgba(19, 34, 56, 0.32);
    border-color: rgba(212, 177, 87, 0.6);
}
.zoom-wrap {
    overflow: hidden;
}
.zoom-wrap img {
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.zoom-wrap:hover img {
    transform: scale(1.07);
}
.marquee-track {
    display: flex;
    gap: 3rem;
    width: max-content;
    animation: marquee 40s linear infinite;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Back to Top Floating Button */
#toTop {
    transition: opacity 0.4s ease, transform 0.4s ease;
}
#toTop.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.glass-dark {
    background: rgba(255, 255, 255, 0.05);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.4s ease;
}
.glass-dark:hover {
    border-color: rgba(212, 177, 87, 0.5);
}

/* ==========================================================================
   Interactive Luxury Gallery System (Properties & Projects)
   ========================================================================== */
.ra-gallery-container {
    background: #ffffff;
    border-radius: 0.125rem;
    overflow: hidden;
    border: 1px solid rgba(19, 34, 56, 0.08);
    box-shadow: 0 10px 30px -15px rgba(19, 34, 56, 0.07);
    margin-bottom: 2rem;
}

.ra-gallery-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background-color: #060e18;
}
@media (min-width: 640px) {
    .ra-gallery-stage { aspect-ratio: 16 / 10; }
}
@media (min-width: 1024px) {
    .ra-gallery-stage { aspect-ratio: 16 / 9; }
}

.ra-gallery-blur-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(24px) brightness(0.4);
    transform: scale(1.15);
    opacity: 0.85;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.ra-gallery-main-img {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-in;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.ra-gallery-stage:hover .ra-gallery-main-img {
    transform: scale(1.015);
}

.ra-gallery-badge-title {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 20;
    background: rgba(6, 14, 24, 0.9);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.875rem;
    border-radius: 0.125rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(193, 154, 52, 0.4);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    pointer-events: none;
    max-width: calc(100% - 7rem);
}

.ra-gallery-badge-counter {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 20;
    background: rgba(6, 14, 24, 0.9);
    color: #e3cb84;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 0.125rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(193, 154, 52, 0.3);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    pointer-events: none;
}

.ra-gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background: rgba(6, 14, 24, 0.8);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
    opacity: 0.9;
    cursor: pointer;
}
.ra-gallery-nav-btn:hover {
    background: #d4b157;
    color: #060e18;
    border-color: #d4b157;
    opacity: 1;
    transform: translateY(-50%) scale(1.08);
}
.ra-gallery-nav-prev { left: 0.75rem; }
.ra-gallery-nav-next { right: 0.75rem; }

.ra-gallery-zoom-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 20;
    background: rgba(6, 14, 24, 0.9);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.125rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(193, 154, 52, 0.4);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    cursor: pointer;
}
.ra-gallery-zoom-btn:hover {
    background: #d4b157;
    color: #060e18;
    border-color: #d4b157;
}
.ra-gallery-zoom-btn i {
    color: #e3cb84;
    transition: color 0.2s ease;
}
.ra-gallery-zoom-btn:hover i {
    color: #060e18;
}

.ra-gallery-thumb-carousel {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.ra-gallery-thumb-carousel::-webkit-scrollbar {
    display: none;
}

.ra-gallery-thumb-card {
    flex-shrink: 0;
    width: 9rem;
    height: 6rem;
    border-radius: 0.125rem;
    overflow: hidden;
    border: 2px solid rgba(19, 34, 56, 0.12);
    position: relative;
    cursor: pointer;
    background-color: #0a1626;
    transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 640px) {
    .ra-gallery-thumb-card {
        width: 11rem;
        height: 7rem;
    }
}
.ra-gallery-thumb-card.active {
    border-color: #c19a34;
    box-shadow: 0 4px 14px rgba(193, 154, 52, 0.35);
    transform: scale(1.02);
    outline: 2px solid rgba(193, 154, 52, 0.45);
}
.ra-gallery-thumb-card.inactive {
    border-color: rgba(19, 34, 56, 0.15);
    opacity: 0.82;
}
.ra-gallery-thumb-card.inactive:hover {
    border-color: #d4b157;
    opacity: 1;
    transform: translateY(-2px);
}
.ra-gallery-thumb-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.ra-gallery-thumb-card:hover img {
    transform: scale(1.08);
}

.ra-gallery-thumb-tag {
    position: absolute;
    top: 0.375rem;
    left: 0.375rem;
    background: #d4b157;
    color: #060e18;
    font-size: 0.5625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.125rem 0.375rem;
    border-radius: 0.125rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    pointer-events: none;
    z-index: 5;
}

.ra-gallery-thumb-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(6, 14, 24, 0.85);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.625rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 5;
}

.ra-gallery-scroll-arrow {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.125rem;
    border: 1px solid rgba(19, 34, 56, 0.15);
    background: #ffffff;
    color: #132238;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}
.ra-gallery-scroll-arrow:hover {
    background: #132238;
    color: #ffffff;
    border-color: #132238;
}

.ra-gallery-progress-track {
    width: 100%;
    height: 4px;
    background-color: rgba(19, 34, 56, 0.08);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 0.75rem;
}
.ra-gallery-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #c19a34, #e3cb84);
    border-radius: 9999px;
    transition: width 0.15s ease-out;
}

/* ==========================================================================
   Deep Zoomable Lightbox Modal System
   ========================================================================== */
.ra-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(4, 9, 16, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
}
.ra-lightbox-modal.hidden {
    display: none !important;
}

.ra-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem;
    background: rgba(6, 14, 24, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 20;
}

.ra-lightbox-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.125rem;
    background: #0a1626;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    cursor: pointer;
}
.ra-lightbox-btn:hover {
    background: #d4b157;
    color: #060e18;
    border-color: #d4b157;
}
.ra-lightbox-btn.btn-close {
    background: #b91c1c;
    color: #ffffff;
    border-color: #dc2626;
}
.ra-lightbox-btn.btn-close:hover {
    background: #dc2626;
}

.ra-lightbox-stage {
    position: relative;
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-user-select: none;
}

.ra-lightbox-img {
    max-width: 92vw;
    max-height: 82vh;
    object-fit: contain;
    transition: transform 0.15s ease-out;
    will-change: transform;
}

.ra-lightbox-nav-btn {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: rgba(6, 14, 24, 0.88);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    transition: all 0.2s ease;
    box-shadow: 0 14px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
}
.ra-lightbox-nav-btn:hover {
    background: #d4b157;
    color: #060e18;
    border-color: #d4b157;
    transform: scale(1.08);
}

.ra-lightbox-footer {
    padding: 0.625rem 1.5rem;
    background: rgba(6, 14, 24, 0.92);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #94a3b8;
    z-index: 20;
}

.ra-lightbox-mini-thumb {
    width: 3.5rem;
    height: 2.5rem;
    border-radius: 0.125rem;
    overflow: hidden;
    border: 2px solid transparent;
    flex-shrink: 0;
    transition: all 0.2s ease;
    cursor: pointer;
}
.ra-lightbox-mini-thumb.active {
    border-color: #d4b157;
    transform: scale(1.08);
}
.ra-lightbox-mini-thumb:hover {
    border-color: #e3cb84;
}

/* ==========================================================================
   Luxury Pagination System
   ========================================================================== */
.pagination-wrapper ul {
    display: inline-flex;
    gap: 0.375rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.pagination-wrapper li a,
.pagination-wrapper li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.125rem;
    border: 1px solid rgba(19, 34, 56, 0.15);
    color: #132238;
    background-color: #ffffff;
    text-decoration: none;
    transition: all 0.25s ease;
}
.pagination-wrapper li.active a,
.pagination-wrapper li.active span {
    background-color: #132238;
    color: #ffffff;
    border-color: #132238;
}
.pagination-wrapper li a:hover {
    background-color: #f7f3eb;
    border-color: #d4b157;
    color: #a37e26;
}

/* ==========================================================================
   Quick-View Modals & Global Overlays
   ========================================================================== */
#propertyModal, #projectModal {
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
#propertyModal .modal-panel, #projectModal .modal-panel {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
#propertyModal.hidden-modal, #projectModal.hidden-modal {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
#propertyModal.hidden-modal .modal-panel, #projectModal.hidden-modal .modal-panel {
    transform: translateY(26px) scale(0.97);
    opacity: 0;
}

/* ==========================================================================
   Reusable Specification Cards & Filter Components
   ========================================================================== */
.spec-metric-card {
    background: #ffffff;
    border: 1px solid rgba(19, 34, 56, 0.1);
    border-radius: 0.125rem;
    padding: 1rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.spec-metric-card:hover {
    border-color: rgba(193, 154, 52, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(19, 34, 56, 0.15);
}

.amenity-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: #faf8f3;
    border: 1px solid rgba(19, 34, 56, 0.08);
    border-radius: 0.125rem;
    font-size: 0.8125rem;
    color: #132238;
    transition: all 0.25s ease;
}
.amenity-chip:hover {
    border-color: #d4b157;
    background: #ffffff;
    transform: translateY(-1px);
}

.filter-chip {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.filter-chip.active {
    background: #132238;
    color: #ffffff;
    border-color: #132238;
}
.filter-chip.active i {
    color: #d4b157;
}

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: #eaeff7;
    border-radius: 2px;
    outline: none;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #c19a34;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 10px -2px rgba(19, 34, 56, 0.3);
    transition: transform 0.2s ease;
}
.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}
.range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #c19a34;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #ffffff;
}
.prop-card {
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.prop-card.hidden-card {
    display: none;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
.anim-in {
    animation: fadeInUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Frontend Utility & Component Classes (Replacing Inline Styles) */
.touch-none {
    touch-action: none;
}
.sidebar-logo-lg {
    max-height: 52px;
    object-fit: contain;
}
.sidebar-logo-sm {
    max-height: 48px;
    object-fit: contain;
}
.brochure-hero-cover {
    height: 380px;
}
.brochure-card-img {
    height: 190px;
}
.border-none {
    border: 0;
}
.page-header-banner {
    background-size: cover;
    background-position: center;
    position: relative;
}
.banner-overlay-dark {
    background-color: rgba(0, 0, 0, 0.6);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Reduced Motion Support for Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
