/* 
 * Global Styles
 * Extracted from app.blade.php layout
 */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text-main);
    background-color: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-heading) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: 1.25rem;
    color: var(--color-text-muted);
}

::selection {
    background-color: var(--color-primary-light);
    color: var(--color-selection-text);
}

/* --- OverlayScrollbars Bambu Theme --- */
.os-theme-bambu {
    --os-size: 8px;
    --os-padding-perpendicular: 2px;
    --os-padding-axis: 2px;
    --os-track-border-radius: 10px;
    --os-handle-border-radius: 10px;
    --os-track-bg: transparent;
    --os-track-bg-hover: transparent;
    --os-track-bg-active: transparent;
    --os-handle-bg: rgba(var(--color-secondary-rgb), 0.3);
    --os-handle-bg-hover: rgba(var(--color-secondary-rgb), 0.6);
    --os-handle-bg-active: rgba(var(--color-secondary-rgb), 0.8);
}

@media (prefers-color-scheme: dark) {
    .os-theme-bambu {
        --os-handle-bg: rgba(129, 199, 132, 0.3);
        --os-handle-bg-hover: rgba(129, 199, 132, 0.6);
        --os-handle-bg-active: rgba(129, 199, 132, 0.8);
    }
}

/* Hide native scrollbar entirely to let OverlayScrollbars take over smoothly */
html {
    scrollbar-width: none;
}
::-webkit-scrollbar {
    width: 0px;
    height: 0px;
    background: transparent;
}

/* Premium Scroll to Top Button */
#scrollToTopBtn {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 1050;
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(0, 40, 85, 0.85); /* Primary Dark */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 40, 85, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    transform: translateY(3rem) scale(0.9);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

#scrollToTopBtn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 40, 85, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    background: rgba(0, 40, 85, 0.95);
    color: #ffffff;
}

#scrollToTopBtn.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

@media (max-width: 767.98px) {
    #scrollToTopBtn {
        width: 3rem;
        height: 3rem;
        bottom: 1.5rem;
        right: 1rem;
    }
}

#scrollToTopBtn .material-symbols-outlined {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

#scrollToTopBtn:hover .material-symbols-outlined {
    transform: translateY(-3px);
}

/* --- Global Smooth Animations (Modern Aesthetic) --- */
/* Memaksa semua elemen dengan class transition-all, tombol, kartu, dan gambar memiliki animasi sangat halus */
.transition-all, .btn, .card, img, a {
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Meningkatkan interaksi bayangan (shadow) agar lebih halus saat dihover */
.shadow-sm, .shadow, .shadow-lg {
    transition: box-shadow 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Rounded Utilities for Earth Tone Design */
.rounded-organic {
    border-radius: var(--radius-organic) !important;
}
.rounded-card {
    border-radius: var(--radius-card) !important;
}
