:root {
    --default-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Ubuntu, "Helvetica Neue", Helvetica, Arial, "PingFang SC",
        "Hiragino Sans GB", "Microsoft Yahei UI", "Microsoft Yahei",
        "Source Han Sans CN", sans-serif;
}

.toggle-area {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
}


.container {
    width: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    overflow-x: hidden;
}

.header-top {
    width: 100%;
    height: 118px;
    background: #519CFF;
    display: flex;
    position: relative;
}

.header-school-logo {
    width: 69px;
    height: 106px;
    margin-top: 6px;
    margin-left: 41px;
    background: url(./assets/images/school-logo.png) no-repeat center;
    background-size: cover;
}

.header-school-name {
    margin-top: 22px;
    margin-left: 24px;
    font-family: Inter, var(--default-font-family);
    font-size: 32px;
    font-weight: 800;
}

.login-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 40px;
    margin-left: auto;
    margin-right: 58px;
    width: 114px;
    height: 38px;
    cursor: pointer;
    background: #FFC300;
    font-family: Inter, var(--default-font-family) !important;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1.6px;
    border-radius: 10px;
}

.bottom {
    width: 100%;
    height: 68px;
    background: #FFC300;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.box-header {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    font-family: Inter, var(--default-font-family) !important;
    font-size: 18px;
    font-weight: 600 !important;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    cursor: pointer;
    margin-right: 46px;
}

