/* Variables & Reset */
:root {
    --primary-color: #2E4F2F;
    /* Forest Green */
    --secondary-color: #8F9E8B;
    /* Sage/Light Green */
    --accent-color: #D4A373;
    /* Wood/Earth tone */
    --bg-color: #FAFAFA;
    /* Off-white */
    --text-color: #333333;
    --light-text: #666666;
    --white: #FFFFFF;
    --surface: #FFFFFF;
    /* elevated surfaces/cards */

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

[data-theme='dark'] {
    --bg-color: #1a1c1a;
    /* Somewhat lighter/softer than pure black */
    --text-color: #e2f1e5;
    /* Higher legibility */
    --light-text: #b6dcb9;
    --surface: #222522;
    /* Slightly easier on eyes surface */
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);

    --heading-1: #e0f8e4;
    --heading-2: #d4f1d8;
    --heading-3: #c3e7c9;
    --heading-4: #b6ddb9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    color: var(--text-color);
    display: block;
    object-fit: cover;
    transition: filter 0.3s ease;
}

[data-theme='dark'] img {
    filter: brightness(0.8) contrast(1.1);
    /* Dimmed but kept clear */
}

[data-theme='dark'] h1 {
    color: var(--heading-1);
}

[data-theme='dark'] h2 {
    color: var(--heading-2);
}

[data-theme='dark'] h3 {
    color: var(--heading-3);
}

[data-theme='dark'] h4 {
    color: var(--heading-4);
}

.container {
    max-width: 1200px;

    [data-theme='dark'] .logo {
        color: var(--text-color);
    }

    [data-theme='dark'] .logo-text {
        color: inherit;
    }

    margin: 0 auto;
    padding: 0 20px;
}

.subtitle {
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 500;
}

.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: #FFFFFF !important;
    /* ensure bright text in light mode */
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: #FFFFFF !important;
    /* keep text bright on hover */
    transform: translateY(-2px);
}

.amenities-section {
    padding: 100px 0;
}

.font-outfit {
    font-family: var(--font-body) !important;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-booking {
    background-color: #003580;
    /* Booking.com blue */
    color: #FFF !important;
}

.btn-booking:hover {
    background-color: #00224f;
}

.btn-airbnb {
    background-color: #FF5A5F;
    /* Airbnb red */
    color: #FFF !important;
}

.btn-airbnb:hover {
    background-color: #e03e44;
}

/* Mix with btn-primary shape */
.btn-booking,
.btn-airbnb {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

/* Wellness Section */
.wellness {
    padding: 100px 0;
    background-color: #F4F6F4;
}

.wellness-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    /* Reverse proportions */
    gap: 60px;
    align-items: center;
}

.wellness-image img {
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: 500px;
    width: 100%;
}

.wellness-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.wellness-text p {
    color: var(--light-text);
    font-size: 1.1rem;
}

[data-theme='dark'] .wellness {
    background-color: #101310;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--surface);
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-content h3 {
    margin-bottom: 20px;
    flex-shrink: 0;
}

.rules-list-wrapper {
    overflow-y: auto;
    text-align: left;
    padding-right: 10px;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 10;
}

.btn-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.btn-group-vertical .btn-booking,
.btn-group-vertical .btn-airbnb {
    width: 100%;
    text-align: center;
}

/* Lightbox */
.lightbox-overlay {
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2100;
    display: flex;
    /* Ensure center alignment */
    align-items: center;
    justify-content: center;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-close {
    color: #FFF;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    z-index: 2105;
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
    z-index: 2102;
    width: 50px;
    height: 50px;
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
        background: rgba(0, 0, 0, 0.5);
        /* easier to see on mobile */
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        font-size: 2rem;
        top: 15px;
        right: 15px;
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    /* lighter alpha for frosted look */
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);
    z-index: 1000;
    padding: 20px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease-in-out, background-color 0.3s;
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Aref Ruqaa', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-mark {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.logo-text {
    line-height: 1;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--text-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
}

.btn-book-nav {
    background-color: var(--primary-color);
    color: #FFFFFF !important;
    /* ensure bright text on green in light mode */
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-book-nav:hover {
    background-color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    /* Removed static background-image */
    background-color: #000;
    /* Fallback */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
    animation: kenBurns 20s infinite alternate;
    /* Slow zoom effect */
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }

    /* Gentle 15% zoom */
}

.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.6));
    /* More dynamic gradient */
    z-index: 1;
}

