/* -------------------- GLOBAL RESET -------------------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Raleway, sans-serif;
}

body {
    position: relative;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow: visible;
    /* Allow scrolling on the body */
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-image: url('bg/12.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: blur(3px);
    /* ✅ Blur the background image */
    transform: scale(1.05);
    /* ✅ Prevent clipping at edges due to blur */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Raleway", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f7f9fc;
}


/* === Dropdown Base === */


/* === Dropdown Wrapper === */

.dropdown {
    position: relative;
    display: inline-block;
}


/* === Dropdown Content (below button, vertical) === */

.dropdown-content {
    position: absolute;
    top: 110%;
    /* directly below the button */
    left: 0;
    /* align with button */
    min-width: 200px;
    padding: 0.5rem 0;
    border-radius: 12px;
    background: rgba(50, 50, 50, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    z-index: 999;
    /* Hidden by default */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* vertical list */
    display: flex;
    flex-direction: column;
}


/* Show state */

.dropdown.show .dropdown-content {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}


/* Items */

.dropdown-content li {
    list-style: none;
}

.dropdown-content li a {
    display: block;
    padding: 12px 18px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: background 0.3s, padding-left 0.3s;
}

.dropdown-content li a:hover {
    background: rgba(255, 255, 255, 0.15);
    padding-left: 22px;
}


/* -------------------- NAVBAR -------------------- */

nav {
    background: rgba(255, 255, 255, 0.2);
    /* Semi-transparent white */
    backdrop-filter: blur(5px);
    /* Blurs background */
    -webkit-backdrop-filter: blur(5px);
    /* Safari support */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
}

.navbar {
    max-width: 1200px;
    margin: auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 80px;
    width: auto;
    margin-right: 20px;
}

nav {
    background: rgba(255, 255, 255, 0.2);
    /* Semi-transparent white */
    backdrop-filter: blur(5px);
    /* Blurs background behind nav */
    -webkit-backdrop-filter: blur(5px);
    /* Safari support */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: auto;
    padding: 0.8rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo img {
    height: 80px;
    width: auto;
    margin-right: 20px;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.navbar ul li {
    position: relative;
}

.navbar ul li a {
    display: inline-block;
    padding: 10px 15px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none;
    color: white;
    border-radius: 8px;
    /* Smooth shape even before hover */
}


/* Hover and Active styles */

.navbar ul li a:hover,
.navbar ul li a.active {
    background: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    border-color: #7a766cde;
    transform: scale(1.1);
    /* Slight expansion */
    border-radius: 15px;
    /* ✅ Rounded square shape on hover */
}


/* Active link */

.navbar ul li a.active {
    background: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    border-radius: 15px;
    /* ✅ Rounded shape stays on active */
}


/* Optional underline effect on hover */

.navbar ul li a:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: #7a766cde;
    transform: scaleX(1);
    transform-origin: bottom center;
    transition: transform 0.3s ease;
    border-radius: 2px;
}


/* -------------------- Animation -------------------- */

@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
        /* Start slightly below */
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        /* End in place */
    }
}

.navbar ul li {
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}


/* Staggered animation (each list item appears with delay) */

.navbar ul li:nth-child(1) {
    animation-delay: 0.1s;
}

.navbar ul li:nth-child(2) {
    animation-delay: 0.2s;
}

.navbar ul li:nth-child(3) {
    animation-delay: 0.3s;
}

.navbar ul li:nth-child(4) {
    animation-delay: 0.4s;
}

.navbar ul li:nth-child(5) {
    animation-delay: 0.5s;
}

.navbar ul li:nth-child(6) {
    animation-delay: 0.6s;
}

.navbar ul li:nth-child(7) {
    animation-delay: 0.7s;
}

.navbar ul li:nth-child(8) {
    animation-delay: 0.8s;
}

.navbar ul li:nth-child(9) {
    animation-delay: 0.9s;
}

.navbar ul li:nth-child(10) {
    animation-delay: 1s;
}


/* Active link */

.navbar ul li a.active {
    background: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
}

.navbar ul li a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    /* Thin line for underline */
    background-color: rgb(0, 0, 0);
    transform: scaleX(0);
    /* Initially hidden */
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}


