/* Resetting some browser defaults */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style-type: none;
}

/* Base typography settings for consistent text styling */
body, button, input, textarea {
    font-family: 'Roboto', sans-serif;
    color: #333;
}

/* General layout configurations */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Compatibility Table Styles */
#compatibility-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    text-align: center;
    font-family: Arial, sans-serif;
}

#compatibility-table th, #compatibility-table td {
    padding: 8px;
}

#compatibility-table th {
    background-color: #bfdfff;
    text-align: center;
}

#compatibility-table tr:nth-child(even) {
    background-color: #e5e5e5;
}

#compatibility-table tr:hover {
    background-color: #959595;
}

#compatibility-table td:nth-child(1) {
    text-align: left;
}

/* Data Table Styles */
.data-table {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* Modal (Popup Window) Styles */
.modal {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 1;
}

.modal.show {
    display: block;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 20px;
    background-color: #fff;
    width: 50%;
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    font-size: 1.6em; /* Slightly larger text */
}

/* Close Button in Modal */
.close {
    position: absolute;
    top: 15px; /* Adjusted from 10px */
    right: 25px; /* Adjusted from 20px */
    font-size: 1.5em; /* Larger close button */
    cursor: pointer;
    color: #333; /* Darker close button color */
}

.close:hover {
    color: #ff2244; /* Red on hover */
}

/* Navbar Base Styles */
.navbar {
    background-color: #333;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: row;
}

.navbar li {
    display: inline-block;
}

.navbar a {
    color: white;
    padding: 14px 16px;
    text-align: center;
    text-decoration: none;
    display: block;

}

.navbar a:hover, .navbar a.active {
    background-color: #ddd;
    color: black;
}

/* Custom Navbar Styles */
.custom-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: bold;
}

/* Navbar Toggler for Mobile */
.navbar-toggler {
    display: none;
    cursor: pointer;
    font-size: 30px;
    padding: 10px;
    color: white;
}

/* Navbar Menu Styles */
.navbar-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.navbar-menu ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1rem;
    font-size: large;
}

.navbar-menu li a {
    text-decoration: none;
    color: black;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
}

.navbar-menu li a:hover {
    background-color: #e9ecef;
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: black;
}

.dropdown-menu a:hover {
    background-color: #e9ecef;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 0.5rem 0;
}

/* Search Form Styles */
.search-form input {
    margin-right: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid #e9ecef;
}

.hero {
    margin: 0.5rem 2rem;
}

/* Media Queries for Responsive Adjustments */
@media screen and (max-width: 768px) {
    body {
        font-size: 18px; /* Increased font size for better readability on mobile */
    }

    .navbar, .custom-navbar {
        flex-direction: column;
        padding: 15px 0; /* Increase padding to give more space */
        align-items: flex-start;
    }

    .navbar a, .navbar-menu li a {
        font-size: 18px; /* Increase font size for better visibility */
        padding: 15px 24px; /* Larger touch targets */
    }

    .navbar-toggler {
        display: block;
    }

    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Adjusted to be below the navbar */
        left: 0;
        background-color: #333; /* Same color as the navbar */
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar {
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start;
    }

    .navbar ul {
        flex-direction: column; /* Stack items vertically */
        width: 100%; /* Full width */
    }

    .navbar li {
        display: block;
        width: 100%; /* Make each item take full width */
    }

    .navbar a {
        text-align: left; /* Align text to the left */
        padding: 14px 16px;
    }

    .navbar-toggler.active + .navbar-menu {
        display: block; /* Show menu when toggler is active */
    }

    .dropdown-menu {
        position: static; /* Dropdowns become part of the column flow in mobile view */
        width: 100%; /* Full width dropdowns */
        box-shadow: none; /* No shadow for a cleaner look */
    }

    .modal-content {
        width: 90%; /* Make the modal content almost full width on mobile */
        padding: 20px; /* Adjust padding for mobile */
        font-size: 1em; /* Adjust font size for readability on smaller screens */
    }

    .navbar-menu ul {
        display: flex;
        flex-direction: column;
    }
}

@media screen and (max-width: 300px) {
    .navbar {
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start;
    }

    .navbar ul {
        flex-direction: column; /* Ensure the list items stack vertically */
        width: 100% !important; /* Make the navbar take full width */
    }

    .navbar li {
        display: block; /* Make sure list items stack vertically */
        width: 100%; /* Each item takes full width */
    }

    .navbar a {
        text-align: left; /* Align text to the left */
        padding: 14px 16px; /* Ensure sufficient padding */
    }

    .navbar-toggler {
        display: block; /* Display the toggle button on mobile */
        font-size: 30px;
        padding: 10px;
        color: white;
    }

    .navbar-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px; /* Adjusted to be below the navbar */
        left: 0;
        background-color: #2520a1; /* Same color as the navbar */
    }

    .navbar-menu.active {
        display: flex;
    }

    .dropdown-menu {
        position: static; /* Make dropdown part of the flow */
        width: 100%;
        box-shadow: none;
    }
    .modal-content {
        width: 90%; /* Make the modal content almost full width on mobile */
        padding: 10px; /* Adjust padding for mobile */
        font-size: 1em; /* Adjust font size for readability on smaller screens */
    }

    .navbar-menu ul {   /*vertical menu on mobile*/
        display: flex;
        flex-direction: column;
    }


    /* Product Grid Layout */
    .product-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        padding: 20px;
    }

    /* Product Card */
    .product-card {
        background-color: #fff;
        padding: 15px;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        text-align: center;
        transition: transform 0.3s ease;
    }

    .product-card:hover {
        transform: translateY(-10px);
    }

    /* Image Styling */
    .product-card img {
        width: 100%;
        max-width: 200px;
        height: auto;
        object-fit: cover;
        border-radius: 8px;
    }

    /* Modal Styling */
    .modal {
        display: none;
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1;
    }

    .modal-content {
        position: relative;
        margin: auto;
        padding: 20px;
        background-color: #fff;
        width: 50%;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    }

    .close {
        position: absolute;
        top: 10px;
        right: 15px;
        font-size: 1.5em;
        cursor: pointer;
    }

    .close:hover {
        color: red;
    }


}
