/* styles.css */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /*background-image: url("Heroes.jpg");*/
    font-family: "Poppins", sans-serif;
    line-height: 1.6;
    background: #EEEEEE;
    color: #333;

}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Your base design width = 400px */
:root {
    --base-width: 400;
}

/* This scales the entire page */
#scaleWrapper {
    width: var(--base-width)px;
    /* Prevent layout shift */
    transform-origin: top left;
}

/* Auto-scale based on screen width */
@media screen and (max-width: 4000px) {
    #scaleWrapper {
        transform: scale(calc(100vw / var(--base-width)));
    }
}



/* Containers */
.container {
    width: 97%;
    max-width: 1200px;
    margin: auto;
    justify-content: center;
    text-align: center;
}

/* Containers */
.container4 {
    width: 95%;
    max-width: 1200px;
    margin: auto;
    justify-content: center;
    text-align: center;
}

/* Header */
/*.site-header {
    background: #333;
    border-bottom: 1px solid #eaeaea;
    position: sticky;
    z-index: 1000;
    margin-bottom: 10px;
}*/

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    /* small spacing between left and right groups */
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
    color: white;
}

/* push the nav to the far right and keep its links inline */
.main-nav {
    margin-left: auto;
    /* pushes the nav to the right */
    display: flex;
    gap: 0.75rem;
    /* spacing between menu links */
    align-items: center;
}

.main-nav a {
    margin: 0 0.75rem;
    text-decoration: none;
    color: #444;
    font-weight: 500;
}

.main-nav a.active,
.main-nav a:hover {
    color: #0077cc;
}

/* Search */
.search {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-right: 1rem;
    /* extra breathing room before the menu */
}

