:root {
    --primary-color: #224820;
    --primary-dark: #32642d;
    --secondary-color: #8b5cf6;
    --accent-color: #8b5cf6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-light: #f1f5f9;
    --gray-medium: #94a3b8;
    --gray-dark: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
    --border-radius-lg: 20px;

    --nav-bg: rgba(255, 255, 255, 0.98);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
    --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --nav-border: 1px solid rgba(0, 0, 0, 0.05);
    --nav-text: #1e293b;
    --nav-text-hover: #224820;
    --nav-accent: #224820;
    --nav-accent-light: rgba(34, 72, 32, 0.1);
    --nav-dropdown-bg: #ffffff;
    --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --nav-blur: blur(10px);
}

[data-bs-theme="dark"] {
    --primary-color: #2e7d32;
    --primary-dark: #1b5e20;
    --nav-bg: rgba(15, 23, 42, 0.98);
    --nav-bg-scrolled: rgba(15, 23, 42, 0.98);
    --nav-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --nav-border: 1px solid rgba(255, 255, 255, 0.05);
    --nav-text: #f1f5f9;
    --nav-text-hover: #4caf50;
    --nav-accent: #4caf50;
    --nav-accent-light: rgba(76, 175, 80, 0.1);
    --nav-dropdown-bg: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--light-color);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

/* TOP BAR MODERN */
.top-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 12px 0;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 1030;
}

.top-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.school-logo {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    padding: 5px;
    background: white;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.school-logo:hover {
    transform: scale(1.05);
}

.school-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: -0.5px;
}

.school-tagline {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 300;
}

