/* style-home-menus.css - dropdown menu bar on the main page (Tier Lists, later Rankings). Linked from index.html only. */

.home-dd-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 850px; width: 100%; margin: 0 auto 26px; position: relative; z-index: 30; }
.home-dd { position: relative; }
.home-dd-btn { font-size: 1.05rem; padding: 12px 24px; display: inline-flex; align-items: center; gap: 8px; }
.home-dd-btn .home-dd-caret { display: inline-block; font-size: .75em; transition: transform .2s ease; }
.home-dd.open .home-dd-caret { transform: rotate(180deg); }
.home-dd-menu {
    position: absolute; left: 50%; top: 100%; min-width: 290px; padding: 8px; margin: 0; list-style: none;
    background: var(--modal-bg); border: 1px solid var(--primary-color); border-radius: 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: max-content; max-width: min(560px, 92vw);
    opacity: 0; visibility: hidden; transform: translate(-50%, 8px); transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
}
/* invisible bridge so the menu doesn't close while the mouse moves from the button to the menu */
.home-dd-menu::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.home-dd.open .home-dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 6px); transition: opacity .15s ease, transform .15s ease; }
@media (hover: hover) and (pointer: fine) {
    .home-dd:hover .home-dd-menu, .home-dd:focus-within .home-dd-menu { opacity: 1; visibility: visible; transform: translate(-50%, 6px); transition: opacity .15s ease, transform .15s ease; }
    .home-dd:hover .home-dd-caret { transform: rotate(180deg); }
}
.home-dd-menu a {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text-color); text-decoration: none;
    font-weight: 600; font-size: .93rem; white-space: nowrap;
}
.home-dd-menu a:hover, .home-dd-menu a:focus-visible { background: color-mix(in srgb, var(--primary-color) 16%, transparent); color: var(--text-color); text-decoration: none; }
.home-dd-menu .home-dd-ico { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; object-position: top; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.home-dd-menu .home-dd-all { grid-column: 1 / -1; justify-content: center; border-top: 1px solid var(--tile-border); margin-top: 4px; color: var(--primary-color); }
@media (max-width: 600px) {
    .home-dd-menu { grid-template-columns: 1fr; min-width: 250px; }
    .home-dd-btn { font-size: 1rem; padding: 11px 18px; }
}
