* {
    box-sizing: border-box;
}

:root {
    --font-main: 'Gabarito', sans-serif;
    --font-accent:  'Nothing You Could Do', serif;
    --font-secondary: 'Majestic Island', sans-serif;

    --color-black: #000000;
    --color-dark: #40352c;
    --color-brown: #7a4f30;
    --color-cream: #e5d5be;
    --color-accent: #585d1e;
    --color-white: #ffffff;

    /*Warna tambahan untuk page admin*/
    --color-danger: #9c3b2e;
    --color-warn: #b8892d;
    --color-warn-bg: #f3e3b8;
    --color-success-bg: #dfe3c0;
    --color-surface: #f6f0e6;
    --color-line: #d9cbb5;
    --color-muted: #6e6256;

    --page-margin: 60px;
    --content-max-width: 1800px;
}

@font-face {
    font-family: 'Majestic Island';
    src: url('fonts/Majestic Island.otf') format('opentype'),
         url('fonts/Majestic Island.ttf') format('truetype'); /* Fallback format for older browsers */
    font-weight: normal;
    font-style: normal;
}

.container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--page-margin);
}


html {
    scroll-snap-type: y mandatory;
    height: 100%;
    scroll-padding-top: 80px; /* Adjust this value based on your header height */
}

/*-- Base html --*/

    body {
        height: 100%;
        font-family: var(--font-main);
        background-color: var(--color-white);
        color: var(--color-dark);
        margin: 0;
    }

    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background-color: rgba(64, 53, 44, 0.7); /* was: background-color: var(--color-black); + opacity: 0.5; */
        color: var(--color-cream);
        padding: 10px 60px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 100;
        /* opacity: 0.5; */
    }

    .logo img {
        height: 40px;
        width: auto;
    }

    nav {
        display: flex;
        align-items: center;
    }

    .dropdown {
        position: relative;
    }

    .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background-color: rgba(0, 0, 0, 0.5);
        min-width: 160px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        padding: 8px 0;
    }

    .dropdown:hover .dropdown-menu {
        display: block;
    }

    .dropdown-menu a {
        display: block;
        margin-left: 0;
        padding: 10px 20px;
        white-space: nowrap;
    }

    .dropdown-menu a:hover {
        background-color: var(--color-dark);
    }

    nav a {
        color: var(--color-cream);
        text-decoration: none;
        margin-left: 20px;
    }

    nav a:hover {
        text-decoration: underline;
    }

    footer {
        text-align: center;
        padding: 20px;
        background-color: var(--color-dark);
        color: var(--color-cream);
        margin-top: 40px;
        scroll-snap-align: end;
    }

    footer p {
        margin: 4px 0;
    }

    .site-header {
        transition: opacity 0.4s ease;
    }

    body.has-hero-header .site-header {
        opacity: 0;
        pointer-events: none;
    }

    body.has-hero-header.scrolled .site-header {
        opacity: 1;
        pointer-events: auto;
    }

