html {
    scroll-padding-top: 100px; /* Adjust to match your header height */
}

body {
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f9f9f9;
    color: #1f2937;
    overflow-x: hidden;
    margin: 0; /* Ensure the body has no margin */
}

.background-image {
    position: fixed;
    width: 100%;
    height: 100%;
    background-image: url('Github Website Homepage.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.1; /* adjust this */
    z-index: -1;
    pointer-events: none; /* keeps it from blocking clicks */
} 

header {
    position: fixed; /* Ensures header stays at the top of the page */
    width: 100%; /* Ensures full width of the viewport */
    z-index: 1000;
    background-color: #e5e7eb;
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    border-bottom: 2px solid #9ca3af;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logo {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.logo img {
    height: 50px; /* adjust this to your liking */
    width: auto;  /* keeps the aspect ratio */
    max-width: 100%;
} 

.nav-tabs {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-tabs a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem;
}

.nav-tabs a:hover {
    color: #1937bd;
    transition: 1s;
}

.about-textbox {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
    font-size: 1rem;
    color: #1f2937;
    text-align: center;
    padding: 0 1rem; /* Add padding for mobile */
}

.about-textbox p {
    margin-bottom: 1rem;
    text-align: center;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1f2937; /* Dark gray/black */
    border-bottom: 2px solid #1937bd; /* Blue underline */
    padding-bottom: 0.5rem;
    max-width: 300px;
    margin: 2rem auto 1.5rem auto; /* Top/bottom spacing and centered */
}    

main {
    flex: 1;
    padding: 0rem 1rem 2rem 1rem;
    max-width: 1200px;
    margin: auto;
    margin-top: 120px; /* Add top margin to account for fixed header */
}

/* DESKTOP STYLES - Only apply on larger screens */
@media (min-width: 1025px) {
    .product-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        max-width: 1000px;
        justify-content: center;
    }

    .services-grid {
        display: grid;
        max-width: 1000px;
        justify-content: center;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        margin-top: 2rem;
    }
}

.product {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    outline: none;
}

.product img {
    width: 100%; /* Make responsive */
    height: auto; /* Make responsive */
    aspect-ratio: 1/1; /* Keep square aspect ratio */
    object-fit: cover;
    background-color: #d1d5db;
}

.product-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #1937bd;
}

.product-price {
    color: #737377;
    font-weight: bold;
}

.service-box {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-box img {
    width: 100%; /* Make responsive */
    height: auto; /* Make responsive */
    aspect-ratio: 1/1; /* Keep square aspect ratio */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.service-box-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-box {
    cursor: pointer;
}  

.service-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #1937bd;
    margin-bottom: 1rem;
}

footer {
    background-color: #1f2937;
    color: white;
    padding: 2rem 1rem;
    width: 100%;
    position: relative;
    box-sizing: border-box;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sponsor-logos {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.sponsor-logos img {
    width: 80px;
    height: auto;
    max-width: 100%;
}

.copyright {
    text-align: center;
    font-size: 0.9rem;
    color: #d1d5db;
}

/* Make containers responsive */
* {
    box-sizing: border-box;
}

/* MOBILE STYLES */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 80px;
    }
    
    header {
        position: relative; /* Change from fixed to relative on mobile */
        flex-direction: column;
        padding: 15px;
        text-align: center;
    }
    
    .logo {
        position: static; /* Remove absolute positioning */
        transform: none;
        margin-bottom: 15px;
    }
    
    .logo img {
        height: 40px;
    }
    
    main {
        margin-top: 0; /* Remove top margin since header is not fixed */
        padding: 1rem 0.5rem 2rem 0.5rem;
    }
    
    .nav-tabs {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .nav-tabs a {
        padding: 12px;
        text-align: center;
        border: 1px solid #d1d5db;
        border-radius: 5px;
        margin: 2px 0;
    }
    
    /* Make product grid responsive */
    .product-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2 columns on mobile */
        gap: 15px;
        padding: 0;
        max-width: 100%;
    }
    
    /* Make services grid responsive */
    .services-grid {
        display: grid;
        grid-template-columns: 1fr; /* 1 column on mobile */
        gap: 15px;
        padding: 0;
        max-width: 100%;
        margin-top: 1rem;
    }
    
    /* Adjust text containers for mobile */
    .about-textbox {
        padding: 15px;
        margin: 0;
        font-size: 0.9rem;
    }
    
    /* Adjust section titles */
    .section-title {
        font-size: 1.5rem;
        margin: 20px auto;
        max-width: 250px;
    }
    
    .service-box {
        padding: 1rem;
    }
    
    .service-title {
        font-size: 1.1rem;
    }
    
    /* Footer adjustments */
    .sponsor-logos {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .sponsor-logos img {
        width: 60px;
    }
}

/* TABLET STYLES */
@media (min-width: 769px) and (max-width: 1024px) {
    .product-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
        gap: 20px;
        max-width: 800px;
    }
    
    .services-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
        gap: 20px;
        max-width: 800px;
        margin-top: 2rem;
    }
    
    main {
        margin-top: 100px;
    }
}