/* General Styles */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f7f8fa;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100vw;
}

a {
    text-decoration: none;
}

a:link {
    text-decoration: none;
    color: #333;
}

a:visited {
    color: #555; /* Customize the visited link color */
}

a:hover {
    text-decoration: none; /* Optional: Add underline on hover */
    color: #000; /* Customize hover color */
}

a:active {
    color: #002f9c; /* Customize active link color */
}


/* Button Styles */
.button {
    padding: 10px 20px;
    background-color: #002f9c;
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease;
}

.button:hover {
    background-color: #0d42be;
}

/* Header Styles */
.header {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e0e0e0;
    box-sizing: border-box;
    padding: 10px 20px;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-and-title a {
    display: flex;
    color: #000;
    align-items: center;
}

.site-logo {
    width: 48px;
    height: 48px;
    margin-right: 6px; /* Reduced margin to bring text closer */
    border-radius: 5px;
}

.header h1 {
    font-family: 'Rethink Sans', sans-serif;
    font-weight: 700;
    margin: 0;
    font-size: 1.8em;
}

/* Description Container Styles */
.description-container {
    width: 100%;
    max-width: 1200px;
    padding: 40px 20px;
    margin: 20px 0;
    text-align: center;
    box-sizing: border-box;
}

.description-container p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Main Container Styles */
.container {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: flex-start;
    padding: 20px;
    flex: 1;
    box-sizing: border-box;
}

.sidebar {
    width: 200px;
    margin-right: 40px;
    box-sizing: border-box;    
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 10px;
}

.sidebar a {
    text-decoration: none;
    color: #333;
    padding: 10px;
    display: block;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar a:hover, .sidebar a.active {
    background-color: #002f9c;
    color: #fff;
}

.main {
    flex: 1;
    box-sizing: border-box;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

.product {
    background-color: #fff;
    border-radius: 8px;
    text-align: center;
    padding: 25px;
    transition: box-shadow 0.3s ease, opacity 0.3s ease-in-out;
    border: 1px solid #e0e0e0;
    opacity: 1;
    box-sizing: border-box;
}

.product a {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit; /* Ensure the text color stays consistent */
    text-decoration: none; /* Remove underline from links */
}

.product img.product-logo {
    width: 128px;
    height: 128px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 10px;
}

.product h3 {
    font-weight: 500;
    margin-bottom: 5px;
}

.product p {
    color: #777;
}

.product:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px;
    max-height: 90%;
    box-sizing: border-box;
    border-radius: 10px;
    overflow-y: auto; /* Allows scrolling within the modal if needed */
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
}

/* Footer Styles */
.footer {
    width: 100%;
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.footer-content {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20px;
    box-sizing: border-box;
}

.footer-text {
    font-size: 0.8em;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    text-align: right;
}

.footer-links li {
    margin: 5px 0;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #ddd;
}

.social-media {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-media a {
    display: block;
    width: 24px;
    height: 24px;
}

.social-media img {
    width: 100%;
    height: auto;
}

/* Responsive Styles */
@media (max-width: 768px) {

    .description-container {
        padding: 20px;
    }

    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        display: flex;
        margin-bottom: 20px;
    }

    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center; /* This will center the category list */
        gap: 10px;
        padding: 0;
        margin: 0 auto;
    }

    .sidebar li {
        margin-bottom: 10px;
        list-style: none;
    }

    .sidebar a {
        padding: 10px;
        display: inline-block;
        text-align: center;
        border-radius: 4px;
        background-color: #f7f8fa;
        color: #333;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .main {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product img.product-logo {
        width: 128px;
        height: 128px;
        object-fit: contain;
        margin-bottom: 10px;
        border-radius: 10px;
    }

    .footer-content {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        text-align: center;
        margin-top: 10px;
    }

    .footer-text {
        margin-top: 15px;
    }
}
