/* ==========================================
   CSS Variables - Luxury Color Palette
   ========================================== */
:root {
    --primary-gold: #C9A961;
    --dark-navy: #1A2332;
    --medium-navy: #2C3E50;
    --light-gold: #E5D4A6;
    --cream: #F8F6F2;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --overlay-dark: rgba(26, 35, 50, 0.7);
    --shadow: rgba(0, 0, 0, 0.1);
}

/* ==========================================
   Global Styles & Reset
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    font-weight: 600;
    color: var(--dark-navy);
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-gold);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--light-gold);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(26, 35, 50, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-family: 'Georgia', serif;
    font-size: 1.5rem;
    color: var(--primary-gold);
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--white);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-gold);
}

.btn-contact {
    background-color: var(--primary-gold);
    color: var(--dark-navy);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.btn-contact:hover {
    background-color: var(--light-gold);
    color: var(--dark-navy);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    background: linear-gradient(135deg, var(--dark-navy) 0%, var(--medium-navy) 100%);
    background-image: url('images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-dark);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    padding: 2rem;
}

.hero-title {
    font-size: 4rem;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--light-gold);
    margin-bottom: 2rem;
    font-style: italic;
}

.hero-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-indicator span {
    width: 24px;
    height: 24px;
    border-left: 2px solid var(--primary-gold);
    border-bottom: 2px solid var(--primary-gold);
    transform: rotate(-45deg);
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0%, 100% {
        transform: translateY(0) rotate(-45deg);
        opacity: 0;
    }
    50% {
        transform: translateY(10px) rotate(-45deg);
        opacity: 1;
    }
}

/* ==========================================
   Quick Facts Bar
   ========================================== */
.quick-facts {
    background-color: var(--cream);
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-color);
}

.quick-facts .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    text-align: center;
}

.fact-item {
    padding: 1.5rem;
}

.fact-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.fact-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.fact-label {
    font-size: 0.95rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================
   Owner Sale Banner
   ========================================== */
.owner-sale-banner {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--light-gold) 100%);
    padding: 2rem 0;
    border-top: 3px solid var(--dark-navy);
    border-bottom: 3px solid var(--dark-navy);
}

.owner-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.owner-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: var(--dark-navy);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.badge-icon {
    width: 24px;
    height: 24px;
    stroke: var(--primary-gold);
}

.owner-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 900px;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--dark-navy);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.benefit-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    width: 20px;
    height: 20px;
    stroke: var(--primary-gold);
    flex-shrink: 0;
}

/* Owner Contact Badge in Contact Section */
.owner-contact-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-gold);
    color: var(--dark-navy);
    padding: 0.5rem 1.25rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(201, 169, 97, 0.3);
}

.owner-icon {
    width: 20px;
    height: 20px;
    stroke: var(--dark-navy);
}

/* ==========================================
   Section Styling
   ========================================== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark-navy);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.divider {
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary-gold), transparent);
    margin: 0 auto;
}

/* ==========================================
   Overview Section
   ========================================== */
.overview {
    background-color: var(--white);
}

.overview-content {
    max-width: 900px;
    margin: 0 auto;
}

