/* ../style/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh; /* Full viewport height */
    width: 100vw; /* Full viewport width */
    overflow: auto; /* Allow scrolling if content overflows */
    font-family: Arial, sans-serif;
    margin: 0;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff; /* White background */
    border-bottom: 1px solid #d0d0d0; /* Light grey border */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 1000; /* Ensure navbar stays above other content */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.navbar-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333333; /* Dark grey for brand text */
    text-decoration: none;
}

.navbar-menu {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.navbar-item {
    margin-left: 20px;
}

.navbar-item a {
    color: #666666; /* Lighter grey for links */
    text-decoration: none;
    font-size: 1rem;
}

.navbar-item a:hover {
    color: #000000; /* Black on hover */
}

/* Styles for the Under Construction Page */
.construction-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh; /* Full viewport height */
    width: 100vw; /* Full viewport width */
    background-color: #e0e0e0; /* Light grey background to match the project */
}

.construction-message {
    background-color: #ffffff; /* White background for the message */
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    text-align: center;
}

.construction-message p {
    font-size: 20px; /* Font size as requested */
    color: #333333; /* Dark grey text for readability */
}

/* Grid Styles (for index.html) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columns by default */
    grid-template-rows: repeat(3, auto); /* Auto rows to fit content */
    gap: 15px; /* Space between grid items */
    min-height: calc(100vh - 60px); /* Adjust for navbar height */
    width: 100%; /* Full width */
    padding: 15px;
    background-color: #e0e0e0; /* Light grey background */
    box-sizing: border-box;
    margin-top: 60px; /* Offset for fixed navbar */
}

.grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Distribute space between main-box and sub-box */
    padding: 10px;
    background-color: #ffffff; /* White background for each grid item */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    min-height: 300px; /* Ensure enough space for both main-box and sub-box */
}

.main-box {
    width: 100%;
    height: 200px; /* Fixed height to prevent overflow */
    border-radius: 5px;
    overflow: hidden; /* Ensure the image doesn't overflow */
    cursor: pointer; /* Indicate the image is clickable */
}

.main-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensure the image covers the box without distortion */
    border-radius: 5px;
    display: block; /* Ensure the image behaves as a block element */
}

.sub-box {
    width: 100%; /* Full width of the grid item */
    min-height: 80px; /* Ensure enough space for description and link */
    background-color: #ffffff; /* White background for sub-boxes */
    color: #333333; /* Dark grey text for readability */
    margin-top: 10px; /* Space between main-box and sub-box */
    display: flex;
    flex-direction: column; /* Stack description and link vertically */
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    padding: 10px;
    font-size: 1rem;
}

.sub-box p {
    margin: 0;
    font-size: 0.9rem; /* Slightly smaller font for description */
    text-align: center;
    color: #333333; /* Dark grey for description text */
    word-wrap: break-word; /* Prevent text overflow */
}

.sub-box a {
    color: #666666; /* Lighter grey for the link */
    font-size: 0.8rem;
    text-decoration: underline;
    margin-top: 5px;
}

.sub-box a:hover {
    color: #000000; /* Black on hover for better visibility */
}

/* Modal Styles (for index.html) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.8); /* Black background with opacity */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 800px; /* Limit the max width of the image */
    max-height: 80vh; /* Limit the max height to fit the viewport */
    object-fit: contain; /* Ensure the full image is visible without cropping */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the image */
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbbbbb;
    text-decoration: none;
}

/* Contact Page Styles */
.contact-container {
    min-height: calc(100vh - 60px); /* Adjust for navbar height */
    width: 100%;
    padding: 30px 15px;
    background-color: #e0e0e0; /* Light grey background to match the project */
    margin-top: 60px; /* Offset for fixed navbar */
    text-align: center;
}

.contact-container h1 {
    font-size: 2.5rem;
    color: #333333; /* Dark grey for headings */
    margin-bottom: 20px;
}

.contact-info, .contact-form {
    background-color: #ffffff; /* White background for sections */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    padding: 20px;
    margin: 20px auto;
    max-width: 600px; /* Limit width for readability */
}

.contact-info h2, .contact-form h2 {
    font-size: 1.5rem;
    color: #333333;
    margin-bottom: 15px;
}