.search input {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search button {
    background: #0077cc;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}

.search button:hover {
    background: #005fa3;
}

/* Hero Section */
.hero {
    padding: 0.5rem 0;
    overflow: hidden;
}

.hero-text {
    max-width: 500px;
    margin-bottom: 2rem;
    justify-content: center;
    text-align: center;
}

.hero-text h1 {
    font-size: 2rem;
    margin-bottom: 0.6rem;
    color: #222;
}

.hero-text p {
    color: #555;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-primary {
    background: #0077cc;
    color: #fff;
}

.btn-primary:hover {
    background: #005fa3;
}

.btn-ghost {
    background: transparent;
    border: 1px solid #ccc;
    color: #444;
}

.btn-ghost:hover {
    border-color: #0077cc;
    color: #0077cc;
}

/* Book Cover Slider */
.cover-track {
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    margin-top: 85px;
}

.cover-track .track {
    display: flex;
    gap: 1rem;
    animation: slide 30s linear infinite;
}

.cover-track img {
    height: 150px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Animation: slide right to left */
@keyframes slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* --- Modern micro-interactions & animations --- */

/* gentle pop for modal card */
@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }

    60% {
        opacity: 1;
        transform: translateY(-6px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal.active .modal-card {
    animation: popIn 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* floating subtle motion for cover track */
@keyframes floatY {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

.cover-track img {
    transition: transform 0.36s ease, filter 0.36s ease;
}

.cover-track img:hover {
    transform: translateY(-6px) scale(1.04);
    filter: saturate(1.06) contrast(1.03);
}

/* pause slider while hovering to inspect covers */
.cover-track:hover .track {
    animation-play-state: paused;
}

/* cards: lift + soft shadow + image tilt */
.card {
    transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.25, 1),
        box-shadow 0.28s ease;
    will-change: transform;
    cursor: default;
}


.card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 18px 40px rgba(12, 24, 48, 0.14);
}

.card img {
    transition: transform 0.36s cubic-bezier(0.2, 0.8, 0.25, 1), filter 0.36s ease;
    transform-origin: 50% 40%;
    border-radius: 8px;
}

.card:hover img {
    transform: rotate(-1.2deg) scale(1.06);
    filter: drop-shadow(0 10px 18px rgba(8, 24, 48, 0.08));
}

/* tiny staggered entrance for grid items (on page load) */
.grid article.card {
    opacity: 0;
    transform: translateY(10px) scale(0.995);
    transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.page.active .grid article.card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* slight delay per card using nth-child */
.grid article.card:nth-child(4n + 1) {
    transition-delay: 0.04s;
}

.grid article.card:nth-child(4n + 2) {
    transition-delay: 0.08s;
}

.grid article.card:nth-child(4n + 3) {
    transition-delay: 0.12s;
}

.grid article.card:nth-child(4n + 4) {
    transition-delay: 0.16s;
}

/* buttons: press and hover feedback */
.btn {
    transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
    will-change: transform;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(3, 102, 191, 0.12);
}

.btn:active {
    transform: translateY(0) scale(0.995);
    box-shadow: 0 6px 12px rgba(3, 102, 191, 0.08);
}

/* modal close: small spin on hover */
.modal .close {
    transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1),
        background 0.18s ease;
}

.modal .close:hover {
    transform: rotate(90deg) scale(1.04);
    background: rgba(255, 255, 255, 1);
}

/* focus visible for accessibility */
:focus-visible {
    outline: 3px solid rgba(11, 119, 198, 0.14);
    outline-offset: 3px;
    border-radius: 6px;
}

/* subtle toast animation for status text */
@keyframes popStatus {
    0% {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#borrow-status.show {
    display: inline-block;
    animation: popStatus 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}

/* mobile tweak: reduce transform strength */
@media (max-width: 720px) {
    .card:hover {
        transform: translateY(-6px) scale(1.005);
    }

    .card:hover img {
        transform: rotate(0deg) scale(1.04);
    }

    .cover-track img:hover {
        transform: none;
    }
}

/* Header */
.site-header {
    display: flex;
    flex-direction: row;
    background: #333;
    border-bottom: 1px solid #eaeaea;
    padding: 0.5rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    /* small spacing between left and right groups */
}

.logo {
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
    color: white;
}

/* push the nav to the far right and keep its links inline */
.main-nav {
    margin-left: auto;
    /* pushes the nav to the right */
    display: flex;
    gap: 0.75rem;
    /* spacing between menu links */
    align-items: center;
}

.main-nav a {
    margin: 0 0.75rem;
    text-decoration: none;
    color: #f5f5f5ec;
    font-weight: 500;
}

.main-nav a.active,
.main-nav a:hover {
    color: white;
}

/* Search */
.search {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-right: 1rem;
    /* extra breathing room before the menu */
}

.search input {
    padding: 0.4rem 0.6rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search button {
    background: #0077cc;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
}

.search button:hover {
    background: #005fa3;
}

/* Hero Section */
.hero {
    background: #fdfdfd;
    padding: 0.5rem 0;
    overflow: hidden;
}

.hero-text {
    max-width: 500px;
    margin-bottom: 4rem;
}

.hero-text h1 {
    font-size: 2rem;
    margin-bottom: 0.6rem;
    color: #222;
}

.hero-text p {
    color: #555;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-primary {
    background: #0077cc;
    color: #fff;
}

.btn-primary:hover {
    background: #005fa3;
}

.btn-ghost {
    background: transparent;
    border: 1px solid #ccc;
    color: #444;
}

.btn-ghost:hover {
    border-color: #0077cc;
    color: #0077cc;
}

/* Book Cover Slider */
.cover-track {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.cover-track .track {
    display: flex;
    gap: 1rem;
    animation: slide 30s linear infinite;
}

.cover-track img {
    height: 200px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Animation: slide right to left */
@keyframes slide {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

/* Popular Books */
.popular {
    padding: 3rem 0;
}

.section-head {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.section-head h2 {
    font-size: 1.6rem;
}

.section-head .link {
    text-decoration: none;
    color: #0077cc;
    font-weight: 500;
}

.btn-secondary {
    background: #e9f3ff;
    color: #0077cc;
    border: 1px solid #0077cc;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease;
}

.btn-secondary:hover {
    background: #0077cc;
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;

    /* ensure cards stretch to same height and allow vertical layout */
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    flex-shrink: 0;
}

.card-body {
    padding: 1rem;

    /* make body grow and allow pushing the button down */
    display: flex;
    flex-direction: column;
    flex: 1;
}


/* any button inside card-body will be pushed to the bottom */
.card-body .btn,
.card-body button {
    margin-top: auto;
}

.card-body .title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.card-body .author {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.card-body .rating {
    color: #f5b400;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
}

.shelf {
    color: #0077cc;
    font-weight: 500;
    margin-bottom: 0.6rem;
}

/* Footer */
.site-footer {
    background: #333;
    padding: 0 0;
    margin-top: auto;
    border-top: 1px solid #eeee;
    border-bottom: 1px solid #eeee;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.footer-grid h5 {
    margin-bottom: 0.5rem;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid li {
    margin-bottom: 0.3rem;
    color: #555;
}

.footnote {
    text-align: center;
    font-size: 0.85rem;
    color: #f5f5f5ec;
    padding-top: 1rem;
    /* removed horizontal line above footer text */
    border-top: none;
}

/* responsive: remove large spacing on small screens */
@media (max-width: 700px) {
    .main-nav {
        margin-left: 0;
    }

    .search {
        margin-right: 0;
    }
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* --- Borrow modal styles (modern, full-section card) --- */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(6, 12, 20, 0.55);
    /* slightly darker overlay */
    z-index: 2000;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    animation: modalFade 0.18s ease;
}

@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card becomes a responsive two-column layout that fills available height */
.modal-card {
    width: 100%;
    max-width: 1100px;
    max-height: calc(100vh - 2rem);
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    border-radius: 14px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.25rem;
    box-shadow: 0 20px 60px rgba(8, 24, 48, 0.45);
    position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

/* left cover column */
.modal-card .cover {
    min-width: 0;
    /* allow proper shrinking */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    filter: saturate(1.02) contrast(1.02);
}

/* subtle overlay to improve legibility when needed */
.modal-card .cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(10, 10, 10, 0.08),
            rgba(10, 10, 10, 0.22));
}

/* right content column is scrollable if content overflows */
.modal-card .content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow: auto;
    min-height: 0;
    /* for correct flex behaviour */
}

/* Title & meta */
.modal-card h3 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -0.2px;
}

.modal-card p.meta {
    color: #6b7280;
    margin: 0.15rem 0 0.8rem;
    font-size: 0.95rem;
}

/* modern form controls */
.modal-form {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: 1fr 1fr;
    margin-top: 0.6rem;
}

.modal-form .full {
    grid-column: 1 / -1;
}

.modal-form label {
    font-size: 0.85rem;
    color: #333;
    display: block;
}

#select {
    width: 180px;
    height: 20px;
    border-radius: 5px;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
    width: 100px;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e6e9ee;
    border-radius: 10px;
    background: #333;
    font-size: 0.95rem;
    outline: none;
    transition: box-shadow 0.12s ease, border-color 0.12s ease,
        transform 0.12s ease;
    box-shadow: inset 0 1px 0 rgba(16, 24, 40, 0.02);
}

.modal-form input:focus,
.modal-form textarea:focus,
.modal-form select:focus {
    border-color: #0b76c6;
    box-shadow: 0 6px 18px rgba(9, 86, 148, 0.06);
    transform: translateY(-1px);
}

.modal-form textarea {
    min-height: 100px;
    resize: vertical;
}

/* push actions to bottom when space allows */
.modal-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.9rem;
    align-items: center;
    flex-wrap: wrap;
}

.modal-card .content>.modal-actions {
    margin-top: auto;
    /* stick actions to bottom of content area */
}

/* button polish */
.modal .btn {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
}

.modal .btn-primary {
    background: #0077cc;
    color: #fff;
    border: 0;
    box-shadow: 0 8px 22px rgba(0, 119, 204, 0.18);
}

.modal .btn-ghost {
    background: transparent;
    border: 1px solid #e3e7ee;
    color: #374151;
}

/* close button */
.modal .close {
    position: absolute;
    right: 0.8rem;
    top: 0.6rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    font-size: 1.05rem;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(8, 24, 48, 0.12);
}

/* status text style */
#borrow-status {
    color: #127a3e;
    font-weight: 700;
    display: none;
    margin-left: auto;
}

/* responsive adjustments */
@media (max-width: 880px) {
    .modal-card {
        grid-template-columns: 260px 1fr;
        max-width: 720px;
    }
}

@media (max-width: 720px) {
    .modal-card {
        grid-template-columns: 1fr;
        max-width: 420px;
        max-height: calc(100vh - 1.6rem);
    }

    .modal-card .cover {
        height: 240px;
    }

    .modal-form {
        grid-template-columns: 1fr;
    }

    .modal .close {
        right: 0.6rem;
        top: 0.4rem;
    }
}

#container1 {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    /* 3D depth */
}

.carousel {
    position: relative;
    width: 120px;
    height: 150px;
    transform-style: preserve-3d;
    animation: rotate 40s linear infinite;
}

.carousel img {
    position: absolute;
    width: 120px;
    height: 150px;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    transform: translate(-50%, -50%);
    /* ✅ center each image */
}

@keyframes rotate {
    from {
        transform: rotateY(0deg);
    }

    to {
        transform: rotateY(360deg);
    }
}

.container2 {
    background-color: #EEEEEE;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* vertical centering */
    align-items: center;
    /* horizontal centering */
    min-height: 100px;
    /* full viewport height */
    text-align: center;
    /* center the text itself */
}

.container2 h2 {
    margin-bottom: 1rem;
    /* creates space between container1 and h2 */
}

.container2 {
    margin-top: 0 rem;
    /* smaller gap below header */
}

header .site-header {
    padding-bottom: 0.5rem;
    /* optional: reduce header bottom padding */
}

#home {
    margin-top: 0px;
    background: #EEEEEE;
}

/* Grid 1 cards (home section popular books) */
#grid1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.card1 {
    background: white;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
}

#button1 {
    margin-bottom: 10px;
}

/* Card1 styled same as Card but keeps its grid size */
#grid1 .card1 {

    /* same border as .card */
    border-radius: 10px;
    /* match radius */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    /* keep images clean inside */
    transition: transform 0.3s ease;

    display: flex;
    /* same flex column layout */
    flex-direction: column;
    height: 100%;
    /* ensures equal card heights */
}

/* optional hover effect like .card */
#grid1 .card1:hover {
    transform: translateY(-4px);
}