.hero-content {
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* Stronger shadow */
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.95;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Better readability */
    letter-spacing: 0.5px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    color: var(--white);
    font-size: 2rem;
    animation: bounce 2s infinite;
    opacity: 0.8;
    cursor: pointer;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* About Section */
.about {
    padding: 100px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--light-text);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-image img {
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: 500px;
    width: 100%;
}

/* Villa Section */
.villa {
    padding: 100px 0;
    background-color: #F4F6F4;
    /* Very light green tint */
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.facility-item {
    background: var(--surface);
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.facility-item:hover {
    transform: translateY(-5px);
}

.facility-item ion-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.facility-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-family: var(--font-body);
}

.facility-item p {
    font-size: 0.9rem;
    color: var(--light-text);
}

.villa-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.villa-image img {
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: 400px;
    width: 100%;
}

.amenities-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.amenities-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--light-text);
}

.amenities-list ion-icon {
    color: var(--primary-color);
}

/* Feature Section */
.feature {
    padding: 100px 0;
}

.feature-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.feature-image img {
    border-radius: 8px;
    box-shadow: var(--shadow);
    height: 500px;
    width: 100%;
}

.feature-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.feature-text p {
    color: var(--light-text);
    font-size: 1.1rem;
}

.reverse-layout {
    grid-template-columns: 1.2fr 1fr;
}

.reverse-layout .feature-text {
    order: -1;
}

.small-note {
    font-size: 0.9rem !important;
    font-style: italic;
    margin-top: 15px;
    opacity: 0.8;
}

@media (max-width: 968px) {
    .reverse-layout .feature-text {
        order: initial;
    }
}

/* Gallery Section */
.gallery {
    padding: 100px 0;
    background-color: var(--white);
}

/* Carousel */
.carousel-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

@media (min-width: 768px) {
    .carousel-wrapper {
        padding: 2rem;
    }
}

.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    min-width: 280px;
}

@media (min-width: 768px) {
    .carousel-container {
        min-height: 180px;
        min-width: 340px;
    }
}

@media (min-width: 1024px) {
    .carousel-container {
        min-height: 240px;
        min-width: 400px;
    }
}

.carousel-card {
    position: absolute;
    width: 8rem;
    height: 8rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 2px solid var(--white);
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease, z-index 0.2s ease;
}

@media (min-width: 768px) {
    .carousel-card {
        width: 14rem;
        height: 14rem;
        border-radius: 1.5rem;
        border-width: 4px;
    }
}

@media (min-width: 1024px) {
    .carousel-card {
        width: 16rem;
        height: 16rem;
    }
}

.carousel-btn:hover {
    background-color: #E5E7EB;
}

.carousel-btn ion-icon {
    font-size: 1.25rem;
}

/* Dark mode adjustments for carousel */
[data-theme='dark'] .carousel-card {
    border-color: #333;
}

[data-theme='dark'] .carousel-btn {
    background-color: #1F2937;
    border-color: #374151;
    color: var(--text-color);
}

[data-theme='dark'] .carousel-btn:hover {
    background-color: #374151;
}

