/* Custom styles extracted from the original Riviera website. */

html {
            scroll-behavior: smooth;
        }
        
        /* Dark Theme Default */
        body {
            background-color: #090b0e;
            color: #e2e8f0;
            font-family: 'Tajawal', sans-serif;
            overflow-x: hidden;
            letter-spacing: -0.2px;
            transition: background-color 0.4s ease, color 0.4s ease;
        }

        /* Light Theme Styles */
        html:not(.dark) body {
            background-color: #fcfbf8;
            color: #1e293b;
        }

        h1, h2, h3, .font-serif {
            font-family: 'Amiri', serif;
        }

        /* Metallic Gold Gradients */
        .text-gold-gradient {
            background: linear-gradient(135deg, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        html:not(.dark) .text-gold-gradient {
            background: linear-gradient(135deg, #99751d 0%, #d4af37 40%, #805d15 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .gold-metallic-btn {
            background: linear-gradient(135deg, #d4af37 0%, #ffd700 50%, #aa8c2c 100%);
            box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.4);
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
            color: #000000 !important;
        }
        .gold-metallic-btn:hover {
            box-shadow: 0 6px 28px rgba(212, 175, 55, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.6);
            transform: translateY(-2px);
        }

        /* Glassmorphism Cards */
        .glass-card {
            background: rgba(18, 22, 28, 0.85);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(212, 175, 55, 0.22);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7);
            transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .glass-card:hover {
            border-color: rgba(212, 175, 55, 0.55);
            box-shadow: 0 25px 50px rgba(212, 175, 55, 0.15), 0 10px 25px rgba(0, 0, 0, 0.9);
            transform: translateY(-5px);
        }

        /* Light Mode Glass Cards */
        html:not(.dark) .glass-card {
            background: rgba(255, 255, 255, 0.92);
            border: 1px solid rgba(212, 175, 55, 0.35);
            box-shadow: 0 15px 35px rgba(212, 175, 55, 0.12), 0 5px 15px rgba(0, 0, 0, 0.04);
        }
        html:not(.dark) .glass-card:hover {
            border-color: rgba(212, 175, 55, 0.8);
            box-shadow: 0 20px 40px rgba(212, 175, 55, 0.22), 0 8px 20px rgba(0, 0, 0, 0.08);
        }

        /* Glass Buttons */
        .glass-btn {
            background: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(10px);
            border: 1px solid rgba(212, 175, 55, 0.25);
            transition: all 0.3s ease;
        }
        .glass-btn:hover {
            background: rgba(212, 175, 55, 0.15);
            border-color: rgba(212, 175, 55, 0.7);
            box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
        }

        html:not(.dark) .glass-btn {
            background: rgba(212, 175, 55, 0.06);
            border: 1px solid rgba(212, 175, 55, 0.35);
            color: #1e293b;
        }
        html:not(.dark) .glass-btn:hover {
            background: rgba(212, 175, 55, 0.18);
            border-color: rgba(212, 175, 55, 0.8);
        }

        .shimmer-effect {
            position: relative;
            overflow: hidden;
        }
        .shimmer-effect::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: linear-gradient(
                60deg,
                transparent 30%,
                rgba(255, 255, 255, 0.3) 50%,
                transparent 70%
            );
            transform: rotate(30deg) translateX(-100%);
            transition: transform 0.8s ease-in-out;
        }
        .shimmer-effect:hover::after {
            transform: rotate(30deg) translateX(100%);
        }

        .hero-bg-overlay {
            background: radial-gradient(circle at 50% 50%, rgba(9, 11, 14, 0.7) 0%, rgba(9, 11, 14, 0.92) 70%, rgba(9, 11, 14, 1) 100%);
        }

        html:not(.dark) .hero-bg-overlay {
            background: radial-gradient(circle at 50% 50%, rgba(252, 251, 248, 0.75) 0%, rgba(252, 251, 248, 0.93) 70%, rgba(252, 251, 248, 1) 100%);
        }

        .gold-dot-badge {
            display: inline-block;
            width: 8px;
            height: 8px;
            background-color: #D4AF37;
            border-radius: 50%;
            box-shadow: 0 0 12px #D4AF37;
        }


        /* Mobile header and gallery improvements */
@media (max-width: 640px) {

    /* Keep the header logo compact */
    #companyLogo {
        object-fit: contain;
    }

    /* Give the gallery modal room for the close button */
    #galleryModal {
        align-items: flex-start;
        padding: 12px;
        padding-top: 68px;
    }

    /* Prevent the gallery content from hiding behind the close button */
    #galleryModal > .glass-card {
        margin-top: 0;
        margin-bottom: 12px;
        max-height: calc(100dvh - 80px);
        overflow-y: auto;
    }

    /* Make the main property image fit mobile screens */
    #galleryMainImage {
        height: 260px;
        object-fit: cover;
    }
}


/* Fix property gallery images on mobile */
@media (max-width: 640px) {
#galleryMainImage {
width: 100%;
height: 260px;
object-fit: contain !important;
display: block;
}
}