#grid1 .card1:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

#grid1 .card1 img {
    width: 100%;
    height: 80px;
    /* fixed height for cover */
    object-fit: cover;
    flex-shrink: 0;
}

#grid1 .card-body1 {
    flex: 1;
    padding: 0.3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#grid1 .card-body1 .title {
    font-size: 0.3rem;
    font-weight: 300;
    margin-bottom: 0.1rem;
    line-height: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#grid1 .card-body1 .author,
#grid1 .card-body1 .shelf {
    font-size: 0.2rem;
    color: #555;
    margin-bottom: 0.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#grid1 .card-body1 button {
    align-self: flex-start;
    font-size: 0.25rem;
    padding: 0.03rem 0.1rem;
}

/* Popular Books Cover Track - simple infinite marquee */
.cover-track {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    max-width: 95%;
}

.cover-track .track {
    display: flex;
    gap: 1rem;
    animation: marquee 40s linear infinite;
}

/* Each cover */
.cover-track img {
    height: 130px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}

/* Marquee animation */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.footnote {
    margin-bottom: 20px;
}

.cover-track .track.paused {
    animation-play-state: paused;
}

.corner-box {
    width: 95%;
    /* responsive width */
    height: 100%;
    /* responsive height */
    position: relative;
    margin: 40px auto;
}