/*-- Index Page, Hero Section --*/

    .hero {
        background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
                        url('images/heroimage.png');
        background-size: cover;
        background-position: center;
        height: 100vh;
        display: flex;
        align-items: center;
        scroll-snap-align: start;
    }

    .hero .container {
        margin-left: 0;
        margin-right: auto;
        margin-bottom: 80px;
        margin-top: auto;
    }

    .hero content {
        text-align: left;
        margin-left: 0;
        margin-right: auto;
    }

    .hero-content h1 {
        font-size: 5em;
        color: var(--color-brown);
        line-height: 1.05;
        margin: 0;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    }

    .hero-content p {
        font-size: 1.5em;
        color: var(--color-brown);
        margin: 16px 0 24px 0;
    }

    .highlight {
        font-family: var(--font-secondary);
        color: var(--color-cream);
        font-weight: 700;
    }

    .hero {
        position: relative;
    }
    
    .hero-header {
        position: absolute;
        top: 40px;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        z-index: 10;
        transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .hero-logo img {
        height: 90px;
        width: auto;
    }

    .hero-nav {
        display: flex;
        gap: 24px;
    }

    .hero-nav a {
        color: var(--color-cream);
        text-decoration: none;
        font-size: 1.05em;
    }

    .hero-nav a:hover {
    text-decoration: underline;
    }

    body.has-hero-header.scrolled .hero-header {
        opacity: 0;
        pointer-events: none;
        transform: translateY(-20px);
    }

/*-- Index Page, About Section --*/

    .about {
        min-height: 100vh;
        width: 100%;
        display: flex;
        align-items: center;
        background-color: var(--color-cream);
        scroll-snap-align: start;
    }

    .about .container {
        margin-top: 60px;
        margin-bottom: 60px;
        margin-left: 0px;
        margin-right: 0px;
    }

    .about-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 80px;
        align-items: stretch;
        justify-content: flex-end;
    }

    .about-label {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .about-story {
        display: flex;
        align-items: center;
        text-align: right;
        justify-content: flex-end;
    }

    .about-label h2 {
        font-size: 1.5em;
        color: var(--color-black);
        margin-bottom: auto;
        margin-top: 0px;
        margin-left: 0px;
        margin-right: auto;
    }

    .about-label p {
        font-size: 1.1em;
        color: var(--color-brown);
        margin-bottom: 0px;
    }

    .about-story p {
        font-size: 2em;
        line-height: 1.3;
        color: var(--color-dark);
        text-align: right;
        margin-left: auto;
        margin-right: 0px;
        margin-top: 0px;
    }

    .highlight-about {
        font-family: var(--font-secondary);
        color: var(--color-dark);
        font-weight: 700;
    }

/*-- Index Page, Rooms Section --*/

    .rooms {
        display: flex;
        gap: 0;
        flex-wrap: nowrap;
        padding: 90px 20px 40px 20px;
        min-height: auto;
        scroll-snap-align: start;
        background-color: var(--color-cream);
    }

    .rooms h2 {
        font-size: 2.5em;
        color: var(--color-black);
        margin-left: 40px;
    }

    .room-list {
        display: flex;
        justify-content: center;
        gap: 40px;
        flex-wrap: wrap;
        width: 100%;
    }

/*Index Page, Specification section*/

    .specs {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 60px;
        padding: 60px 0;
        background-color: var(--color-white);
        color: var(--color-dark);
        overflow: hidden;
        scroll-snap-align: start;
    }

    .slideshow {
        width: 100%;
        overflow: hidden;
    }

    .slideshow-track {
        display: flex;
        width: max-content;
        animation: slide-left 25s linear infinite;
    }

    .slideshow-track img {
        width: 450px;
        height: 450px;
        object-fit: cover;
        border-radius: 8px;
        margin-right: 20px;
        flex-shrink: 0;
    }

    @keyframes slide-left {
        from {
            transform: translateX(0);
        }
        to {
            transform: translateX(-50%);
        }
    }

    .stats-row {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 40px;
        text-align: center;
    }

    .stat-item {
        flex: 1;
        min-width: 150px;
    }

    .stat-number {
        display: block;
        font-size: 3em;
        font-weight: 700;
        color: var(--color-accent);
    }

    .stat-item p {
        margin-top: 8px;
        font-size: 1.05em;
    }

/*Index Page, reviews section*/
    .reviews {
        min-height: 100vh;
        display: flex;
        align-items: center;
        background-color: var(--color-white);
        scroll-snap-align: start;
    }

    .reviews h2 {
        text-align: center;
        font-size: 2.5em;
        color: var(--color-black);
        margin-bottom: 50px;
    }

    .review-carousel {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px;
    }

    .carousels-btn {
        flex-shrink: 0;
        background-color: rgba(0, 0, 0, 1);
        color: var(--color-cream);
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.2em;
    }

    .review-track {
        position: relative;
        max-width: 600px;
        width: 100%;
        height: 220px;
    }

    .review-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        text-align: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.8s ease-in-out;
    }

    .review-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

    .stars {
        color: var(--color-accent);
        font-size: 1.5em;
        margin-bottom: 16px;
    }

    .review-text {
        font-size: 1.3em;
        line-height: 1.7;
        color: var(--color-dark);
        margin-bottom: 20px;
    }

    .review-author {
        font-family: var(--font-accent);
        font-size: 1.3em;
        color: var(--color-brown);
    }

