/* =========================================================
   Bukit Lawang Eco-Tourism — Custom Tropical Luxury Theme
   Colors:
   - Emerald Deep : #064E3B
   - Forest Green : #047857
   - Sage Accent  : #10B981
   - Pure White   : #FFFFFF
   - Soft Cream   : #F8FAFC
   ========================================================= */

:root {
    --bl-emerald-deep: #064E3B;
    --bl-forest: #047857;
    --bl-sage: #10B981;
    --bl-sage-soft: #ECFDF5;
    --bl-surface: #FFFFFF;
    --bl-cream: #F8FAFC;
    --bl-ink: #0F172A;
    --bl-muted: #475569;
}

html {
    scroll-behavior: smooth;
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--bl-ink);
    background-color: var(--bl-cream);
}

.font-serif-display {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* Custom sleek scrollbar */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
    background: #94A3B8;
    border-radius: 9999px;
    border: 2px solid #F1F5F9;
}

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Glassmorphism Navigation & Surfaces */
.glass-nav {
    background: rgba(6, 78, 59, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    transition: background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.glass-nav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(6, 78, 59, 0.08);
    box-shadow: 0 12px 32px -12px rgba(6, 78, 59, 0.14);
}

.glass-nav.scrolled .nav-brand-text,
.glass-nav.scrolled .nav-link-item {
    color: #064E3B;
}

.glass-nav.scrolled .nav-link-item:hover {
    color: #10B981;
}

.glass-nav.scrolled .nav-brand-sub {
    color: #047857;
}

.glass-nav.scrolled .mobile-toggle-btn {
    color: #064E3B;
    border-color: rgba(6, 78, 59, 0.18);
    background: rgba(6, 78, 59, 0.05);
}

.glass-card-dark {
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.glass-card-light {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(6, 78, 59, 0.08);
}

/* Soft luxury shadow */
.shadow-emerald-soft {
    box-shadow: 0 18px 42px -18px rgba(6, 78, 59, 0.16), 0 4px 12px -4px rgba(15, 23, 42, 0.05);
}

.shadow-emerald-hover {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
}

.shadow-emerald-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 50px -16px rgba(6, 78, 59, 0.24), 0 8px 20px -6px rgba(16, 185, 129, 0.12);
}

/* Hero subtle zoom animation */
@keyframes heroSlowZoom {
    0% {
        transform: scale(1.0);
    }
    100% {
        transform: scale(1.08);
    }
}

.hero-bg-animate {
    animation: heroSlowZoom 22s ease-in-out infinite alternate;
}

/* Scroll Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg-animate {
        animation: none;
    }
    .reveal-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Native Lightbox Dialog */
dialog.bl-lightbox {
    background: transparent;
    border: none;
    padding: 0;
    max-width: min(92vw, 1080px);
    max-height: 92vh;
    margin: auto;
    overflow: visible;
}

dialog.bl-lightbox::backdrop {
    background: rgba(2, 24, 18, 0.86);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

dialog.bl-lightbox[open] {
    animation: lightboxFadeIn 0.25s ease-out;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Interactive Star Rating */
.star-btn {
    transition: transform 0.18s ease, color 0.18s ease;
}

.star-btn:hover {
    transform: scale(1.18);
}

/* Simple-DataTables Tailwind Luxury Overrides (Admin) */
.datatable-wrapper .datatable-top {
    padding: 0 0 1.25rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.datatable-wrapper .datatable-bottom {
    padding: 1.25rem 0 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid #F1F5F9;
    margin-top: 0.75rem;
}

.datatable-wrapper .datatable-input {
    border: 1px solid #CBD5E1;
    border-radius: 0.75rem;
    padding: 0.55rem 0.95rem;
    font-size: 0.875rem;
    color: #0F172A;
    background: #FFFFFF;
    min-width: 240px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.datatable-wrapper .datatable-input:focus {
    outline: none;
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}

.datatable-wrapper .datatable-selector {
    border: 1px solid #CBD5E1;
    border-radius: 0.65rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    background: #FFFFFF;
    color: #0F172A;
    margin-right: 0.5rem;
}

.datatable-wrapper .datatable-dropdown label {
    font-size: 0.85rem;
    color: #64748B;
}

.datatable-wrapper .datatable-info {
    font-size: 0.85rem;
    color: #64748B;
}

.datatable-wrapper .datatable-table {
    border-collapse: collapse;
    width: 100%;
}

.datatable-wrapper .datatable-table > thead > tr > th {
    background-color: #F8FAFC;
    color: #334155;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #E2E8F0;
    text-align: left;
}

.datatable-wrapper .datatable-table > tbody > tr > td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    vertical-align: middle;
    font-size: 0.9rem;
}

.datatable-wrapper .datatable-table > tbody > tr:hover {
    background-color: #F8FAFC;
}

.datatable-wrapper .datatable-pagination ul {
    display: flex;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.datatable-wrapper .datatable-pagination a,
.datatable-wrapper .datatable-pagination button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    height: 2.15rem;
    padding: 0 0.65rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    transition: all 0.18s ease;
}

.datatable-wrapper .datatable-pagination a:hover,
.datatable-wrapper .datatable-pagination button:hover {
    background: #ECFDF5;
    color: #064E3B;
    border-color: #A7F3D0;
}

.datatable-wrapper .datatable-pagination .datatable-active a,
.datatable-wrapper .datatable-pagination .datatable-active button {
    background: #064E3B;
    color: #FFFFFF;
    border-color: #064E3B;
}

.datatable-wrapper .datatable-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #64748B;
}

/* =========================================================
   Admin Collapsible Sidebar (Desktop Mini Mode) & Dropdown
   ========================================================= */
#adminSidebar {
    transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 1024px) {
    html.sidebar-collapsed #adminSidebar {
        width: 5.25rem;
    }

    html.sidebar-collapsed #adminSidebar .sidebar-brand-wrap {
        padding-left: 0;
        padding-right: 0;
        justify-content: center;
    }

    html.sidebar-collapsed #adminSidebar .sidebar-text,
    html.sidebar-collapsed #adminSidebar .sidebar-section-label,
    html.sidebar-collapsed #adminSidebar .sidebar-badge-full {
        display: none;
    }

    html.sidebar-collapsed #adminSidebar .sidebar-nav {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    html.sidebar-collapsed #adminSidebar .sidebar-link {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
        position: relative;
    }

    html.sidebar-collapsed #adminSidebar .sidebar-badge-dot {
        display: inline-block;
    }
}

