/* Variables */
:root {
    --color-navy: #0a192f;
    --color-navy-light: #112240;
    --color-gold: #d4af37;
    --color-sand: #f4f1ea;
    --color-white: #ffffff;
    --color-text: #333333;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-sand);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

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

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(244, 241, 234, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--color-navy);
    font-weight: 600;
}

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

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-navy);
}

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

.cta-link {
    border: 1px solid var(--color-navy);
    padding: 0.5rem 1.5rem;
    border-radius: 0;
}

.cta-link:hover {
    background: var(--color-navy);
    color: var(--color-white) !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-navy);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: scale(1.1);
    /* For parallax effect */
    transition: transform 0.1s linear;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.4);
    /* Navy overlay */
    z-index: -1;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--color-white);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 1px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-white);
    color: var(--color-navy);
}

.btn-primary:hover {
    background: var(--color-gold);
    color: var(--color-white);
}

.btn-gold {
    background: var(--color-gold);
    color: var(--color-white);
}

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

/* Sections */
.section {
    padding: 8rem 0;
}

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

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.divider {
    width: 60px;
    height: 2px;
    background: var(--color-gold);
    margin: 0 auto 1.5rem;
}

.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: #666;
}

/* Experience Section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    text-align: center;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-navy-light);
}

/* Villa Showcase */
.split-layout {
    display: flex;
    align-items: center;
    min-height: 600px;
}

.split-layout.reverse {
    flex-direction: row-reverse;
}

.split-image,
.split-content {
    flex: 1;
}

.split-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-height: 600px;
}

.split-content {
    padding: 6rem;
    background: var(--color-white);
}

.split-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.gallery-item {
    overflow: hidden;
    position: relative;
}

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

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

/* Inquire */
.inquire {
    background: var(--color-navy);
    color: var(--color-white);
    text-align: center;
}

.inquire-box h2 {
    color: var(--color-white);
}

.inquire-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
}

.inquire-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.inquire-form input {
    padding: 1rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--color-white);
    font-family: var(--font-body);
}

.inquire-form input:focus {
    outline: none;
    border-color: var(--color-gold);
}

/* Footer */
.footer {
    background: #050d1a;
    color: rgba(255, 255, 255, 0.4);
    padding: 4rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-logo {
    font-family: var(--font-heading);
    color: var(--color-white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.footer-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a:hover {
    color: var(--color-gold);
}

/* Animations */
.fade-in,
.fade-in-up,
.fade-in-left,
.fade-in-right {
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
}

.fade-in-up {
    transform: translateY(30px);
}

.fade-in-left {
    transform: translateX(-30px);
}

.fade-in-right {
    transform: translateX(30px);
}

.visible {
    opacity: 1;
    transform: translate(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--color-sand);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .split-layout,
    .split-layout.reverse {
        flex-direction: column;
    }

    .split-content {
        padding: 4rem 2rem;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: #0a192f;
    /* Using a dark color directly as var might not be defined in this scope or I should check vars. using hardcoded dark blue to match theme just in case */
    background-color: var(--color-navy, #0a192f);
    /* Fallback */
    border: 1px solid #d4af37;
    border: 1px solid var(--color-gold, #d4af37);
    padding: 3rem;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    color: #fff;
}

.modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--color-gold, #d4af37);
}

.close-modal-btn {
    margin-top: 2rem;
}

/* Gallery Modal */
.gallery-modal {
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    /* Ensure it's hidden by default, .show will override */
    align-items: center;
    justify-content: center;
}

.gallery-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    background: transparent;
}

.gallery-modal-content {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    /* animation-name: zoom; */
    /* animation-duration: 0.6s; */
    border: 2px solid var(--color-gold);
}

/* @keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
} */

.close-gallery {
    position: absolute;
    top: -40px;
    right: 0;
    color: #f1f1f1;
    font-size: 35px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-gallery:hover,
.close-gallery:focus {
    color: var(--color-gold);
    text-decoration: none;
    cursor: pointer;
}

.gallery-item {
    cursor: pointer;
}