/*Rooms Page*/

    .room-card {
        background-color: white;
        border: 1px solid var(--color-brown);
        border-radius: 10px;
        padding: 20px;
        width: 30%;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        text-align: center;
    }

    .room-card img {
        width: 100%;
        height: 250px;
        object-fit: cover;
        border-radius: 4px;
    }

    .room-card h3 {
        font-size: 1.5em;
        margin-top: 16px;
    }

    .room-card p {
        font-size: 1.05em;
        color: var(--color-dark);
        margin-top: 12px 0;
    }

    .room-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 60px;
        min-height: 100vh;
        max-width: var(--content-max-width);
        margin: 0 auto;
        padding: 90px var(--page-margin) 40px var(--page-margin);
        scroll-snap-align: start;
    }

    .room-row.alt {
        direction: rtl;
    }

    .room-row.alt > * {
        direction: ltr;
    }

    .room-image img {
        width: 100%;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .room-info {
        text-align: left;
    }

    .room-info h3 {
        font-size: 2.2em;
        color: var(--color-black);
        margin-bottom: 16px;
    }

    .room-info p {
        color: var(--color-dark);
        font-size: 1.15em;
        margin-bottom: 24px;
        line-height: 1.6;
    }

    .book-btn {
        margin-top: 12px;
        padding: 10px 20px;
        background-color: var(--color-brown);
        color: var(--color-cream);
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1em;
    }

    .book-btn:hover {
        background-color: var(--color-accent);
        color: var(--color-cream);
    }

/* --- News Page, Carousel fo Ongoing Promos --- */
    .promo-carousel {
        padding: 90px 0 40px 0;
        text-align: center;
        scroll-snap-align:start;
    }

    .promo-carousel h2 {
        font-size: 2.8em;
        color: var(--color-black);
        margin-bottom: 30px;
    }

    .carousel {
        position: relative;
        align-items: center;
        justify-content: center;
        gap: 20px;
        width: 100%;
        max-width: none;
        margin: 0 auto;
    }

    .carousel-track {
        position: relative;
        width: 100%;
        height: 70vh;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .carousel-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.8s ease-in-out;
    }

    .carousel-slide.active {
        opacity: 1;
        pointer-events: auto;
    }

    .carousel-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .carousel-caption {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(transparent,rgba(0, 0, 0, 0.75));
        color: var(--color-cream);
        padding: 30px 20px 20px 20px;
        text-align: left;
    }

    .carousel-caption h3 {
        font-size: 1.6em;
        margin: 0 0 6px 0;
    }

    .carousel-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background-color: var(--color-black);
        color: var(--color-cream);
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        cursor: pointer;
        font-size: 1.2em;
        flex-shrink: 0;
    }

    .carousel-btn.prev {
        left: 20px;
    }

     .carousel-btn.next {
        right: 20px;
    }

    .carousel-btn:hover {
        background-color: var(--color-accent);
    }

/* -- Two Column Area News Page -- */
    .news-promo-columns {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 50px;
        max-width: var(--content-max-width);
        margin: 0 auto;
        padding: 40px var(--page-margin) 90px var(--page-margin);
        scroll-snap-align: start;
    }

    .news-promo-columns h2 {
        font-size: 2em;
        color: var(--color-black);
        margin-bottom: 24px;
    }

    .news-item{
        display: flex;
        gap: 20px;
        padding-bottom: 24px;
        margin-bottom: 24px;
        border-bottom: 1px solid var(--color-brown);
    }

    .news-item img {
        width: 200px;
        height: 150px;
        object-fit: cover;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .news-item-content h3 {
        font-size: 1.3em;
        color: var(--color-black);
        margin: 4px 0 8px 0;
    }

    .past-promo-item {
        display: flex;
        gap: 14px;
        align-items: center;
        padding-bottom: 16px;
        margin-bottom: 16px;
        border-bottom: 1px solid var(--color-brown);
    }

    .past-promo-item img {
        width: 90px;
        height: 65px;
        object-fit: cover;
        border-radius: 6px;
        flex-shrink: 0;
    }

    .past-promo-item h4 {
        flex: 1;
        font-size: 1.05em;
        color: var(--color-black);
        margin: 0;
    }

    .past-promo-item card-date {
        flex-shrink: 0;
        white-space: nowrap;
        text-align: right;
        margin: 0;
    }

    .card-date {
        color: var(--color-accent);
        font-weight: 600;
        font-size: 0.9em;
        margin-bottom: 12px;
    }

/* -- Facilities Page --*/

    .facility-section {
        position: relative;
        height: 90vh;
        background-size: cover;
        background-position: center;
        display: flex;
        align-items: flex-end;
        padding: 60px var(--page-margin);
        scroll-snap-align: start;
    }

    .facility-section::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 60%);
    }

    .facility-content {
        position: relative;
        z-index: 1;
        max-width: 600px;
        color: var(--color-white);
    }

    .facility-content h2 {
        font-size: 2.5em;
        margin-bottom: 12px;
    }

    .facility-content p {
        font-size: 1.15em;
        line-height: 1.6;
    }