/* Location Section */
.location {
    padding: 100px 0;
    background-color: #F4F6F4;
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.distances {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
}

.distance-item {
    background: var(--surface);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 20px;
}

.distance-item .time {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    min-width: 70px;
}

.map-placeholder iframe {
    border-radius: 8px;
    box-shadow: var(--shadow);
    width: 100%;
    height: 400px;
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-wrapper {
    background-color: var(--primary-color);
    border-radius: 20px;
    padding: 60px;
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info h2 {
    color: var(--white);
    margin-bottom: 15px;
    font-family: var(--font-body);
}

.contact-info p {
    opacity: 0.8;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-cta {
    text-align: right;
}

.contact-cta h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.contact-cta .btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-green);
}

.contact-cta .btn-primary:hover {
    background-color: var(--accent-color);
    color: var(--white);
}

/* Footer */
footer {
    background-color: #222;
    color: #888;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* Floating CTA */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--primary-color);
    color: #FFFFFF !important;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(46, 79, 47, 0.4);
    font-weight: 600;
    z-index: 900;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-cta:hover {
    transform: translateY(-3px) scale(1.05);
    background-color: var(--secondary-color);
}

/* Floating CTA visible animation */
.floating-cta.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: pop-in 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes pop-in {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .about-grid,
    .villa-details,
    .feature-content,
    .wellness-content,
    .location-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image,
    .villa-image,
    .feature-image,
    .wellness-image {
        order: -1;
        /* Images on top for mobile */
    }

    .contact-wrapper {
        flex-direction: column;
        text-align: center;
    }

    .contact-cta {
        text-align: center;
    }
}

@media (max-width: 768px) {

    /* Larger Navbar & Logo on Mobile */
    .navbar {
        padding: 15px 0 !important;
    }

    .logo {
        font-size: 1.4rem !important;
    }

    .logo-mark {
        width: 35px !important;
        height: 35px !important;
    }

    /* Adjust Hamburger Menu Size */
    .bar {
        width: 26px;
        height: 2px;
        margin: 5px auto;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--surface);
        width: 100vw;
        right: 0;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        box-sizing: border-box;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 16px 0;
    }

    .menu-toggle {
        display: block;
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-link {
        display: block;
        padding: 15px 0;
    }

    .btn-book-nav {
        display: inline-block;
        margin-top: 15px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    /* Fix map and images overflow/distortion on mobile */
    .location-content {
        overflow: hidden;
    }

    .map-placeholder iframe {
        height: 280px;
        max-width: 100%;
    }

    .feature-image img,
    .about-image img,
    .villa-image img,
    .wellness-image img {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--surface);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: translateY(-2px);
}

.theme-toggle .theme-icon {
    font-size: 18px;
}

/* Dark Theme */
[data-theme='dark'] {
    --bg-color: #0f1110;
    --text-color: #d4f1d8;
    /* slightly bright green for body text */
    --light-text: #a8d7b0;
    /* softer green for secondary text */
    --surface: #161916;
    /* Dark headings hierarchy (brightest to dimmest) */
    --heading-1: #e0f8e4;
    --heading-2: #d4f1d8;
    --heading-3: #c3e7c9;
    --heading-4: #b6ddb9;
}

[data-theme='dark'] body {
    background-color: var(--bg-color);
    color: var(--text-color);
}

[data-theme='dark'] .navbar {
    background-color: rgba(16, 18, 16, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

[data-theme='dark'] .nav-link {
    color: var(--text-color);
}

[data-theme='dark'] h1 {
    color: var(--heading-1);
}

[data-theme='dark'] h2 {
    color: var(--heading-2);
}

[data-theme='dark'] h3 {
    color: var(--heading-3);
}

[data-theme='dark'] h4 {
    color: var(--heading-4);
}

[data-theme='dark'] .hero {
    background: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('assets/master-bedroom-jungle-view.webp');
    background-size: cover;
    background-position: center;
}

/* Ensure logo text follows dark-mode body color */
[data-theme='dark'] .logo {
    color: var(--text-color);
}

[data-theme='dark'] .logo-text {
    color: inherit;
}

[data-theme='dark'] .hero p {
    opacity: 1;
}

[data-theme='dark'] .villa {
    background-color: #101310;
}

[data-theme='dark'] .facility-item {
    background: var(--surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* keep neutral */

[data-theme='dark'] .gallery {
    background-color: #0f1110;
}

[data-theme='dark'] .location {
    background-color: #101310;
}

[data-theme='dark'] .distance-item {
    background: var(--surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

[data-theme='dark'] footer {
    background-color: #111;
    color: #b3b3b3;
}

[data-theme='dark'] .nav-menu {
    background-color: transparent;
}

/* Footer Link */
.footer-link {
    color: inherit;
    text-decoration: underline;
    opacity: 0.8;
    transition: opacity 0.2s;
    animation: pulse-text 2s infinite;
}

@keyframes pulse-text {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.footer-link:hover {
    opacity: 1;
}

.mobile-break {
    display: none;
}

@media (max-width: 600px) {
    .mobile-break {
        display: block;
    }
}

/* Rules Modal Specifics */
/* Rules Modal Specifics */
.rules-modal-content {
    max-width: 600px;
    text-align: left;
    padding: 0;
    border-radius: 12px;
    /* Ensure radius is here */
    overflow: hidden;
    /* Clip inner content (the header) to rounded corners */
    display: flex;
    flex-direction: column;
}

.rules-modal-content h3 {
    text-align: center;
    margin: 0;
    background: var(--surface);
    padding: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 5;
}

/* Override padding for the modal close button in this specific modal if needed */
.rules-modal-content .modal-close {
    top: 20px;
    right: 25px;
}

.rules-list-wrapper {
    padding: 30px;
    overflow-y: auto;
    /* This handles searching */
}

.rules-intro {
    margin-bottom: 20px;
    font-style: italic;
    font-size: 0.95rem;
}

.rules-list {
    list-style: decimal;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rules-list li {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-color);
}

[data-theme='dark'] .rules-modal-content h3 {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* Amenities Section */
.amenities-section h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.amenities-section p {
    text-align: center;
    color: var(--light-text);
    margin-bottom: 50px;
}

.amenities-grid-full {
    display: block;
    max-height: none;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

.amenity-category {
    margin-bottom: 30px;
}

.amenity-category h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

[data-theme='dark'] .amenity-category h3 {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.amenities-subgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.amenities-grid-full.collapsed {
    max-height: 380px;
    /* Show roughly 3-4 rows */
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

@media (max-width: 600px) {
    .amenities-subgrid {
        grid-template-columns: 1fr;
        /* Full width on mobile */
    }
}

.amenities-toggle-btn {
    display: block;
    margin: 30px auto 0;
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    transition: var(--transition);
}

.amenities-toggle-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}


.amenity-item {
    background-color: var(--surface);
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

[data-theme='dark'] .amenity-item {
    border-color: rgba(255, 255, 255, 0.05);
}

.amenity-item:hover {
    transform: translateY(-2px);
}

.amenity-item ion-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.amenity-item h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text-color);
}

.amenity-item p {
    font-size: 0.85rem;
    color: var(--light-text);
    margin-bottom: 0;
    text-align: left;
    line-height: 1.4;
}

/* Reviews Section */
.reviews-section {
    padding: 100px 0;
    background-color: var(--white);
    position: relative;
    overflow: hidden;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.review-card {
    background: var(--surface);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.review-card:hover {
    transform: translateY(-5px);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-initial {
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: #FFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.reviewer-info h4 {
    margin-bottom: 2px;
    font-size: 1.1rem;
}

.review-rating {
    color: #FFD700;
    /* Gold for stars */
    font-size: 1rem;
}

.review-text {
    font-style: italic;
    color: var(--light-text);
    line-height: 1.7;
    position: relative;
}

.quote-symbol {
    font-family: 'Aref Ruqaa', serif;
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: -20px;
    display: block;
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* Ease-out quart */
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}


/* Mobile Compact/Blended View */
/* Mobile View Improvements */
@media (max-width: 768px) {

    /* Reduce Section Padding on Mobile */
    .about,
    .feature,
    .wellness,
    .villa,
    section {
        padding: 20px 0 !important;
    }

    /* Standardize Image Cards on Mobile (No Blend) */
    .about-grid,
    .wellness-content,
    .villa-details,
    .feature-content {
        display: flex;
        flex-direction: column;
        gap: 20px !important;
        position: static;
        overflow: visible;
        border-radius: 0;
        min-height: auto;
        box-shadow: none;
        margin-bottom: 20px;
        /* Reduced bottom margin too */
    }

    /* Force images to top and Full Width */
    .about-image,
    .wellness-image,
    .villa-image,
    .feature-image {
        position: static;
        width: calc(100% + 40px);
        /* 100% of container + combined padding of 40px */
        margin-left: -20px;
        /* Pull left */
        margin-right: -20px;
        /* Pull right */
        height: auto;
        order: -1 !important;
        margin-bottom: 10px;
    }

    /* Consistent Image Size with Bottom Fade */
    .about-image img,
    .wellness-image img,
    .villa-image img,
    .feature-image img {
        width: 100%;
        height: 300px;
        /* Fixed height */
        object-fit: cover;
        border-radius: 0;
        /* No radius for edge-to-edge */
        box-shadow: none;
        /* Fade out at the bottom */
        -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
        mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    }

    /* Text Styling (Reset overrides) */
    .about-text,
    .wellness-text,
    .villa-text,
    .feature-text {
        position: static;
        background: none;
        padding: 0;
        min-height: auto;
        justify-content: flex-start;
    }

    /* Reset Text Colors to Default/Dark Mode Variables */
    .about-text h2,
    .about-text p,
    .wellness-text h2,
    .wellness-text p,
    .villa-text h3,
    .villa-text p,
    .feature-text h2,
    .feature-text p {
        text-shadow: none;
        /* Remove shadow but keep theme colors */
    }

    .villa-text ion-icon {
        color: var(--primary-color) !important;
    }

    /* Compact Amenities on Mobile */
    .amenities-subgrid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .amenity-item {
        padding: 10px;
        gap: 8px;
    }

    .amenity-item ion-icon {
        font-size: 1.2rem;
    }

    .amenity-item h4 {
        font-size: 0.9rem;
    }

    .amenity-item p {
        display: none;
    }

    .amenities-list li {
        margin-bottom: 5px;
        font-size: 0.95rem;
        color: inherit !important;
    }

    /* Fix Menu Toggle Visibility in Dark Mode */
    [data-theme='dark'] .bar {
        background-color: var(--text-color);
    }

    [data-theme='dark'] .menu-toggle {
        background: transparent;
    }

    /* Ensure Nav Menu has background in Dark Mode Mobile */
    [data-theme='dark'] .nav-menu {
        background-color: var(--surface);
    }

    /* Fix Footer on Mobile */
    footer {
        padding: 30px 20px;
    }

    footer p {
        display: flex;
        flex-direction: column;
        gap: 10px;
        line-height: 1.6;
    }

    .footer-link {
        display: inline-block;
        padding: 8px 16px;
        background-color: var(--surface);
        border-radius: 50px;
        margin-top: 5px;
        text-decoration: none;
        border: 1px solid rgba(0, 0, 0, 0.1);
        font-weight: 500;
        opacity: 1;
        animation: none;
    }

    [data-theme='dark'] .footer-link {
        border-color: rgba(255, 255, 255, 0.1);
    }

    /* Fix Get in Touch Overflow */
    .contact-wrapper {
        padding: 40px 20px;
        border-radius: 12px;
        text-align: left;
        /* Explicitly align wrapper text left */
    }

    .contact-info {
        align-items: flex-start;
        /* Ensure flex column items align left */
    }

    .contact-item {
        font-size: 1rem;
        flex-wrap: nowrap;
        align-items: flex-start;
        justify-content: flex-start;
        /* Align start */
        width: 100%;
        /* Ensure it spans to allow left alignment */
    }


    .contact-item span {
        word-break: break-word;

        overflow-wrap: anywhere;
        flex: 1;
        text-align: left;
        /* Ensure text itself is left aligned */
    }

    .contact-item ion-icon {
        flex-shrink: 0;
        margin-top: 4px;
    }

    /* Reviews Section Mobile */
    .reviews-grid {
        grid-template-columns: 1fr;
        /* Stack vertically */
        gap: 20px;
    }

    .review-card {
        padding: 16px;
        /* Significantly reduced */
        gap: 12px;
    }

    .reviewer-initial {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .review-text p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .quote-symbol {
        font-size: 3rem;
        margin-bottom: -15px;
    }
}

/* Loading Bar - Refined Premium Look */
#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--surface);
    /* Match theme */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.logo-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* Soft Pulse Effect */
.logo-wrapper::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.1;
    animation: softPulse 2s infinite ease-in-out;
}

.loading-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    z-index: 2;
    /* No breathe animation, just static elegance sitting on pulse */
}

.loading-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--light-text);
    animation: none;
    /* Removed jittery animation */
}

@keyframes softPulse {
    0% {
        transform: scale(1);
        opacity: 0.1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.15;
    }

    100% {
        transform: scale(1);
        opacity: 0.1;
    }
}

/* Things to Do Page Specifics */
.things-hero {
    background-image: url('assets/penjor.webp');
    background-size: cover;
    background-position: center;
    min-height: 60vh;
    height: 60vh;
    display: flex;
    /* Ensure content centering */
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.things-page .feature-image img {
    border-radius: 0 !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .things-hero {
        height: 50vh !important;
        min-height: 50vh !important;
    }
}

/* Circling Light / Glowing Border Animation */
.btn-glow {
    position: relative;
    z-index: 0;
    overflow: hidden;
    /* Keeps the inner spinner contained */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 50px !important;
    /* Enforce rounded pill shape to guide the light */
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    /* Subtle white glow */
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* The rotating white border light */
.btn-glow::before {
    content: '';
    position: absolute;
    top: -150%;
    left: -150%;
    width: 400%;
    height: 400%;
    background: conic-gradient(transparent 0deg,
            transparent 80deg,
            rgba(255, 255, 255, 0.9) 100deg,
            /* Pure White */
            rgba(255, 255, 255, 0) 120deg,
            transparent 360deg);
    animation: rotateLight 4s linear infinite;
    /* Slower, more elegant */
    z-index: -2;
}

/* Button background with Sheen Effect */
.btn-glow::after {
    content: '';
    position: absolute;
    inset: 3px;
    /* Thin border */
    background-color: var(--primary-color);
    /* Sheen gradient overlay */
    background-image: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    background-position: 200% 0;
    border-radius: 47px;
    z-index: -1;
    animation: sheen 5s infinite ease-in-out;
    /* Subtle sheen sweep */
}

@keyframes sheen {

    0%,
    80% {
        background-position: 200% 0;
    }

    /* Pause between shines */
    100% {
        background-position: -200% 0;
    }
}

@keyframes rotateLight {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Breakfast Page Specifics */
.breakfast-hero {
    background-image: url('assets/bali-sunrise.webp');
    background-size: cover;
    background-position: center;
    min-height: 60vh;
    height: 60vh;
}

.breakfast-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.breakfast-category {
    text-align: center;
    padding: 40px 30px;
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.breakfast-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.breakfast-category h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.breakfast-category p {
    color: var(--light-text);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .breakfast-hero {
        height: 50vh !important;
        min-height: 50vh !important;
    }

    .breakfast-categories {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

#loading-bar.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Skeleton Loading Animation */
/* Restored Carousel Styles */
.carousel-controls {
    display: flex;
    gap: 0.5rem;
    margin-top: 2rem;
    position: relative;
    z-index: 20;
    background-color: transparent;
    border: none;
}

@media (min-width: 768px) {
    .carousel-controls {
        gap: 1rem;
    }
}

.carousel-btn {
    border-radius: 50%;
    height: 3rem;
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary-color);
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.image-loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    position: relative;
    overflow: hidden;
}

/* Ensure images are hidden while loading to show skeleton */
.image-loading-skeleton img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

.image-loading-skeleton img.loaded {
    opacity: 1;
}

[data-theme='dark'] .image-loading-skeleton {
    background: linear-gradient(90deg, #2c2c2c 25%, #3a3a3a 50%, #2c2c2c 75%);
}

/* Mobile Navigation Optimization */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 0;
        /* Reduced from 20px */
    }

    .logo {
        font-size: 1.2rem;
        /* Reduced from 1.5rem */
    }

    .logo-mark {
        width: 24px;
        /* Reduced from 28px */
        height: 24px;
    }

    .bar {
        margin: 4px auto;
        /* Compacter hamburger menu */
    }

}
/* ==========================================
   Cookie Consent Banner
   ========================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-text {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 250px;
}

.cookie-icon {
    font-size: 28px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.cookie-text p {
    margin: 0;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.6;
}

.cookie-link {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cookie-link:hover {
    color: var(--accent-color);
}

.cookie-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cookie-btn:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 79, 47, 0.3);
}

.cookie-btn:active {
    transform: translateY(0);
}

[data-theme='dark'] .cookie-banner {
    border-top-color: var(--accent-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 16px;
    }

    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .cookie-text {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .cookie-text p {
        font-size: 13px;
    }

    .cookie-btn {
        width: 100%;
        padding: 14px;
    }
}
