/* Toscanini Real Estate - Red Sea Luxury Edition */
:root {
    --navy: #0B1F3A;
    --navy-light: #162a47;
    --gold: #C9A24D;
    --gold-dark: #b08d3e;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --gray: #6C757D;
    --text: #333333;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    color: var(--text);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.elegant-font {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Animation Utils */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   HEADER - Modern Luxury Design
   ========================================== */

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: all 0.4s ease;
}

/* Header Top Bar - Sleek Contact Info */
.header-top {
    background: linear-gradient(135deg, #0a1a2e 0%, #0B1F3A 100%);
    border-bottom: 1px solid rgba(201, 162, 77, 0.15);
    padding: 10px 0;
    font-size: 0.8rem;
}

.header-top-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 35px;
    color: rgba(255, 255, 255, 0.85);
}

.header-top-content span {
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.header-top-content span:hover {
    color: var(--gold);
}

.header-top-content i {
    color: var(--gold);
    font-size: 0.9rem;
}

/* Header Main - Clean & Elegant */
.header-main {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 18px 0;
    box-shadow: 0 2px 30px rgba(11, 31, 58, 0.08);
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px;
}

/* Logo Section */
.logo-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.logo-brand:hover {
    transform: translateY(-2px);
}

.logo-brand img {
    height: 60px;
    filter: brightness(0.85) contrast(1.1) drop-shadow(0 3px 8px rgba(201, 162, 77, 0.3));
    transition: var(--transition);
    opacity: 1;
}

.logo-brand:hover img {
    filter: brightness(0.9) contrast(1.15) drop-shadow(0 4px 12px rgba(201, 162, 77, 0.4));
}

.brand-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gold);
    margin: 0;
    letter-spacing: 3px;
    line-height: 1;
}

.brand-text p {
    font-size: 0.65rem;
    color: var(--navy);
    margin: 4px 0 0 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.7;
}

/* Navigation - Modern & Clean */
nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

nav ul {
    display: flex;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav a {
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
    font-family: 'Outfit', sans-serif;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

nav a:hover {
    color: var(--gold);
}

nav a:hover::after {
    width: 100%;
}

/* CTA Button */
.header-cta .btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, #d4ae5e 100%);
    color: var(--navy);
    padding: 12px 32px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(201, 162, 77, 0.25);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.header-cta .btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--navy);
    transition: all 0.4s ease;
    z-index: -1;
}

.header-cta .btn-gold:hover::before {
    left: 0;
}

.header-cta .btn-gold:hover {
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(201, 162, 77, 0.4);
    border-color: var(--gold);
}

/* Scrolled State */
header.scrolled .header-top {
    display: none;
}

header.scrolled .header-main {
    padding: 14px 0;
    box-shadow: 0 4px 40px rgba(11, 31, 58, 0.12);
}

header.scrolled .logo-brand img {
    height: 50px;
}

header.scrolled .brand-text h1 {
    font-size: 1.4rem;
}

/* Responsive */
@media (max-width: 992px) {
    nav {
        display: none;
    }

    .header-main .container {
        gap: 20px;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(11, 31, 58, 0.85) 0%, rgba(22, 42, 71, 0.9) 100%),
        url('../images/hero-bg.jpg') center/cover no-repeat;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 180px;
    padding-bottom: 80px;
    background-attachment: fixed;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}


.hero-content {
    max-width: 1000px;
    width: 90%;
    margin: 0 auto;
    padding: 30px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(3rem, 5vw, 5rem);
    margin-bottom: 25px;
    letter-spacing: -1px;
    line-height: 1.1;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    word-wrap: break-word;
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 40px;
    background: rgba(0, 0, 0, 0.3);
    display: inline-block;
    padding: 10px 30px;
    backdrop-filter: blur(5px);
    border-radius: 50px;
}

/* Buttons - Elegant Rounded Style */
.btn-gold {
    background: var(--gold);
    color: var(--navy);
    padding: 18px 45px;
    border: 2px solid var(--gold);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    display: inline-block;
    z-index: 1;
    transition: var(--transition);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(201, 162, 77, 0.3);
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--white);
    transition: var(--transition);
    z-index: -1;
}

.btn-gold:hover::before {
    width: 100%;
}

.btn-gold:hover {
    color: var(--navy);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 162, 77, 0.5);
}

/* Interactive Search Bar - Modern Open Design */
.search-bar-container {
    position: relative;
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 20px;
    z-index: 100;
}

.search-form {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 1) 100%);
    padding: 35px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 80px rgba(11, 31, 58, 0.15);
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 25px;
    align-items: end;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(201, 162, 77, 0.1);
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--navy);
    font-weight: 700;
    letter-spacing: 1.5px;
    opacity: 0.7;
}

.search-group select {
    border: none;
    border-bottom: 2px solid #e5e5e5;
    background: transparent;
    color: var(--navy);
    font-weight: 600;
    font-size: 1rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    padding: 10px 0;
    transition: var(--transition);
}

.search-group select:focus {
    border-bottom-color: var(--gold);
}

.search-group select option {
    padding: 10px;
    background: white;
}