/*-- Gallery Page --*/

    .gallery-section {
        padding: 90px 0;
        scroll-snap-align: start;
    }

    .gallery-section h2 {
        font-size: 2.8em;
        color: var(--color-black);
        text-align: center;
        margin-bottom: 40px;
    }

    .masonry {
        column-count: 3;
        column-gap: 20px;
    }

    .masonry img {
        width: 100%;
        display: block;
        margin-bottom: 20px;
        border-radius: 8px;
        cursor: pointer;
        break-inside: avoid;
        transition: opacity 0.3s ease;
    }

    .masonry img:hover {
        opacity: 0.85;
    }

    /* --- Lightbox --- */
    .lightbox {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        z-index: 1000;
        align-items: center;
        justify-content: center;
    }

    .lightbox.active {
        display: flex;
    }

    .lightbox img {
        max-width: 85vw;
        max-height: 85vh;
        object-fit: contain;
        border-radius: 6px;
    }

    .lightbox-close {
        position: absolute;
        top: 30px;
        right: 40px;
        color: var(--color-white);
        font-size: 2.5em;
        cursor: pointer;
        line-height: 1;
    }

/*-- Availability Page --*/
    .availability-page {
        padding: 90px 0;
        scroll-snap-align: start;
        min-height: 100vh;
    }

    .availability-page .container {
        max-width: 700px;
    }

    .calendar-header {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 30px;
        margin-bottom: 30px;
    }

    .calendar-header h2 {
        font-size: 1.8em;
        color: var(--color-black);
        min-width: 220px;
        text-align: center;
    }

    .room-filter {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 30px;
        margin-bottom: 30px;  
        cursor: pointer;
    }

    .room-filter label {
        font-size: 1.8em;
        color: var(--color-black);
        min-width: 100px;
        text-align: center;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .room-filter input {
        cursor: pointer;
        height: 15px;
        width: 15px;
    }

    .weekday-row {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        text-align: center;
        font-weight: 600;
        color: var(--color-dark);
        margin-bottom: 10px;
    }

    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 8px;
    }

    .calendar-day {
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        font-size: 1.1em;
        color: var(--color-white);
    }

    .calendar-day.blank {
        background: none;
    }

    .calendar-day.green {
        background-color: #1b998b;
    }

    .calendar-day.yellow {
        background-color: #FF729F;
        color: var(--color-black);
    }

    .calendar-day.red {
        background-color: #6d696a;
    }

    .calendar-grid.loading {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 300px;
    }

    .calendar-loading {
        color: var(--color-dark);
        font-size: 1.2em;
    }

    .legend {
        display: flex;
        justify-content: center;
        gap: 30px;
        margin-top: 30px;
    }

    .legend-item {
        display: flex;
        align-items: center;
        gap: 8px;
        color: var(--color-dark);
    }

    .legend-dot {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        display: inline-block;
    }

    .legend-dot.green { background-color: #1b998b; }
    .legend-dot.yellow { background-color: #FF729F; }
    .legend-dot.red { background-color: #6d696a; }