/* TOP LEFT */
.corner-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;

    width: 10%;
    /* horizontal line = 10% of box width */
    height: 10%;
    /* vertical line = 10% of box height */

    border-top: 3px solid #000;
    border-left: 3px solid #000;
}

/* TOP RIGHT */
.corner-box::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;

    width: 10%;
    height: 10%;

    border-top: 3px solid #000;
    border-right: 3px solid #000;
}

/* Extra span for bottom corners */
.corner-box span::before,
.corner-box span::after {
    content: "";
    position: absolute;
    bottom: 0;

    width: 10%;
    height: 10%;
}

/* BOTTOM LEFT */
.corner-box span::before {
    left: 0;
    border-bottom: 3px solid #000;
    border-left: 3px solid #000;
}

/* BOTTOM RIGHT */
.corner-box span::after {
    right: 0;
    border-bottom: 3px solid #000;
    border-right: 3px solid #000;
}







.menu-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.5rem;
}

.hamburger {
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    height: 3px;
    background-color: #007bff;
    border-radius: 2px;
}

.menu-button.active .hamburger span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}

.menu-button.active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-button.active .hamburger span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

.dropdown-menu {
    position: absolute;
    top: 60px;
    left: 0;
    background: #fff;
    width: 260px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.dropdown-menu.show {
    opacity: 1;
    max-height: 600px;
}

.dropdown-menu-content {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
    background-color: #f5faff;
}

.menu-item,
.submenu-item {
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    color: #007bff;
    font-weight: 600;
    text-decoration: none;
}

.menu-item:hover,
.submenu-item:hover {
    background-color: #e0f0ff;
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #e9f5ff;
    font-size: 0.95rem;
    font-weight: 500;
}

.submenu.show {
    max-height: 500px;
}

.menu-item.active::after {
    transform: rotate(180deg);
}

.dropdown-menu-content button {
    font-size: 14px;
    color: black;
    border: none;
    background: transparent;
}

.centerButton:hover{
    cursor: pointer;
}