/* CUSTOM STYLES & ANIMATIONS */

:root {
    --primary: #000000;
    --gold: #b59d1b;
    --transition: all 0.3s ease;
}

* {
    scroll-behavior: smooth;
}

/* FADE IN ANIMATION */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(181, 157, 27, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(181, 157, 27, 0.6);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

.fade-in-on-scroll {
    opacity: 0;
    animation: fadeInUp 1.5s ease-out forwards;
}

/* Testimoni hover zoom */
.testimonial-card {
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease;
    will-change: transform;
}
.testimonial-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

/* News card hover zoom */
.news-card {
    transition: transform 0.35s cubic-bezier(.2,.8,.2,1), box-shadow 0.35s ease;
    will-change: transform;
}
.news-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 14px 36px rgba(0,0,0,0.12);
}

/* Paket card hover zoom */
.paket-card {
    transition: transform 0.32s cubic-bezier(.2,.8,.2,1), box-shadow 0.32s ease;
    will-change: transform;
}
.paket-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 10px 26px rgba(0,0,0,0.10);
}

.section-title {
    position: relative;
    display: inline-block;
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #b59d1b, transparent);
    animation: fadeIn 1s ease-out 0.3s forwards;
}

/* HEADER STYLING */
header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo {
    font-weight: 800;
    letter-spacing: -1px;
    animation: fadeInUp 0.6s ease-out;
}

header nav a {
    position: relative;
    transition: var(--transition);
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #b59d1b;
    transition: width 0.3s ease;
}

header nav a:hover::after {
    width: 100%;
}

/* HERO CAROUSEL */
.hero-section {
    margin-top: 64px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.carousel-item.active {
    opacity: 1;
}

.carousel-item h1 {
    animation: slideIn 0.8s ease-out;
}

.carousel-item p {
    animation: slideIn 0.8s ease-out 0.2s backwards;
}

.carousel-item a {
    animation: slideIn 0.8s ease-out 0.4s backwards;
}

/* BUTTONS */
button, a.btn, input[type="submit"] {
    transition: var(--transition);
    cursor: pointer;
    font-weight: 600;
}

button:hover, a.btn:hover, input[type="submit"]:hover {
    transform: translateY(-2px);
}

/* CAROUSEL BUTTONS */
#prevHero, #nextHero,
#prevProduk, #nextProduk,
#prevTestimoni, #nextTestimoni {
    transition: var(--transition);
}

#prevHero:hover, #nextHero:hover,
#prevProduk:hover, #nextProduk:hover,
#prevTestimoni:hover, #nextTestimoni:hover {
    transform: scale(1.1);
}

/* CARDS */
.card {
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(181, 157, 27, 0.15) !important;
}

/* PRODUCT CAROUSEL */
.carousel-track {
    transition: transform 0.5s ease;
}

/* MODAL STYLING */
#imageModal {
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

#imageModal > div {
    animation: fadeInUp 0.3s ease;
}

#imageModal img {
    animation: fadeIn 0.5s ease;
}

/* IMAGE HOVER */
.carousel-item img, 
#legalitas img,
#berita img {
    transition: var(--transition);
}

.group:hover img {
    transform: scale(1.05);
    filter: brightness(0.95);
}

/* FORM STYLING */
input, textarea {
    transition: var(--transition);
}

input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(181, 157, 27, 0.1);
    border-color: #b59d1b !important;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .carousel-track {
        grid-template-columns: 1fr !important;
    }

    .carousel-track-testimoni {
        grid-template-columns: 1fr !important;
    }

    .hero-section {
        margin-top: 0;
        padding-top: 60px;
    }

    .section-title {
        font-size: 2rem !important;
    }
}

/* LAZY LOAD ANIMATION */
.lazy-load {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

/* INTERSECTION OBSERVER DELAYS */
.fade-in-on-scroll:nth-child(1) { animation-delay: 0s; }
.fade-in-on-scroll:nth-child(2) { animation-delay: 0.1s; }
.fade-in-on-scroll:nth-child(3) { animation-delay: 0.2s; }
.fade-in-on-scroll:nth-child(4) { animation-delay: 0.3s; }

/* SMOOTH SCROLLING */
html {
    scroll-behavior: smooth;
}

/* FOCUS VISIBLE */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #b59d1b;
    outline-offset: 2px;
}

/* PERFORMANCE OPTIMIZATION */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* SHADOW OPTIMIZATION */
.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* TEXT OPTIMIZATION */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* PRINT OPTIMIZATION */
@media print {
    header, footer, .cta-section {
        display: none;
    }
}
