:root {
    --primary-color: #4151E0;
    --secondary-color: #3f37c9;
    --primary-transparent: rgba(65, 81, 224, 0.7);
    --secondary-transparent: rgba(63, 55, 201, 0.7);
    --section-color1: #F0F7FB;
    --accent-color: #FF6B6B;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    --gradient-transparent: linear-gradient(135deg, var(--primary-transparent) 0%, var(--secondary-transparent) 100%);
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Navbar Modern */
.navbar {
    padding: 15px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    color: var(--dark-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

.nav-item-pelayanan {
    margin-left: 10px;
}

.pelayanan-box {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 8px;
    background-color: rgba(67, 97, 238, 0.1);
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.pelayanan-box:hover {
    background-color: rgba(67, 97, 238, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.15);
}

/* Efek aktif */
.pelayanan-box:active {
    transform: translateY(0);
}

/* Penyesuaian untuk mobile */
@media (max-width: 991px) {
    .nav-item-pelayanan {
        margin-left: 0;
        margin-top: 5px;
    }

    .pelayanan-box {
        display: inline-block;
        width: auto;
        margin: 5px 0;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0 0;
    background: var(--gradient);
    color: white;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-bottom: 50px;
}

.hero-title {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-weight: 300;
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Card Modern */
.card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 30px;
}

.card-header {
    background: var(--gradient);
    color: white;
    font-weight: 600;
    border-bottom: none;
    padding: 15px 20px;
}

.card-footer {
    background: var(--gradient);
    color: white;
    font-weight: 600;
    border-top: none;
    padding: 15px 20px;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 20px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--gradient);
}

.footer-title {
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.social-media a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    color: white;
    transition: all 0.3s ease;
}

.social-media a:hover {
    background: white;
    transform: translateY(-5px);
}

.social-media img {
    width: 20px;
    height: 20px;
    justify-content: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
}

/* Button */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.8s ease forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Section Title */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
    font-weight: 700;
    color: var(--dark-color);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: var(--gradient);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

/* Mega Menu Styles */
.dropdown-mega {
    position: static !important;
}

.dropdown-menu-mega {
    width: 100%;
    left: 0;
    right: 0;
    padding: 20px;
    margin-top: 10px;
    border-radius: 0 0 15px 15px;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: white;
    border-top: 5px solid var(--primary-color);
}

.dropdown-mega>.dropdown-toggle::after {
    display: none !important;
}

.mega-menu-content {
    max-width: 1200px;
    margin: 0 auto;
}

.mega-menu-title {
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.mega-menu-list {
    list-style: none;
    padding: 0;
}

.mega-menu-list li {
    margin-bottom: 8px;
}

.mega-menu-list a {
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
    padding: 5px 0;
}

.mega-menu-list a:hover {
    color: var(--primary-color);
    background-color: lightblue;
    padding-left: 5px;
}

.mega-menu-list a i {
    margin-right: 8px;
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.mega-menu-col {
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
}

/* Perbaikan untuk mobile scroll */
@media (max-width: 1152px) {
    .dropdown-menu-mega {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
        margin-top: 5px;
        width: auto !important;
    }

    .mega-menu-content {
        padding: 15px;
    }

    .mega-menu-col {
        margin-bottom: 20px;
    }

    /* Tombol tutup untuk mobile */
    .mega-menu-mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 15px;
        background: var(--primary-color);
        color: white;
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .mega-menu-mobile-title {
        font-weight: bold;
        margin: 0;
    }

    .mega-menu-close-btn {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        line-height: 1;
    }
}

/* Responsive Mega Menu */
@media (min-width: 992px) {

    /* Menghilangkan panah dropdown */
    .dropdown-toggle::after {
        display: none !important;
    }

    /* Mega Menu muncul saat hover */
    .dropdown-mega:hover .dropdown-menu-mega {
        display: block !important;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Animasi untuk dropdown */
    .dropdown-menu-mega {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
    }

    /* Tetap pertahankan fungsi klik untuk mobile */
    @media (max-width: 1152px) {
        .dropdown-menu-mega {
            display: none;
            opacity: 1;
            visibility: visible;
            transform: none;
        }

        .dropdown-mega.show .dropdown-menu-mega {
            display: block;
        }
    }

    .dropdown-menu-mega {
        overflow: visible !important;
    }

    .mega-menu-mobile-header {
        display: none;
    }
}

/* Navbar Dropdown Arrow */
.dropdown-toggle::after {
    transition: transform 0.3s ease;
}

.show.dropdown-toggle::after {
    transform: rotate(180deg);
}