/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: #f8fafc;
    /* Fade-in & Slide-up Page Transition */
    animation: fadeInUpPage 0.8s cubic-bezier(0.34, 1.3, 0.64, 1) forwards;
    opacity: 0;
    transform-origin: top center;
}

@keyframes fadeInUpPage {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Outfit', sans-serif;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    pointer-events: none; 
}

/* 3D Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* 3D Carousel System */
.carousel {
    border-radius: 28px;
    overflow: hidden;
    margin: 25px auto 65px auto;
    max-width: 96%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 
        0 30px 70px rgba(0, 0, 0, 0.15), 
        0 15px 35px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transform: perspective(1000px) rotateX(0deg);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-style: preserve-3d;
}

.carousel:hover {
    transform: perspective(1000px) rotateX(1.5deg) translateY(-5px);
    box-shadow: 
        0 40px 90px rgba(0, 0, 0, 0.22), 
        0 20px 45px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.carousel-inner {
    transform-style: preserve-3d;
    border-radius: 28px;
}

.carousel-item {
    transform-style: preserve-3d;
}

.carousel-item img {
    width: 100%;
    height: 580px; /* Kembali ke ukuran awal untuk desktop/laptop */
    object-fit: cover;
    transition: transform 1.5s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (max-width: 991.98px) {
    .carousel {
        margin-bottom: 30px !important; /* kurangi jarak bawah carousel di tablet/iPad */
    }
    .carousel-item img {
        height: auto;
        aspect-ratio: 16 / 9; /* Dikecilkan rasionya tetap pas digeser/di HP/di iPad */
    }
}

/* 3D Zoom Effect when active */
.carousel-item.active img {
    transform: scale(1.04);
}

/* 3D Floating Glassmorphism Caption */
.carousel-caption {
    background: rgba(15, 23, 42, 0.25) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 30px;
    bottom: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    max-width: 60%;
    left: 50%;
    transform: translate3d(-50%, 0, 60px) scale(0.95);
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-item.active .carousel-caption {
    transform: translate3d(-50%, 0, 60px) scale(1);
}

.carousel-caption h5 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
}

.carousel-caption p {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    .carousel-caption {
        max-width: 85%;
        padding: 10px 15px;
        bottom: 20px;
        border-radius: 16px;
    }
    .carousel-caption h5 {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    .carousel-caption p {
        font-size: 0.8rem;
    }
}

/* 3D Cards */
.card img {
    width: 100%;
    aspect-ratio: 4 / 3; /* aspect ratio adapts dynamically to responsive width */
    object-fit: cover;
}

.card {
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(0,0,0,0.05);
    background: linear-gradient(145deg, #ffffff, #f5f5f5);
}

.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.9);
}

/* Smaller cards layout adjustment */
.card {
    max-width: 18rem;
    margin: 0 auto;
}

.row.gx-1 > [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
}

/* 3D Buttons */
.btn-primary {
    background: linear-gradient(145deg, #0d6efd, #0b5ed7);
    border: none;
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.4), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.5), inset 0 1px 0 rgba(255,255,255,0.3);
    background: linear-gradient(145deg, #0b5ed7, #0a53be);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(13, 110, 253, 0.4);
}

.btn-outline-primary {
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.1);
    background: white;
    transition: all 0.2s ease;
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.2);
}

/* 3D Glassmorphism Dock (under Carousel) */
.interest-dock {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.08), 
        0 1px 0 rgba(255, 255, 255, 0.9) inset, 
        0 8px 16px rgba(13, 110, 253, 0.05);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.interest-dock:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.12), 
        0 1px 0 rgba(255, 255, 255, 0.9) inset, 
        0 12px 24px rgba(13, 110, 253, 0.08);
}

.interest-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #0f172a;
    font-size: 1.15rem;
    letter-spacing: -0.2px;
}

.btn-dock-action {
    padding: 10px 24px;
    border-radius: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3) !important;
}

/* Animated Dropdown Menu for Desktop only */
@media (min-width: 992px) {
    .navbar-nav .dropdown-menu {
        display: block !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(15px) scale(0.95);
        transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.25s;
    }

    .navbar-nav .dropdown-menu.show {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }
}

/* 3D Footer */
footer {
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
    background: linear-gradient(to bottom, #ffffff, #f8f9fa) !important;
}

/* Responsive Dock and Cards on Mobile */
@media (max-width: 575.98px) {
    .carousel {
        margin-bottom: 20px !important; /* kurangi jarak bawah carousel lebih sedikit lagi di HP */
    }
    .interest-dock {
        padding: 10px 14px !important;
        border-radius: 18px;
    }
    .interest-text {
        font-size: 0.88rem !important;
        letter-spacing: -0.3px;
    }
    .btn-dock-action {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
        border-radius: 12px !important;
    }
    
    /* Responsive Cards overrides */
    .card-body {
        padding: 12px !important;
    }
    .card-title {
        font-size: 0.9rem !important;
        margin-bottom: 4px !important;
    }
    .card-text {
        font-size: 0.72rem !important;
        line-height: 1.35 !important;
    }
    .container.my-5 {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    .row.g-4 {
        --bs-gutter-x: 0.6rem !important;
        --bs-gutter-y: 0.6rem !important;
    }
}

/* Custom Modal Overlay */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: transparent; /* completely transparent */
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Custom Modal Wrapper */
.custom-modal-wrapper {
    position: absolute;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    z-index: 10;
}

.custom-modal-overlay.active .custom-modal-wrapper {
    transform: scale(1);
    opacity: 1;
}

/* Custom Modal Container */
.custom-modal-container {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 28px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.18), 
        0 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 35px;
    box-sizing: border-box;
}

/* Custom Modal Close Button */
.custom-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.05);
    border: none;
    color: #475569;
    font-size: 1.8rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1;
    z-index: 20;
}

.custom-modal-close:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
    transform: scale(1.05);
}

/* Modal Content Styles */
.modal-title-custom {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: #0f172a;
    font-size: 1.6rem;
    margin-bottom: 20px;
    padding-right: 45px;
    line-height: 1.3;
}

.modal-content-custom {
    font-family: 'Inter', sans-serif;
    font-size: 0.98rem;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 25px;
}

/* Tips Container */
.modal-tips-container {
    background: linear-gradient(145deg, #f0fdf4, #dcfce7); /* soft green gradient */
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(74, 222, 128, 0.25);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.tips-heading {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #14532d;
    margin-bottom: 12px;
}

.tips-list {
    margin: 0;
    padding-left: 20px;
}

.tips-list li {
    font-family: 'Inter', sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    color: #166534;
    margin-bottom: 8px;
}

.tips-list li:last-child {
    margin-bottom: 0;
}

/* Responsive modal adjustment */
@media (max-width: 575.98px) {
    .custom-modal-container {
        padding: 24px;
        width: 95%;
        border-radius: 20px;
        max-height: 90vh;
    }
    .modal-title-custom {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    .modal-content-custom {
        font-size: 0.88rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    .modal-tips-container {
        padding: 16px;
    }
    .tips-heading {
        font-size: 1rem;
    }
    .tips-list li {
        font-size: 0.82rem;
    }
}
