* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
/* Ensure html and body take full viewport height */
html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: "Andada Pro", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    background-color: #1D1D1D;
}

/* Header and Nav Container */
.header-nav-container {
    width: 100%;
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    height: 30px;
    z-index: 1000;
    background-color: #2C2C2C;
    box-shadow: 0 6px 16px 2px rgba(255, 255, 255, 0.3);
}

.header-nav-container.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    height: 30px;
    z-index: 1000;
    background-color: #2C2C2C;
    box-shadow: 0 6px 16px 2px rgba(255, 255, 255, 0.3);
}

/* Header Section */
header {
    width: 100%;
    background-color: #2C2C2C;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo {
    width: 320px;
    padding: 10px;
    transition: transform 0.3s ease;
    transform-origin: center;
}

.header-nav-container.sticky .header-logo {
    transform: scale(0.75); /* Reduce logo by 25% */
    padding: 2px;
}

/* Navigation Bar */
nav {
    width: 100%;
    background-color: #323232;
    padding: 5px 0;
}

.nav-container {
    max-width: 960px;
    margin: 0 auto;
    padding-left: 30px; /* Side margin */
    padding-right: 30px; /* Side margin */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 40px; /* Initial height */
    transition: height 0.3s ease;
    position: relative; /* Anchor for absolute menu */
}

.header-nav-container.sticky .nav-container {
    height: 20px; /* Reduced by 15px */
}

.nav-container a {
    font-family: 'Slackey', cursive;
    font-size: 20pt;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease, font-size 0.3s ease;
}

.header-nav-container.sticky .nav-container a {
    font-size: 16pt; /* Reduced by 4pt */
}

.nav-container a:hover {
    color: #2DFFD2;
}

