/*
 * home.css — home page only (index.html)
 * Loaded after site.css and font-awesome, exactly where the old inline <style> was.
 */

/* Navbar styling */

.btn {
    background-color: DodgerBlue;
    border: none;
    color: white;
    padding: 12px 30px;
    cursor: pointer;
    font-size: 20px;
}

/* Darker background on mouse-over */
.btn:hover {
    background-color: RoyalBlue;
}

/* Styles for the search bar */
.search-bar {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.search-bar input[type="text"] {
    width: 50%;
    padding: 10px;
    border-radius: 20px;
    border: 2px solid #C977A8;
    font-size: 16px;
    outline: none;
}

.search-bar input[type="text"]:focus {
    border-color: #8FB3BB;
}

/* Navbar styling */
.navbar {
    display: flex;
    justify-content: center;
    /* Center the navbar items */
    background-color: #333;
    overflow: hidden;
}

.navbar a {
    float: left;
    display: block;
    color: #f2f2f2;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
    font-size: 17px;
}

.navbar a:hover {
    background-color: #ddd;
    color: black;
}

.navbar a.active {
    background-color: #8A2BE2;
    color: white;
}

.navbar .icon {
    display: none;
}

h2 {
    margin: 0;
    color: #fcfcfc;
    font-weight: bold;
    text-align: center;
    background-color: transparent;
    padding: 20px 0;
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    margin-bottom: 20px;
    /* Increase space below the heading */
}

/* Section styling */
section {
    padding: 40px 20px;
    background-color: rgba(12, 20, 55, 0.8);
    color: #8FB3BB;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 1200px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

/* Mobile adjustments */
@media screen and (max-width: 600px) {
    h2 {
        position: relative;
        /* Remove sticky positioning */
        top: auto;
        /* Reset top positioning */
        z-index: 3;
        background-color: transparent;
        /* Remove background color */
        margin-top: 10px;
        padding: 15px 0;
    }

    section {
        padding: 20px 10px;
        margin: 10px auto;
    }
}

/* Responsive layout for small screens */
@media screen and (max-width: 600px) {
    .navbar a:not(:first-child) {
        display: none;
    }

    .navbar a.icon {
        float: right;
        display: block;
    }
}

@media screen and (max-width: 600px) {
    .navbar.responsive {
        position: relative;
    }

    .navbar.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    .navbar.responsive a {
        float: none;
        display: block;
        text-align: left;
    }
}

/* Center section headings */
h2 {
    text-align: center;
    width: 100%;
    /* Ensure full-width centering */
    margin: 20px 0;
    /* Add some margin for spacing */
}

/* Responsive layout adjustments */
@media screen and (max-width: 600px) {
    #home {
        flex-direction: column;
        /* Stack the elements vertically */
        align-items: center;
        /* Center align the elements */
        text-align: center;
        /* Center the text */
    }

    #home>div:first-child {
        margin: 0 0 20px 0;
        /* Remove left margin and add bottom margin */
        width: 100%;
        /* Make it full width */
    }

    #home img {
        margin-bottom: 20px;
        /* Add margin below the logo */
    }

    .discord-widget {
        width: 100%;
        /* Make it full width */
        margin: 20px 0;
        /* Add top and bottom margin */
    }

    /* Make the packs grid layout responsive */
    .packs-grid {
        grid-template-columns: 1fr;
        /* Change to a single column layout */
        gap: 15px;
        /* Adjust the gap for better spacing on small screens */
    }

    /* Ensure images and text in the packs align well in mobile view */
    .pack {
        text-align: center;
        /* Center text for a cleaner mobile layout */
    }

    .pack img {
        max-width: 80%;
        /* Adjust image size for mobile */
        margin: 0 auto;
        /* Center the images */
    }
}

/* Mobile menu styles */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #1a1a2e;
        z-index: 100;
        padding: 10px 0;
    }

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

    .nav-item {
        margin: 5px 0;
    }
}


/* Elegant page-transition animation for pack cards */
.pack-card {
    will-change: transform, opacity, filter;
}

@keyframes packPageFadeUp {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.985);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