/* -------------------- Responsive -------------------- */

@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        /* Vertical stack */
        gap: 10px;
        align-items: center;
        /* Center items */
    }
    .navbar ul li a {
        font-size: 16px;
        padding: 12px 20px;
        display: block;
    }
}

@media (max-width: 480px) {
    .navbar ul li a {
        font-size: 14px;
        padding: 10px 18px;
    }
}


/* -------------------- PHOTO GALLERY SECTION -------------------- */

.gallery {
    text-align: center;
    padding: 40px 20px;
}

.gallery h2 {
    color: white;
    font-size: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    /* semi-transparent */
    backdrop-filter: blur(2px);
    /* the blur effect */
    -webkit-backdrop-filter: blur(12px);
    /* for Safari */
    padding: 40px 20px;
    margin-top: 20px;
    border-radius: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery h2:hover {
    color: gold;
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
}

.gallery h2::after {
    content: '';
    display: block;
    width: 188px;
    height: 4px;
    background-color: gold;
    margin: 10px auto 0;
    border-radius: 2px;
}


/* Grid Layout */

.photo-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}


/* Each Photo */

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: popUp 0.6s ease forwards;
    opacity: 0;
}


/* Responsive Image */

.photo-item img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    border-radius: 15px;
    transition: filter 0.4s ease;
    /* remove transform here */
}


/* Hover Effects (no resize for images) */

.photo-item:hover {
    transform: translateY(-5px);
    /* slight lift only */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.photo-item:hover img {
    filter: brightness(1.1);
    /* glow effect, no scaling */
}


/* Achievements & Legitimacy styled like gallery */

#achievements-legitimacy {
    text-align: center;
    padding: 40px 20px;
}

#achievements-legitimacy h2 {
    color: white;
    font-size: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(12px);
    padding: 40px 20px;
    margin-top: 20px;
    border-radius: 2px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#achievements-legitimacy h2:hover {
    color: gold;
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
}

#achievements-legitimacy h2::after {
    content: '';
    display: block;
    width: 188px;
    height: 4px;
    background-color: gold;
    margin: 10px auto 0;
    border-radius: 2px;
}


/* Animation */

@keyframes popUp {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}


/* -------------------- RESPONSIVE -------------------- */

@media (max-width: 1024px) {
    .photo-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    .navbar ul li a {
        font-size: 16px;
        padding: 12px 20px;
    }
    .photo-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .navbar ul li a {
        font-size: 14px;
        padding: 10px 18px;
    }
    .gallery h2 {
        font-size: 2rem;
    }
    .photo-list {
        grid-template-columns: 1fr;
    }
    .logo img {
        height: 60px;
    }
    body::before {
        background-attachment: scroll;
    }
}


/* Scroll-to-top button base */

#scrollTopBtn {
    position: fixed;
    right: 20px;
    bottom: 28px;
    width: 60px;
    /* give it more height/width balance */
    height: auto;
    border-radius: 12px;
    border: none;
    outline: none;
    cursor: pointer;
    /* Glass / frosted look */
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    box-shadow: 0 6px 18px rgba(8, 12, 20, 0.45);
    /* Vertical flexbox */
    display: flex;
    flex-direction: column;
    /* vertical layout */
    align-items: center;
    justify-content: center;
    gap: 6px;
    /* space between icon & text */
    padding: 12px 10px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    /* Hidden off-screen by default (use .visible to show) */
    transform: translateY(20px) scale(0.96);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    z-index: 9999;
}


/* Icon styling inside */

#scrollTopBtn i {
    font-size: 20px;
    line-height: 1;
}


/* Visible state */

#scrollTopBtn.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}


/* Hover & active */

#scrollTopBtn:focus,
#scrollTopBtn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 26px rgba(8, 12, 20, 0.55);
}


/* Focus ring */

#scrollTopBtn:focus {
    outline: 3px solid rgba(255, 255, 255, 0.12);
    outline-offset: 3px;
}


/* Small screens */

@media (max-width: 420px) {
    #scrollTopBtn {
        right: 14px;
        bottom: 20px;
        width: 50px;
        font-size: 11px;
    }
}