.overview-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.overview-text .lead {
    font-size: 1.3rem;
    color: var(--medium-navy);
    font-weight: 500;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.overview-text p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background-color: var(--cream);
    border-left: 3px solid var(--primary-gold);
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.highlight-item:hover {
    transform: translateX(5px);
}

.highlight-icon {
    color: var(--primary-gold);
    font-size: 1.2rem;
    font-weight: bold;
}

/* ==========================================
   Gallery Section
   ========================================== */
.gallery {
    background-color: var(--cream);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4/3;
    box-shadow: 0 4px 6px var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(201, 169, 97, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Placeholder image styling */
.gallery-item img[src*="placeholder"] {
    background: linear-gradient(135deg, #e0e0e0 0%, #f5f5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   Lightbox
   ========================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    transition: color 0.3s ease;
}

.lightbox-close {
    top: 20px;
    right: 40px;
}

.lightbox-close:hover {
    color: var(--primary-gold);
}

.lightbox-prev {
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: var(--primary-gold);
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 1.2rem;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

/* ==========================================
   Features Section
   ========================================== */
.features {
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.feature-category h3 {
    font-size: 1.5rem;
    color: var(--medium-navy);
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--primary-gold);
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 0.7rem 0;
    padding-left: 1.8rem;
    position: relative;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li::before {
    content: "◆";
    position: absolute;
    left: 0;
    color: var(--primary-gold);
    font-size: 0.8rem;
}

/* ==========================================
   Location Section
   ========================================== */
.location {
    background-color: var(--cream);
}

.location-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.location-text h3 {
    font-size: 1.8rem;
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
}

.location-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.location-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.location-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-gold);
    box-shadow: 0 2px 4px var(--shadow);
}

.location-item strong {
    color: var(--medium-navy);
    display: block;
    margin-bottom: 0.5rem;
}

.location-description {
    font-style: italic;
    color: var(--text-light);
}

.location-map {
    width: 100%;
    height: 450px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#propertyMap {
    width: 100%;
    height: 100%;
}

/* Custom map marker */
.custom-marker {
    background: transparent;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 42px;
    background-color: var(--primary-gold);
    border-radius: 50% 50% 50% 0;
    position: relative;
    transform: rotate(-45deg);
    border: 3px solid var(--dark-navy);
}

.marker-pin::after {
    content: '';
    width: 16px;
    height: 16px;
    background-color: var(--dark-navy);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Map popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.map-popup h3 {
    color: var(--primary-gold);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.map-popup p {
    margin: 0.3rem 0;
    font-size: 0.9rem;
}

.map-popup strong {
    color: var(--medium-navy);
}

/* ==========================================
   Contact Section
   ========================================== */
.contact {
    background-color: var(--dark-navy);
    color: var(--white);
}

.contact .section-header h2,
.contact .section-subtitle {
    color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info h3 {
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-details {
    margin-bottom: 3rem;
}

.contact-item {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.contact-item strong {
    color: var(--primary-gold);
    display: block;
    margin-bottom: 0.3rem;
}

.contact-item a {
    color: var(--white);
}

.contact-item a:hover {
    color: var(--primary-gold);
}

.contact-cta {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-gold);
}

.contact-cta h4 {
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.contact-cta ul {
    list-style: none;
}

.contact-cta li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.contact-cta li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-gold);
}

/* Contact Form */
.contact-form-wrapper {
    background-color: var(--white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Hidden field for Netlify spam protection */
.hidden {
    display: none;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--medium-navy);
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.contact-form textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-gold);
    color: var(--dark-navy);
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--light-gold);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    display: none;
    text-align: center;
}

.form-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background-color: var(--dark-navy);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(201, 169, 97, 0.3);
}

.footer p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.7);
}

.footer-ref {
    color: var(--primary-gold);
    font-weight: 600;
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-price {
        font-size: 2.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    /* iOS-specific hero fixes */
    .hero {
        min-height: 600px;
        background-attachment: scroll;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-price {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .owner-benefits {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .owner-badge {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }

    .benefit-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .quick-facts .container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-price {
        font-size: 1.8rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }
}

/* ==========================================
   Language Selector
   ========================================== */
.language-selector {
    margin-left: 1rem;
}

.language-selector select {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid var(--primary-gold);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23C9A961' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 0.8rem;
    padding-right: 2.5rem;
}

.language-selector select:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--light-gold);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--light-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.language-selector option {
    background-color: var(--dark-navy);
    color: var(--white);
    padding: 0.5rem;
}

/* Mobile responsive language selector */
@media (max-width: 768px) {
    .language-selector {
        margin-left: 0.5rem;
    }
    
    .language-selector select {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
        padding-right: 2rem;
    }
}