/* Minimalist Emerald-Matched Sidebar Scrollbar */
#adminSidebar .sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(16, 185, 129, 0.3) transparent;
}

#adminSidebar .sidebar-nav:hover {
    scrollbar-color: rgba(52, 211, 153, 0.55) transparent;
}

#adminSidebar .sidebar-nav::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

#adminSidebar .sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
    margin: 8px 0;
}

#adminSidebar .sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(16, 185, 129, 0.28);
    border-radius: 9999px;
    border: none;
    transition: background-color 0.2s ease;
}

#adminSidebar .sidebar-nav:hover::-webkit-scrollbar-thumb {
    background: rgba(52, 211, 153, 0.5);
}

#adminSidebar .sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 211, 153, 0.78);
}

.profile-dropdown-panel {
    transform-origin: top right;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.profile-dropdown-panel.is-hidden {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    pointer-events: none;
}

/* =========================================================
   Testimonial Auto-Sliding Carousel (Slide Left + Hover Chevrons)
   ========================================================= */
.testimonial-track {
    will-change: transform;
}

.testimonial-track.is-animating {
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.testimonial-slide {
    flex: 0 0 100%;
    width: 100%;
}

@media (min-width: 640px) {
    .testimonial-slide {
        flex: 0 0 50%;
        width: 50%;
    }
}

/* Keep chevrons subtly accessible on touch-only devices */
@media (hover: none) {
    .testimonial-carousel .testimonial-nav-btn {
        opacity: 0.92;
        transform: translateY(-50%) scale(1);
        pointer-events: auto;
    }
}

/* =========================================================
   Floating Back-to-Top Button (Visible on Scroll)
   ========================================================= */
.back-to-top-btn {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(14px) scale(0.92);
    transition:
        opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        visibility 0.28s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.back-to-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.back-to-top-btn.is-visible:hover {
    transform: translateY(-2px) scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .back-to-top-btn {
        transform: none;
        transition: opacity 0.15s ease, visibility 0.15s ease;
    }
    .back-to-top-btn.is-visible:hover {
        transform: none;
    }
}
