@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=IBM+Plex+Sans+Arabic:wght@200;300;400;500&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Inter:wght@300;400;500&display=swap');

:root {
    --color-sand: #e6d5b8;
    --color-terracotta: #b36a5e;
    --color-charcoal: #1a1a1a;
    --color-white: #fdfaf5;
    --color-glass: rgba(255, 255, 255, 0.1);

    --font-heading: 'Amiri', serif;
    --font-body: 'IBM Plex Sans Arabic', sans-serif;

    --transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
    --transition-fast: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-text {
    overflow: hidden;
    display: block;
}

.reveal-text span {
    display: block;
    transform: translateY(100%);
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.reveal-text.active span {
    transform: translateY(0);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-weight: 300;
    background-color: var(--color-white);
    color: var(--color-charcoal);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    cursor: none;
    /* Hide default cursor for custom one */
}

/* Custom Cursor */
.cursor {
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-charcoal);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease, background 0.3s ease;
    mix-blend-mode: difference;
    background: white;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(26, 26, 26, 0.2);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.15s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-white);
}

::-webkit-scrollbar-thumb {
    background: var(--color-sand);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-terracotta);
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 400;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
}

nav.scrolled {
    padding: 1rem 5%;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
}

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 0.9rem;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--color-sand);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: white;
    letter-spacing: 0.05rem;
    /* Reduced for Arabic */
}

.book-now {
    border: 1px solid white;
    padding: 0.8rem 2rem;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.book-now:hover {
    background: white;
    color: var(--color-charcoal);
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    transform: scale(1.1);
    animation: zoomOut 20s infinite alternate;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
    z-index: 0;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 1;
}

.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    letter-spacing: 0.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    letter-spacing: 0.1rem;
    /* Reduced for Arabic */
    text-transform: uppercase;
}

@keyframes zoomOut {
    from {
        transform: scale(1.1);
    }

    to {
        transform: scale(1);
    }
}

/* Concept Section */
.concept {
    display: flex;
    height: 100vh;
    background: var(--color-white);
}

.concept-image {
    flex: 1;
    overflow: hidden;
}

.concept-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.concept-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10%;
    background: var(--color-sand);
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.concept-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.concept-content h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-charcoal);
}

.concept-content p {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--color-charcoal);
    opacity: 0.8;
}

/* Villas Section */
.villas {
    padding: 10rem 5%;
    background: var(--color-white);
}

.villas-header {
    text-align: center;
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.villas-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.wellness-content {
    flex: 1;
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.wellness-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem;
    margin-bottom: 6rem;
    opacity: 0;
    transform: translateY(50px);
    transition: var(--transition);
}

.footer-grid.visible {
    opacity: 1;
    transform: translateY(0);
}

.carousel-container {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2rem;
    scrollbar-width: none;
    /* Firefox */
}

.carousel-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.carousel-track {
    display: flex;
    gap: 2rem;
}

.villa-card {
    min-width: 400px;
    height: 600px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.villa-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.villa-card:hover img {
    transform: scale(1.1);
}

.villa-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    transform: translateY(100px);
    transition: var(--transition);
    opacity: 0;
}

.villa-card:hover .villa-info {
    transform: translateY(0);
    opacity: 1;
}

.villa-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.villa-info p {
    font-size: 0.9rem;
    color: var(--color-sand);
}

/* Wellness Section */
.wellness {
    padding: 10rem 5%;
    display: flex;
    align-items: center;
    gap: 5rem;
    background: var(--color-charcoal);
    color: white;
}

.wellness-content {
    flex: 1;
}

.wellness-content h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    color: var(--color-sand);
}

.wellness-image {
    flex: 1;
    height: 600px;
    border-radius: 60% 40% 70% 30% / 30% 60% 40% 70%;
    /* More organic shape */
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}

.wellness-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: luminosity;
    opacity: 0.8;
}

/* Footer */
footer {
    padding: 8rem 5% 4rem;
    background: #0d0d0d;
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem;
    margin-bottom: 6rem;
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.arabic-logo {
    font-size: 2.5rem;
    opacity: 0.3;
}

.footer-links h4 {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--color-sand);
}

.footer-links ul {
    list-style: none;
}

.footer-links ul li {
    margin-bottom: 1rem;
}

.footer-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
}

.footer-links a:hover {
    color: white;
}

.newsletter h4 {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--color-sand);
}

.newsletter p {
    margin-bottom: 2rem;
    opacity: 0.6;
}

.newsletter-form {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.newsletter-form input {
    background: transparent;
    border: none;
    padding: 1rem 0;
    color: white;
    flex: 1;
    font-family: var(--font-body);
}

.newsletter-form button {
    background: transparent;
    border: none;
    color: var(--color-sand);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    opacity: 0.4;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .concept {
    flex-direction: row-reverse;
}

[dir="rtl"] .wellness {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
    margin-right: auto;
    margin-left: initial;
}

[dir="rtl"] .book-now {
    margin-right: 3rem;
    margin-left: 0;
}

[dir="rtl"] .carousel-track {
    flex-direction: row;
    /* Items will naturally flow from right in RTL */
}

[dir="rtl"] .villa-info {
    text-align: right;
}

[dir="rtl"] .footer-links h4,
[dir="rtl"] .newsletter h4 {
    border-right: 2px solid var(--color-sand);
    border-left: none;
    padding-right: 1rem;
    padding-left: 0;
}

/* Booking Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--color-white);
    padding: 4rem;
    width: 90%;
    max-width: 600px;
    position: relative;
    transform: translateY(50px);
    transition: var(--transition);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-charcoal);
}

.booking-form {
    display: grid;
    gap: 2rem;
}

.booking-form input,
.booking-form select {
    width: 100%;
    padding: 1rem;
    border: none;
    border-bottom: 1px solid rgba(26, 26, 26, 0.1);
    background: transparent;
    font-family: var(--font-body);
}

.submit-booking {
    background: var(--color-charcoal);
    color: white;
    padding: 1.5rem;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    transition: var(--transition-fast);
}

.submit-booking:hover {
    background: var(--color-terracotta);
}

/* Noise Overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9997;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Responsiveness */
@media (max-width: 1024px) {
    .concept {
        flex-direction: column;
        height: auto;
    }

    .wellness {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .villa-card {
        min-width: 300px;
        height: 450px;
    }
}