.box-header:hover {
    background-color: #E6A800;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.box-header:active {
    background-color: #CC8C00;
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.triangle {
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 10px solid black;
    margin-left: 10px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background-color: #509cff !important;
    border: 1px solid #509cff !important;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1050 !important;
    white-space: nowrap;
    max-width: calc(100vw - 20px);
}

.dropdown-menu.show {
    display: block !important;
}

.box-header:hover .dropdown-menu {
    display: block !important;
}

.dropdown-item {
    padding: 10px 15px;
    text-decoration: none;
    color: black;
    display: block;
    font-weight: bold !important;
}

.dropdown-item:hover {
    background-color: #0c3879 !important;
    color: white !important;
    border: 1px solid white;
    border-radius: 5px;
}

.dropdown-menu-right {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    background-color: #509cff !important;
    border: 1px solid #509cff !important;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    white-space: nowrap;
    padding: 10px 0;
}

.dropdown-menu-right.show {
    display: block !important;
}

.box-header-right:hover .dropdown-menu-right {
    display: block !important;
}

.dropdown-menu-right .dropdown-item {
    padding: 10px 15px;
    text-decoration: none;
    color: black;
    display: block;
}

.dropdown-menu-right .dropdown-item:hover {
    background-color: #0c3879 !important;
    color: white;
    border-radius: 5px;
}

.box-header-right {
    position: relative;
}

.no-underline {
    text-decoration: none;
}

.burger-menu {
    display: none;
    width: 30px;
    height: 25px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    margin-right: 15px;
}

.burger-menu span {
    width: 100%;
    height: 4px;
    background: #0C3879;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    width: auto;
}

.nav-menu.active {
    display: flex;
}

@media (max-width: 768px) {
    .header-top {
        height: 80px;
        padding: 0 10px;
        background: #519CFF; /* Original header color */
    }

    .header-school-logo {
        width: 40px;
        height: 60px;
        margin-top: 10px;
        margin-left: 15px;
    }

    .header-school-name {
        margin-top: 15px;
        margin-left: 10px;
        font-size: 20px;
        color: black; /* Match desktop text color */
    }

    .login-button {
        margin-top: 25px;
        margin-right: 15px;
        width: 80px;
        height: 30px;
        font-size: 14px;
        letter-spacing: 1px;
        background: #FFC300; /* Original button color */
        color: black;
    }

    .bottom {
        height: 50px;
        padding: 0 10px;
        justify-content: space-between;
        background: #FFC300; /* Original bottom color */
    }

    .burger-menu {
        display: flex;
        width: 30px;
        height: 25px;
        cursor: pointer;
        flex-direction: column;
        justify-content: space-between;
        margin-right: 15px;
        order: 2;
        z-index: 1200;
        pointer-events: auto;
    }

    .burger-menu span {
        width: 100%;
        height: 4px;
        background: #0C3879; /* Match original burger menu color */
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-menu {
        display: none;
        position: fixed;
        top: 0;
        right: -80%; /* Start off-screen to the right */
        width: 80%; /* Cover 80% of the screen width */
        height: 100vh;
        background: #FFC300; /* Match original bottom color */
        flex-direction: column;
        padding: 20px;
        z-index: 1100;
        transition: right 0.3s ease-in-out;
        box-shadow: -2px 0 5px rgba(0,0,0,0.2);
        overflow-y: auto;
        pointer-events: auto;
        justify-content: flex-start;
    }

    .nav-menu.active {
        display: flex;
        right: 0; /* Slide in to the visible area */
    }

    .nav-menu .box-header {
        margin-right: 0;
        width: 100%;
        padding: 0;
        position: relative;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        z-index: 1120;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        color: black; /* Match original text color */
    }

    .nav-menu .box-header a {
        color: black; /* Match original link color */
    }

    .nav-menu .box-header {
        padding: 15px 20px;
        cursor: pointer;
        width: 100%;
        box-sizing: border-box;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: black; /* Match original text color */
    }

    .nav-menu .box-header .toggle-area:hover {
        background-color: #E6A800; /* Match original hover effect */
    }

    .nav-menu .box-header .toggle-area:active {
        background-color: #CC8C00; /* Match original active effect */
    }

    .nav-menu .box-header .triangle {
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 10px solid black; /* Match original triangle color */
        margin-left: 10px;
    }

    .nav-menu .dropdown-menu,
    .nav-menu .dropdown-menu-right {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background: #509cff !important; /* Match original dropdown background */
        padding: 0;
        display: none; /* Hidden by default */
        z-index: 1110;
        pointer-events: auto;
        margin: 0;
    }

    .nav-menu .dropdown-menu.show,
    .nav-menu .dropdown-menu-right.show {
        display: block; /* Shown when toggled */
    }

    .nav-menu .dropdown-item {
        padding: 12px 40px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        z-index: 1130;
        cursor: pointer;
        pointer-events: auto;
        width: 100%;
        box-sizing: border-box;
        background: #509cff; /* Match original dropdown item background */
        color: black; /* Match original text color */
        font-weight: normal;
    }

    .nav-menu .dropdown-item:hover {
        background-color: #0c3879 !important; /* Match original hover effect */
        color: white;
        border: none;
    }

    .nav-menu .box-header-right {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .nav-menu .box-header-right{
        padding: 15px 20px;
        cursor: pointer;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .nav-menu .box-header-right .toggle-area:hover {
        background-color: #E6A800; /* Match original hover effect */
    }

    .nav-menu .box-header-right .toggle-area:active {
        background-color: #CC8C00; /* Match original active effect */
    }

    .nav-menu .box-header-right .triangle {
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 10px solid black; /* Match original triangle color */
        margin-left: 10px;
    }

    .nav-menu.active {
        padding-top: 80px; /* Adjust to ensure content starts below the header */
    }

    /* Menu Overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
        z-index: 1099; /* Just below the nav-menu */
        pointer-events: none;
    }

    .nav-menu.active + .menu-overlay {
        display: block;
        pointer-events: auto;
    }
}

body, html {
    margin: 0;
    overflow-x: hidden;
}

/* Desktop-specific adjustments for dropdown triangles */
@media (min-width: 769px) {
    /* Target Profile (2nd), Informasi (5th), and Flag (7th) in .nav-menu */
    .container .bottom .nav-menu .box-header:nth-child(2) .toggle-area, /* Profile */
    .container .bottom .nav-menu .box-header:nth-child(5) .toggle-area, /* Informasi */
    .container .bottom .nav-menu .box-header:nth-child(7) .toggle-area { /* Flag (box-header-right) */
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important; /* Center the text/flag and triangle within the toggle-area */
        flex-wrap: nowrap !important; /* Prevent wrapping */
        padding: 10px !important; /* Match padding from .box-header for consistency */
    }

    /* Target the text or flag div to add spacing */
    .container .bottom .nav-menu .box-header:nth-child(2) .toggle-area > div:first-child,
    .container .bottom .nav-menu .box-header:nth-child(5) .toggle-area > div:first-child,
    .container .bottom .nav-menu .box-header:nth-child(7) .toggle-area > div:first-child {
        margin-right: 10px !important; /* Space between text/flag and triangle */
        margin-left: 0 !important; /* Reset any left margin */
    }

    /* Target the triangle to reset margins and ensure visibility */
    .container .bottom .nav-menu .box-header:nth-child(2) .toggle-area .triangle,
    .container .bottom .nav-menu .box-header:nth-child(5) .toggle-area .triangle,
    .container .bottom .nav-menu .box-header:nth-child(7) .toggle-area .triangle {
        margin-left: 0 !important; /* Override default margin-left: 10px */
    }
}

/* Landscape Mobile View Adjustments */
/* Landscape Mobile View Adjustments */
@media (orientation: landscape) and (max-width: 1024px) and (min-width: 481px) {
    /* Ensure no horizontal overflow */
    html, body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Header Adjustments */
    /* Navigation Menu */
    .bottom {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .burger-menu {
        display: flex !important;
        width: 30px;
        height: 25px;
        cursor: pointer;
        flex-direction: column;
        justify-content: space-between;
        margin-right: 15px;
        order: 2;
        z-index: 1200;
        pointer-events: auto;
    }

    .burger-menu span {
        width: 100%;
        height: 4px;
        background: #0C3879;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .burger-menu.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }

    .burger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .burger-menu.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .nav-menu {
        display: none !important;
        position: fixed;
        top: 0;
        right: -80%;
        width: 80%;
        height: 100vh;
        background: #FFC300;
        flex-direction: column;
        padding: 20px;
        z-index: 1100;
        transition: right 0.3s ease-in-out;
        box-shadow: -2px 0 5px rgba(0,0,0,0.2);
        overflow-y: auto;
        pointer-events: auto;
        justify-content: flex-start;
    }

    .nav-menu.active {
        display: flex !important;
        right: 0;
    }

    .nav-menu .box-header {
        margin-right: 0;
        width: 100%;
        padding: 0;
        position: relative;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        z-index: 1120;
        pointer-events: auto;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        color: black;
    }

    .nav-menu .box-header a {
        color: black;
    }

    .nav-menu .box-header .toggle-area {
        padding: 15px 20px;
        cursor: pointer;
        width: 100%;
        box-sizing: border-box;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        color: black;
    }

    .nav-menu .box-header .toggle-area:hover {
        background-color: #E6A800;
    }

    .nav-menu .box-header .toggle-area:active {
        background-color: #CC8C00;
    }

    .nav-menu .box-header .triangle {
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 10px solid black;
        margin-left: 10px;
    }

    .nav-menu .dropdown-menu,
    .nav-menu .dropdown-menu-right {
        position: static;
        width: 100%;
        box-shadow: none;
        border: none;
        background: #509cff !important;
        padding: 0;
        display: none;
        z-index: 1110;
        pointer-events: auto;
        margin: 0;
    }

    .nav-menu .dropdown-menu.show,
    .nav-menu .dropdown-menu-right.show {
        display: block;
    }

    .nav-menu .dropdown-item {
        padding: 12px 40px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        z-index: 1130;
        cursor: pointer;
        pointer-events: auto;
        width: 100%;
        box-sizing: border-box;
        background: #509cff;
        color: black;
        font-weight: normal;
    }

    .nav-menu .dropdown-item:hover {
        background-color: #0c3879 !important;
        color: white;
        border: none;
    }

    .nav-menu .box-header-right {
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .nav-menu .box-header-right .toggle-area {
        padding: 15px 20px;
        cursor: pointer;
        width: 100%;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu .box-header-right .toggle-area:hover {
        background-color: #E6A800;
    }

    .nav-menu .box-header-right .toggle-area:active {
        background-color: #CC8C00;
    }

    .nav-menu .box-header-right .triangle {
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 10px solid black;
        margin-left: 10px;
    }

    .nav-menu.active {
        padding-top: 80px;
    }

    /* Menu Overlay */
    .menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1099;
        pointer-events: none;
    }

    .nav-menu.active + .menu-overlay {
        display: block;
        pointer-events: auto;
    }

    /* Highlight Section */
    .highlight {
        height: 300px;
    }

    .highlight-title {
        width: 300px;
        height: 50px;
        font-size: 18px;
        margin-left: 20px;
        margin-bottom: 15px;
    }

    /* Running Text */
    .slider-container {
        width: 100vw;
        padding: 8px 0;
    }

    .slider-text {
        font-size: 18px;
    }

    /* Width Container */
    .width-container {
        max-width: 1000px;
        padding: 15px;
    }

    /* About Us */
    .about-us-title {
        margin-top: 20px;
        margin-left: 50px;
        font-size: 24px;
        letter-spacing: 2px;
    }

    .about-us-description {
        margin-top: 20px;
        margin-left: 70px;
        margin-right: 50px;
        font-size: 18px;
        line-height: 24px;
    }

    /* Photo Gallery */
    .photo-gallery-title {
        margin-top: 20px;
        margin-left: 50px;
        font-size: 24px;
        letter-spacing: 2px;
    }

    .photo-gallery-frame {
        margin-top: 20px;
        margin-left: 100px;
        margin-right: 70px;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .photo-gallery {
        height: 200px;
        width: 160px;
    }

    .photo-gallery-group-title {
        font-size: 16px;
        max-width: 150px;
    }

    .photo-gallery-description {
        font-size: 10px;
    }

    .photo-video-gallery-logo {
        width: 16px;
        height: 16px;
    }

    .photo-gallery-date {
        font-size: 12px;
    }

    /* Video Gallery */
    .video-gallery-title {
        margin-top: 20px;
        margin-left: 50px;
        font-size: 24px;
        letter-spacing: 2px;
    }

    .video-gallery-frame {
        margin-top: 40px;
        margin-left: 80px;
        margin-right: 30px;
    }

    .video-gallery {
        height: 160px;
        width: 240px;
        margin-top: 6px;
        margin-left: 10px;
    }

    .video-gallery-group-title {
        font-size: 20px;
        margin-left: 15px;
    }

    .video-gallery-description {
        font-size: 12px;
        margin-left: 25px;
    }

    .video-gallery-date {
        font-size: 12px;
        margin-left: 8px;
    }

    /* Nested Media Query for Screens Under 830px */
    @media (max-width: 830px) {
        /* Photo Gallery Adjustments */
        .photo-gallery-frame {
            gap: 5px;
        }

        .photo-gallery {
            height: 120px;
            width: 100px;
        }

        .photo-gallery-group-title {
            font-size: 12px;
            max-width: 100px;
        }

        .photo-gallery-description {
            font-size: 8px;
        }

        .photo-video-gallery-logo {
            width: 12px;
            height: 12px;
        }

        .photo-gallery-date {
            font-size: 10px;
        }

        /* Video Gallery Adjustments */
        .video-gallery {
            height: 100px;
            width: 150px;
            margin-top: 4px;
            margin-left: 8px;
        }

        .video-gallery-group-title {
            font-size: 16px;
            margin-left: 10px;
        }

        .video-gallery-description {
            font-size: 10px;
            margin-left: 15px;
        }

        .video-gallery-date {
            font-size: 10px;
            margin-left: 6px;
        }
    }

    /* School Congratulations and Agenda */
    .school-congratulations-agenda-frame {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        margin-top: 30px;
        margin-left: 0;
        width: 100%;
    }

    .school-congratulations-title, .agenda-title {
        font-size: 24px;
        letter-spacing: 2px;
        text-align: left;
    }

    .school-congratulations-frame {
        flex-direction: row;
        width: 100%;
        justify-content: center;
        gap: 15px;
    }

    .school-congratulations-picture {
        width: 220px;
        height: 300px;
        margin-left: 0;
    }

    .school-congratulations {
        font-size: 24px;
        max-width: 180px;
        line-height: 30px;
    }

    .school-congratulations-description {
        font-size: 18px;
        line-height: 30px;
        max-width: 700px;
        margin-top: 25px;
        text-align: center;
    }

    .agenda-frame {
        width: 100%;
        justify-content: center;
        margin-top: 20px;
    }

    .agenda-date {
        margin-right: 0;
        font-size: 18px;
        text-align: center;
    }

    .calendar_container_outer {
        width: 80%;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .calendar {
        margin-top: 30px;
        gap: 20px 15px;
        width: 100%;
    }

    .calendar-day {
        font-size: 14px;
        min-height: 40px;
        padding: 5px;
    }

    .calendar-day.with-event::after {
        width: 25px;
        height: 25px;
    }

    .calendar-day .day-number {
        line-height: 25px;
    }

    /* Alumni Testimonials */
    .alumni-testimonials {
        width: 100vw;
        min-height: 180px;
        margin-top: 60px;
        margin-bottom: 60px;
        position: relative;
        padding: 0 50px;
        box-sizing: border-box;
    }

    .previous {
        width: 25px;
        height: 25px;
        margin-top: 70px;
        margin-left: 10px;
        position: absolute;
        left: 10px;
    }

    .next {
        width: 30px;
        height: 30px;
        margin-top: 70px;
        margin-right: 10px;
        position: absolute;
        right: 10px;
    }

    .alumni-picture {
        width: 90px;
        height: 90px;
        margin-top: 30px;
        margin-left: 70px;
    }

    .alumni-name {
        font-size: 18px;
        margin-left: 60px;
    }

    .alumni-testimonials-title {
        font-size: 22px;
        margin-left: 150px;
    }

    .alumni-testimonials-description {
        font-size: 16px;
        line-height: 20px;
        max-width: 600px;
        margin-top: 25px;
        margin-left: 25px;
    }
}