.search-form button {
    background: var(--gold);
    color: var(--navy);
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(201, 162, 77, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
    align-self: end;
}

.search-form button:hover {
    background: var(--navy);
    color: var(--gold);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(11, 31, 58, 0.3);
}

.search-form button i {
    font-size: 1.1rem;
}

@media (max-width: 1024px) {
    .search-form {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .search-form button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* Section Styling */
.section-title {
    text-align: center;
    margin: 100px 0 60px;
}

.section-title p {
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.section-title h2 {
    font-size: 3.5rem;
    color: var(--navy);
    line-height: 1.2;
}

/* Property Cards */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    padding: 60px 0;
}

.property-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.property-image,
.card-img {
    position: relative;
    overflow: hidden;
    height: 280px;
}

.property-image img,
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    pointer-events: auto;
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.sold-grayscale {
    filter: grayscale(100%);
}

.property-card:hover .property-image img,
.property-card:hover .card-img img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.property-card:hover .card-overlay {
    opacity: 1;
}

.premium-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--navy);
    color: var(--gold);
    padding: 8px 15px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.card-body {
    padding: 30px 25px;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.property-card:hover .card-body {
    border-bottom-color: var(--gold);
}

.card-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.4rem;
    color: var(--navy);
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.4rem;
    /* Ensures two lines worth of height */
}

.card-title a {
    color: inherit;
    transition: var(--transition);
}

.card-title a:hover {
    color: var(--gold);
}

.card-loc {
    color: var(--gray);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.card-facilities {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid #eee;
    margin-bottom: 20px;
    color: var(--gray);
    font-size: 0.9rem;
}

.card-facilities span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-facilities i {
    color: var(--gold);
    margin-right: 6px;
}

/* Property Card Button */
.card-action {
    display: block;
    text-align: center;
    background: var(--gold);
    color: var(--navy);
    padding: 14px 30px;
    border-radius: 50px;
    margin-top: auto;
    /* Pushes button to the bottom */
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(201, 162, 77, 0.3);
}

.card-action:hover {
    background: var(--navy);
    color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(11, 31, 58, 0.3);
}

.card-action i {
    margin-left: 8px;
    transition: var(--transition);
}

.card-action:hover i {
    transform: translateX(4px);
}

/* Footer */
footer {
    background: var(--navy);
    color: white;
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}

/* WhatsApp Widget - Gold Luxury Style */
.whatsapp-widget {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background: var(--gold);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 32px;
    box-shadow: 0 10px 30px rgba(201, 162, 77, 0.4);
    z-index: 9999;
    transition: var(--transition);
    animation: pulse-gold 2s infinite;
    border: 2px solid var(--gold);
}

.whatsapp-widget:hover {
    transform: scale(1.1);
    background: var(--gold-dark);
    box-shadow: 0 15px 40px rgba(201, 162, 77, 0.6);
}

@keyframes pulse-gold {
    0% {
        box-shadow: 0 0 0 0 rgba(201, 162, 77, 0.7);
    }

    70% {
        box-shadow: 0 0 0 20px rgba(201, 162, 77, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(201, 162, 77, 0);
    }
}

/* ==========================================
   PROPERTY DETAILS PAGE STYLES (Desktop Fix)
   ========================================== */

/* Gallery Grid System */
.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 50px;
    /* Ensure space below gallery */
    height: 500px;
    /* Fixed height for consistency */
}

.gallery-main {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    height: 100%;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* Side Images Grid */
.gallery-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 1fr);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Ensure amenities row clears everything */
.amenities-row {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    /* Ensure z-index works */
    z-index: 10;
    margin-top: 20px;
    /* Extra safety margin */
    clear: both;
}

.detail-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    color: var(--navy);
    font-weight: 600;
}

.detail-icon i {
    color: var(--gold);
    font-size: 1.4rem;
}

/* Benefit Grid Section */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.benefit-card {
    background: var(--off-white);
    padding: 40px 30px;
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid rgba(201, 162, 77, 0.1);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.benefit-card:hover {
    transform: translateY(-10px);
    background: white;
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

.benefit-icon {
    width: 70px;
    height: 70px;
    background: white;
    color: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.benefit-card:hover .benefit-icon {
    background: var(--gold);
    color: white;
    transform: rotateY(360deg);
}

.benefit-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    color: var(--navy);
    margin-bottom: 15px;
    font-weight: 700;
}

.benefit-card p {
    font-size: 0.95rem;
    color: var(--gray);
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 1200px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .benefits-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive adjustments - Keep Mobile Rules Strict */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        height: auto !important;
        margin-bottom: 30px !important;
    }

    .gallery-main {
        grid-column: auto !important;
        grid-row: auto !important;
        height: 300px !important;
    }

    .gallery-item {
        height: 200px !important;
    }

    .amenities-row {
        flex-direction: column;
        align-items: center !important;
        gap: 15px !important;
        justify-content: center !important;
    }


    /* Video Container Responsive - Vertical Mobile Videos (TikTok Style) */
    .video-container {
        position: relative !important;
        padding-bottom: 0 !important;
        height: 70vh !important;
        max-height: 600px !important;
        margin: 20px auto !important;
        border-radius: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        background: #000 !important;
        overflow: hidden !important;
    }

    .video-container video {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        object-fit: contain !important;
        background: #000 !important;
    }

    .video-container iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

}

/* Additional Mobile Fixes for Very Small Screens */
@media (max-width: 480px) {
    .video-container {
        height: 65vh !important;
        max-height: 500px !important;
        border-radius: 8px !important;
        margin: 15px auto !important;
    }

    .video-container video {
        object-fit: contain !important;
        background: #000 !important;
    }
}