/* Hamburger Menu */
.nav-toggle {
    display: none;
    font-size: 24px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.nav-menu {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

/* Content Section */
.content-section {
    flex: 1 0 auto; /* Grow to fill available space, don't shrink */
    width: 100%;
    background-image: url('img/marvellous-games-home-bkg.jpg');
    background-size: contain;
    background-position: top;
    background-repeat: no-repeat;
    margin-top: 140px;
}

.content-section a {
    text-decoration: dashed;
    color: white;
}

.content-container {
    max-width: 960px;
    margin: 0 auto;
    padding-left: 30px; /* Side margin */
    padding-right: 30px; /* Side margin */
    text-align: center;
}

.content-sub-section {
    width: 100%;
    padding-top: 30px;
}

.content-h1 {
    font-family: 'Slackey', cursive;
    font-size: 2.3rem;
    color: #CBBE85;
    margin-top: 25px;
    margin-bottom: 25px;
}

.content-h2 {
    font-family: 'Slackey', cursive;
    font-size: 1.8rem;
    color: #CBBE85;
    margin-top: 25px;
    margin-bottom: 25px;
}

.content-body {
    font-family: "Andada Pro", serif;
    font-size: 16pt;
    font-weight: 400;
    font-style: normal;
    color: #CECECE;
    line-height: 24pt;
    margin-bottom: 30px;
    text-align: left;
}

.games-submenu {
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.games-submenu a{
    font-size: 1.6rem;
    font-family: 'Slackey', cursive;
    color: #bd85cb;
    margin-top: 25px;
    margin-bottom: 25px;   
    margin-left:10px;
    margin-right:10px;
}
.games-submenu a:hover{
    color: #2DFFD2;
}

.content-sub-section ul,
.content-sub-section ol {
    padding-left: 30px; /* Indents the entire list (bullets/numbers included) by 10px */
    margin-left: 0; /* Ensures no additional margin offsets the indentation */
    margin-bottom: 30px; /* Matches .content-body spacing */
    width: 90%;
}
/* Offset for anchor links to account for fixed header and nav */
.content-sub-section[id] {
    scroll-margin-top: 140px; /* Adjust based on the total height of fixed header-nav-container */
}
.content-sub-section li {
    font-family: "Andada Pro", serif;
    font-size: 16pt;
    font-weight: 400;
    font-style: normal;
    color: #CECECE;
    line-height: 24pt;
    text-align: left;
    margin-bottom: 20px; /* Spacing between list items */
}

.content-image {
    width: 100%;
    max-width: 960px;
    border: 8px solid #323232;
    border-radius: 2px;
    margin-top: 10px;
    margin-bottom: 30px;
}

.content-button {
    display: inline-block;
    font-family: 'Slackey', cursive;
    font-size: 22pt;
    color: white;
    background-color: #9274A8;
    margin-top:15px;
    padding: 15px 25px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.content-button:hover {
    background-color: #7a5e8e;
}

/* Flexbox container for the product cards */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

/* Individual product card styling */
.product-card {
    flex: 1 1 calc(50% - 20px); /* Two cards per row with gap */
    max-width: calc(50% - 20px);
    box-sizing: border-box;
    background-color: #323232;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Product image styling */
.product-card img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content area within the card */
.card-content {
    background-color: #323232;
    padding: 20px;
    text-align: left;
}

/* Heading styling */
.card-content h3 {
    font-family: 'Slackey', cursive;
    color: #CBBE85;
    font-size: 1.5rem;
    margin: 0 0 10px 0;
}

/* Paragraph text styling */
.card-content p {
    color: #ccc;
    font-family: "Andada Pro", serif;
    font-size: 1.2rem;
    line-height: 1.5;
    margin: 0;
}

.card-button {
    display: inline-block;
    font-family: 'Slackey', cursive;
    font-size: 1.2rem;
    color: white !important;
    background-color: #9274A8;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.card-button:hover {
    background-color: #7a5e8e;
}

.card-button-sold {
    display: inline-block;
    font-family: 'Slackey', cursive;
    font-size: 1.2rem;
    color: white !important;
    background-color: #666;
    padding: 10px 20px;
    margin-top: 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.rules-box {
    padding-top: 20px;
    padding-left: 50px;
    padding-right: 50px;
    padding-bottom: 60px;
    background: linear-gradient(to bottom, #3f3f3f, #1a1a1a);
    border: inset;
    border-width: 4px;
    border-top-color: #eee;
    border-left-color: #ccc;
    border-right-color: #222;
    border-bottom-color: #3c3c3c;
    margin-bottom: 30px;
}

.rules-box-button {
    font-family: 'Slackey', cursive;
    font-size: 1.2rem;
    padding: 10px 20px;
    background-color: #459a9a;
    border-radius: 5px;
    margin-top: 50px;
}

/* Responsive Design */


/* Tablet and Mobile Breakpoint (max-width: 768px) */
@media (max-width: 768px) {
    .product-card {
        flex: 1 1 100%; /* One card per row */
        max-width: 100%;
    }

    .header-logo {
        width: 300px;
         /* height: 60px; */
    }
    .content-sub-section[id] {
        scroll-margin-top: 110px;
    }
    .content-h1 {
        font-size: 2rem; /* Reduced from 2.3rem */
    }

    .content-h2 {
        font-size: 1.6rem; /* Reduced from 1.8rem */
    }

    .content-body {
        font-size: 14pt; /* Reduced from 16pt */
        line-height: 22pt; /* Reduced from 24pt */
    }
    
    .content-image {
    margin-top: 10px;
    margin-bottom: 10px;
    }
    
    .content-section {
    width: 100%;
    padding-top: 20px;
    margin-top: 110px;
    }
    
    .content-sub-section {
    width: 100%;

    }

    .content-sub-section li {
        font-size: 14pt; /* Reduced from 16pt */
        line-height: 22pt; /* Reduced from 24pt */
    }

    
    .games-submenu a{
    font-size: 1.3rem;
    }
    
    
    .content-button {
        font-size: 20pt; /* Reduced from 22pt */
        padding: 12px 20px;
    }
    
    .content-h1 {
    margin-top: 10px;
    margin-bottom: 25px;
    }
    
    

    .card-content h3 {
        font-size: 1.3rem; /* Reduced from 1.5rem */
    }

    .card-content p {
        font-size: 1rem; /* Reduced from 1.2rem */
    }

    .card-button,
    .card-button-sold,
    .rules-box-button {
        font-size: 1rem; /* Reduced from 1.2rem */
        padding: 8px 16px;
    }

    .nav-container {
        justify-content: center; /* Center hamburger icon */
        height: 22px;
    }

    .nav-container a {
        font-size: 18pt; /* Reduced from 20pt */
    }

    .header-nav-container.sticky .nav-container a {
        font-size: 14pt; /* Reduced from 16pt */
    }

    .footer-container {
        font-size: 12px; /* Reduced from 16pt */
    }

    /* Hamburger Menu for Tablet and Mobile */
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #323232;
        padding: 10px 30px; /* Match side margins */
        box-sizing: border-box;
        z-index: 999; /* Ensure above content */
    }

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

    .nav-menu a {
        font-size: 18pt; /* Adjusted for tablet/mobile */
        padding: 10px 0;
        width: 100%;
        text-align: center;
    }

    .header-nav-container.sticky .nav-menu a {
        font-size: 14pt; /* Adjusted for sticky */
    }
}

/* Media query for viewports below 630px */
@media (max-width: 630px) {
    .games-submenu {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center items horizontally */
        justify-content: center; /* Center items vertically within the container */
    }

    .games-submenu a {
        margin: 10px 0; /* Adjust margins for vertical spacing */
        font-size: 1.4rem; /* Slightly reduce font size for better fit */
    }
}

/* Mobile-Specific Tweaks (max-width: 480px) */
@media (max-width: 480px) {
    .header-logo {
        width: 280px;
        /* height: 50px; */
    }
    
    .content-section {
    padding-top: 1px;
    }
    .content-h1 {
        font-size: 1.8rem; /* Further reduced */
        margin-top: 10px;
        margin-bottom: 25px;
    }

    .content-h2 {
        font-size: 1.4rem; /* Further reduced */
    }

    .content-body {
        font-size: 13pt; /* Further reduced */
        line-height: 20pt; /* Further reduced */
    }

    .content-image {
    margin-top: 10px;
    margin-bottom: 10px;
    }
    
    .content-button {
    font-size: 18pt; /* Further reduced */
    padding: 10px 15px;
    }
    
    
    .content-sub-section {
    width: 100%;
    padding-bottom: 1px;
    }
    
    .content-sub-section li {
        font-size: 12pt; /* Further reduced */
        line-height: 20pt; /* Further reduced */
    }



    
    
    
    .card-content h3 {
        font-size: 1.1rem; /* Further reduced */
    }

    .card-content p {
        font-size: 0.9rem; /* Further reduced */
    }

    .card-button,
    .card-button-sold,
    .rules-box-button {
        font-size: 0.9rem; /* Further reduced */
        padding: 6px 12px;
    }

    .rules-box {
        padding-left: 20px; /* Reduced for small screens */
        padding-right: 20px; /* Reduced for small screens */
    }

    .content-sub-section {
        padding-top: 40px; /* Reduced */
    }

    .nav-menu a {
        font-size: 16pt; /* Further reduced for mobile */
    }

    .header-nav-container.sticky .nav-menu a {
        font-size: 12pt; /* Further adjusted */
    }

    .footer-container {
        font-size: 8pt; /* Further reduced */
    }
}

/* Footer Section */
footer {
    width: 100%;
    background-color: #779E77;
    padding: 20px 0;
    margin-top: 50px;
    flex-shrink: 0; /* Prevent footer from shrinking */
}

.footer-container {
    max-width: 960px;
    margin: 0 auto;
    padding-left: 30px; /* Side margin */
    padding-right: 30px; /* Side margin */
    text-align: center;
    font-family: "Andada Pro", serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    color: white;
    font-size: 1.2rem;
}

.footer-container a {
    color: white;
    font-weight: bolder;
    text-decoration: none;
    display: block;
    margin-top: 20px;
    margin-bottom: 20px;
}

.footer-container a:hover{
    color: #ffbb7f;
}

.footer-container .fa {
    font-size: 40px;
}