/* --- Top Bar (Centered Title) --- */
#top {
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.0); 
    color: black;
    width: 100%;
    height: 64px;
    margin-bottom: 10px;
    border-radius: 0 0 20px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between; 
    box-sizing: border-box;
    
    /* CHANGE THIS LINE from 'fixed' to 'absolute' */
    position: absolute; 
    top: 0;
    left: 0;
    z-index: 100;
}

#top h1 {
    margin: 0;
    color: #FFF;
    font-size: clamp(18px, 4vw, 24px);
    white-space: nowrap;
    text-align: center;
    flex-grow: 1;
}
/* --- New Logo Rule: Leak down without touching the menu toggle --- */
#top img {
    height: 90px;         /* Increased size so it leaks out nicely */
    width: auto;          /* Maintains your image aspect ratio */
    
    margin-top: 15px;     /* Nudges it down so the top text line is NOT cut off */
    
    object-fit: contain;  /* Makes sure the image scales cleanly */
    flex-grow: 1;         /* Replaces the old H1 flex logic to stay perfectly centered */
    text-align: center;
}

/* --- Hamburger Button (3 Stripes) --- */
#menu-toggle, .menu-toggle {
    width: 30px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    flex-shrink: 0; /* Prevents button from squishing */
}

#menu-toggle span, .menu-toggle span {
    display: block;
    height: 4px;
    width: 100%;
    background: #fa84ad;
    border-radius: 4px;
}

/* --- Slide-out Side Menu --- */
#side-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%; 
    height: 95%;
    z-index: 1000;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 0 55px 0px;
    border-bottom: 6px solid white;
    border-right: 6px solid white;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 5px 0 15px rgba(0,0,0,0.7);
}

/* Background Image logic */
#side-menu::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #FDD7E4;
    z-index: -1;
    border-radius: 0 0 46px 0px;
}

#side-menu.active {
    left: 0;
}

/* --- Menu Buttons --- */
#topRButtons {
    display: flex;
    flex-direction: column; 
    gap: 20px;
    width: 50%; /* Set to 50% as requested */
    align-items: center;
}

#topRButtons a {
    background: #fa84ad;
    width: 100%;
    color: white;
    padding: 12px 0;
    border-radius: 10px;
    text-decoration: none;
    font-size: 18px;
    text-align: center;
    border: #f774a1 solid 2px;
    display: block;
}

/* Overlay for clicking outside the menu */
#menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
}

#menu-overlay.active {
    display: block;
} 

.inMenu {
    position: absolute;
    top: 20px;
    left: 19px;
    z-index: 1001;
}

/* Targeted override for the stripes inside the menu button */
.inMenu span {
    background: #fa84ad !important;
}

/* --- Desktop Adjustments --- */
@media (min-width: 768px) {
    #side-menu {
        width: 40%; /* Scale down to 40% on desktop screens */
    }
}