.top-info {
    display: flex;
    gap: 30px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.top-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.top-info-item i {
    font-size: 1rem;
    opacity: 0.8;
}

.top-info-link {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    padding: 5px 10px;
    border-radius: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-info-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* NAVIGATION MODERN - OPTIMIZED FOR 10 MENUS */
.navbar-modern {
    background: var(--nav-bg);
    backdrop-filter: var(--nav-blur);
    -webkit-backdrop-filter: var(--nav-blur);
    box-shadow: var(--nav-shadow);
    border-bottom: var(--nav-border);
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1020;
    transition: var(--nav-transition);
}

.navbar-modern.scrolled {
    background: var(--nav-bg-scrolled);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* TOGGLER BUTTON */
.navbar-toggler {
    border: 1px solid var(--nav-accent-light);
    border-radius: 10px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    transition: var(--nav-transition);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px var(--nav-accent-light);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2834, 72, 32, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.25em;
    height: 1.25em;
}

/* NAV ITEMS - OPTIMIZED FOR 10 MENUS */
.navbar-modern .container {
    max-width: 1400px;
    padding: 0 15px;
    position: relative;
}

/* NAVIGASI UTAMA - Tanpa Scroll Button (karena 10 menu harus pas) */
.navbar-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 0;
}

.nav-item {
    flex: 1 0 auto;
    text-align: center;
    white-space: nowrap;
    position: relative;
}

/* NAV LINK OPTIMIZED - NO ICONS, COMPACT */
.nav-link {
    color: var(--nav-text) !important;
    font-weight: 500;
    padding: 0.6rem 0.5rem !important;
    border-radius: 8px;
    transition: var(--nav-transition);
    display: block;
    text-align: center;
    font-size: 0.85rem;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.nav-link:hover, .nav-link.active {
    color: var(--nav-accent) !important;
    background: var(--nav-accent-light);
    transform: translateY(-1px);
}

.nav-text {
    font-size: 0.85rem;
    font-weight: 500;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* DROPDOWN STYLES */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 8px 0;
    margin-top: 5px;
    animation: fadeIn 0.2s ease-out;
    min-width: 180px;
    max-width: 250px;
    font-size: 0.85rem;
}

/* Desktop: keep submenu visible while hovering parent/submenu area */
@media (min-width: 993px) {
    .navbar-nav .dropdown {
        position: relative;
    }

    .navbar-nav .dropdown::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 12px;
    }

    .navbar-nav .dropdown > .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }

    .navbar-nav .dropdown:hover > .dropdown-menu,
    .navbar-nav .dropdown:focus-within > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 8px 16px;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.dropdown-item:hover {
    background: var(--nav-accent-light);
    color: var(--nav-accent);
    padding-left: 20px;
}

.dropdown-item i {
    font-size: 0.75rem;
    width: 14px;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* SLIDER MODERN */
.hero-slider {
    margin-bottom: 40px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.carousel-item {
    height: 500px;
    position: relative;
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

.carousel-caption {
    text-align: left;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.carousel-caption h3 {
    color: var(--dark-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.carousel-caption p {
    color: var(--gray-dark);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.carousel-caption-bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top,
        rgba(0,0,0,0.9) 0%,
        rgba(0,0,0,0.7) 50%,
        rgba(0,0,0,0.4) 80%,
        transparent 100%);
    color: white;
    padding: 80px 40px 30px;
    text-align: left;
    z-index: 2;
}

.carousel-caption-bottom h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    max-width: 800px;
}

.carousel-caption-bottom p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 700px;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    transition: var(--transition);
}

.carousel-indicators .active {
    background-color: white;
    transform: scale(1.3);
}

.carousel-control-prev, .carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 15px;
    transition: var(--transition);
    opacity: 0.8;
}

.carousel-control-prev:hover, .carousel-control-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    opacity: 1;
}

.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: var(--primary-color);
    border-radius: 50%;
    padding: 8px;
    background-image: none;
    position: relative;
}

.carousel-control-prev-icon:before {
    content: '❮';
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.carousel-control-next-icon:before {
    content: '❯';
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* QUOTE SECTION */
.quote-section {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
}

.quote-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.quote-header i {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 50%;
}

.quote-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.quote-content {
    font-size: 1.2rem;
    font-style: italic;
    line-height: 1.8;
    margin-bottom: 10px;
}

.quote-author {
    font-weight: 600;
    text-align: right;
    font-size: 1rem;
    opacity: 0.9;
}

.quote-carousel .carousel-item {
    height: auto;
}

/* FOOTER MODERN */
.footer-primary {
    background: var(--dark-color);
    color: white;
    padding: 60px 0 30px;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-title {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 3px;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tag:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    color: white;
}

.facebook:hover { background: #1877f2; }
.twitter:hover { background: #1da1f2; }
.instagram:hover { background: #e4405f; }
.youtube:hover { background: #ff0000; }
.tiktok:hover { background: #000000; }

.footer-secondary {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--gray-medium);
}

.copyright a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.copyright a:hover {
    color: var(--secondary-color);
}

/* SEARCH MODAL */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.search-modal.active {
    display: flex;
    opacity: 1;
}

.search-form {
    width: 90%;
    max-width: 800px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 25px 30px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-color);
    transform: scale(1.02);
}

.search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.search-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-50%) scale(1.05);
}

.search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10000;
}

.search-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* BACK TO TOP */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) and (min-width: 993px) {
    .navbar-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .navbar-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-item {
        flex-shrink: 0;
    }

    .nav-link {
        padding: 0.6rem 0.8rem !important;
        font-size: 0.82rem;
    }

    .nav-text {
        font-size: 0.82rem;
        max-width: 100px;
    }

    .carousel-item {
        height: 450px;
    }

    .carousel-caption-bottom {
        padding: 70px 35px 25px;
    }

    .carousel-caption-bottom h3 {
        font-size: 1.6rem;
        margin-bottom: 10px;
    }

    .carousel-caption-bottom p {
        font-size: 1rem;
    }
}

@media (max-width: 992px) {
    .navbar-modern {
        padding: 0.5rem 0;
    }

    .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .nav-item {
        width: 100%;
        text-align: left;
        margin-bottom: 2px;
    }

    .nav-link {
        padding: 0.8rem 1rem !important;
        font-size: 0.9rem;
        justify-content: flex-start;
        text-align: left;
    }

    .nav-text {
        font-size: 0.9rem;
        max-width: none;
    }

    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        border: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.03);
    }

    .top-info {
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
        margin-top: 10px;
    }

    .carousel-item {
        height: 400px;
    }

    .carousel-caption-bottom {
        padding: 60px 30px 20px;
    }

    .carousel-caption-bottom h3 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }

    .carousel-caption-bottom p {
        font-size: 0.95rem;
    }
}

@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .school-brand h1 {
        font-size: 1.3rem;
    }

    .carousel-item {
        height: 350px;
    }

    .carousel-overlay {
        padding: 20px;
    }

    .carousel-caption-bottom {
        padding: 50px 25px 15px;
        background: linear-gradient(to top,
            rgba(0,0,0,0.95) 0%,
            rgba(0,0,0,0.8) 60%,
            rgba(0,0,0,0.5) 85%,
            transparent 100%);
    }

    .carousel-caption-bottom h3 {
        font-size: 1.2rem;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .carousel-caption-bottom p {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .carousel-control-prev, .carousel-control-next {
        width: 40px;
        height: 40px;
        margin: 0 10px;
    }

    .carousel-control-prev-icon, .carousel-control-next-icon {
        padding: 6px;
    }

    .carousel-control-prev-icon:before,
    .carousel-control-next-icon:before {
        font-size: 1rem;
    }

    .carousel-indicators [data-bs-target] {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }

    .copyright {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 280px;
    }

    .carousel-control-prev, .carousel-control-next {
        width: 45px;
        height: 45px;
        margin: 0 10px;
    }

    .search-input {
        font-size: 1.2rem;
        padding: 20px;
    }

    .search-submit {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .top-info {
        gap: 10px;
    }

    .top-info-item {
        font-size: 0.8rem;
    }

    .carousel-caption-bottom {
        padding: 40px 20px 10px;
        background: linear-gradient(to top,
            rgba(0,0,0,0.95) 0%,
            rgba(0,0,0,0.85) 70%,
            rgba(0,0,0,0.6) 90%,
            transparent 100%);
    }

    .carousel-caption-bottom h3 {
        font-size: 1rem;
        margin-bottom: 5px;
        line-height: 1.1;
        max-width: 100%;
    }

    .carousel-caption-bottom p {
        font-size: 0.8rem;
        line-height: 1.3;
        max-width: 100%;
    }
}

@media (max-width: 400px) {
    .carousel-item {
        height: 230px;
    }

    .carousel-caption-bottom {
        padding: 30px 15px 8px;
    }

    .carousel-caption-bottom h3 {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .carousel-caption-bottom p {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}

@media (min-width: 1400px) {
    .nav-link {
        padding: 0.7rem 1rem !important;
        font-size: 0.9rem;
    }

    .nav-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 1100px) and (min-width: 993px) {
    .nav-link {
        padding: 0.6rem 0.4rem !important;
        font-size: 0.8rem;
    }

    .nav-text {
        font-size: 0.8rem;
    }
}