.contact-info p {
    font-size: 1rem;
    color: #666666; /* Lighter grey for text */
    margin-bottom: 20px;
}

.contact-info ul {
    list-style: none;
    padding: 0;
    text-align: left;
}

.contact-info ul li {
    font-size: 1rem;
    color: #333333;
    margin-bottom: 10px;
}

.contact-info ul li a {
    color: #666666;
    text-decoration: underline;
}

.contact-info ul li a:hover {
    color: #000000;
}

/* Form Styles */
.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group label {
    font-size: 0.9rem;
    color: #333333;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #d0d0d0; /* Light grey border */
    border-radius: 5px;
    box-sizing: border-box;
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing only */
}

.contact-form button {
    background-color: #666666; /* Lighter grey button */
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #333333; /* Darker grey on hover */
}

/* About Page Styles */
.about-container {
    min-height: calc(100vh - 60px); /* Adjust for navbar height */
    width: 100%;
    padding: 30px 15px;
    background-color: #e0e0e0; /* Light grey background to match the project */
    margin-top: 60px; /* Offset for fixed navbar */
    display: flex;
    justify-content: center;
    align-items: center;
}

.construction-message h1 {
    font-size: 2.5rem;
    color: #333333; /* Dark grey for headings */
    margin-bottom: 20px;
}

.construction-message p {
    font-size: 1rem;
    color: #666666; /* Lighter grey for text */
    line-height: 1.6; /* Improve readability */
    max-width: 600px; /* Limit width for readability */
    margin: 0 auto;
}

/* Responsive Design for About Page */
@media (max-width: 768px) {
    .construction-message h1 {
        font-size: 2rem;
    }

    .construction-message p {
        font-size: 0.9rem;
    }

    .about-container {
        padding: 20px 10px;
    }
}

@media (max-width: 480px) {
    .construction-message h1 {
        font-size: 1.8rem;
    }

    .construction-message p {
        font-size: 0.8rem;
    }

    .about-container {
        padding: 15px 8px;
    }
}

/* Responsive Design for Contact Page */
@media (max-width: 768px) {
    .contact-container h1 {
        font-size: 2rem;
    }

    .contact-info, .contact-form {
        padding: 15px;
        margin: 15px;
    }

    .contact-info h2, .contact-form h2 {
        font-size: 1.3rem;
    }

    .contact-info p, .contact-info ul li {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.9rem;
    }

    .contact-form button {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .contact-container h1 {
        font-size: 1.8rem;
    }

    .contact-info, .contact-form {
        padding: 10px;
        margin: 10px;
    }

    .contact-info h2, .contact-form h2 {
        font-size: 1.2rem;
    }

    .contact-info p, .contact-info ul li {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.8rem;
    }

    .contact-form button {
        font-size: 0.8rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
        grid-template-rows: repeat(5, auto); /* Adjust rows dynamically for 9 items */
        gap: 10px;
        padding: 10px;
    }

    .grid-item {
        min-height: 280px; /* Adjust for smaller screens */
    }

    .main-box {
        height: 180px; /* Adjust height for smaller screens */
    }

    .sub-box {
        min-height: 70px; /* Adjust for smaller screens */
        font-size: 0.9rem;
    }

    .sub-box p {
        font-size: 0.8rem;
    }

    .sub-box a {
        font-size: 0.7rem;
    }

    .navbar-menu {
        flex-direction: column;
        align-items: flex-end;
    }

    .navbar-item {
        margin-left: 0;
        margin-top: 10px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr; /* 1 column on mobile */
        grid-template-rows: repeat(9, auto); /* Adjust rows dynamically for 9 items */
        gap: 8px;
        padding: 8px;
    }

    .grid-item {
        min-height: 260px; /* Adjust for smaller screens */
    }

    .main-box {
        height: 160px; /* Adjust height for smaller screens */
    }

    .sub-box {
        min-height: 60px; /* Adjust for smaller screens */
        font-size: 0.8rem;
    }

    .sub-box p {
        font-size: 0.7rem;
    }

    .sub-box a {
        font-size: 0.6rem;
    }

    .navbar-brand a {
        font-size: 1.2rem;
    }

    .navbar-item a {
        font-size: 0.9rem;
    }
}