/* General Styling */
body {
    font-family: 'Libre Franklin', sans-serif;
    background-color: #141414;
    margin: 0;
    color: #fff;
}

/* Standardized Text Styling */
h1, h2, p {
    font-weight: 500;
    margin: 0;
}

h1 {
    font-size: 2.5rem;
    padding-left: 40px; /* Ensure left alignment */
}

h2 {
    font-size: 1.5rem;
}

/* Portfolio Container */
.portfolio-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 40px;
    max-width: 1500px;
    margin: 0 auto;
}


/* Header Styles */
header h1 {
    font-size: 2.5rem;
    color: #fff;
    text-align: left; /* Keep the text aligned to the left */
    transition: margin-left 0s ease; /* Smooth transition for margin-left */
}

/* When the portfolio container exceeds max-width (1500px) */
@media (min-width: 1500px) {
    .portfolio-container {
        margin-left: calc((100vw - 1500px) / 2); /* Center the container on larger screens */
        margin-right: calc((100vw - 1500px) / 2); /* Keep the container centered on larger screens */
    }

    header h1 {
        margin-left: calc((100vw - 1500px) / 2); /* Align h1 to the same left margin as portfolio container */
    }
  
  .nav-left {
        margin-left: calc((100vw - 1500px) / 2); /* Align nav-left to the same left margin as portfolio container */
    }
}



/* Navbar Styles */
nav {
    background-color: #141414;
    display: flex;
    justify-content: center; /* Center the contents horizontally */
    align-items: center;
    padding: 50px 40px 100px 40px; /* Added 300px padding at the bottom */
    position: relative; /* Allow for absolute positioning of the logo */
}

.nav-left {
    display: flex;
    gap: 20px;
    align-items: center; /* Centers the nav items vertically */
    position: absolute; /* This will make sure the nav items are not affected by centering */
    left: 40px; /* Control the spacing between the left items and the logo */
}

.nav-left ul {
    list-style-type: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.nav-left ul li {
    display: inline-block;
}

.nav-left ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
}

.nav-left ul li a:hover {
    text-decoration: underline;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* Prevent the logo from shrinking */
    width: 100px; /* Set a width for the logo container */
    position: absolute;
    left: 50%; /* Center the logo horizontally */
    transform: translateX(-50%); /* Adjust for perfect centering */
}

.logo {
    width: 70px;  /* Adjust logo size as needed */
    height: 70px;
    object-fit: contain;
}


/* Media Query for screen sizes less than 700px */
@media (max-width: 700px) {
    .nav-left {
        display: none; /* Hide nav items when screen is small */
    }

    .logo-container {
        left: 50%; /* Keep logo centered */
        transform: translateX(-50%); /* Perfect centering */
    }
  
      /* Resize the font sizes for smaller screens */
    header h1 {
        font-size: 5vw;
        text-align: center;
        padding: 0;
    }
}

/* For very small screens (below 400px) */
@media (max-width: 500px) {
    header h1 {
        font-size: 5vw; /* Even smaller scaling for very small screens */
        text-align: center;
        padding: 0;
    }
}


/* Portfolio Items */
.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    width: 100%;
}

.portfolio-item img {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Remove hover effects for portfolio items */
.portfolio-item:hover img {
    transform: none;
}

.overlay {
    display: none;
}

/* Gallery Grid Styles */
#gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 40px 40px 40px;
    max-width: 1420px; /* Set max-width to 1500px */
    margin: 0 auto; /* Center the gallery */
}

#gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

#gallery img:hover {
    transform: scale(1.01);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 80%;
    border-radius: 8px;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 30px;
    font-weight: lighter;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    cursor: ;
}

.caption {
    text-align: center;
    color: #ccc;
    font-size: 18px;
    margin-top: 10px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .modal-content {
        max-width: 95%;
        max-height: 75%;
    }
}



/* Form Styling */
form {
    padding: 40px;
    max-width: 800px;
    margin: 0 auto;
    background-color: #1c1c1c;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    color: #fff;
    font-size: 1.1rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    background-color: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #fff;
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.7);
}

.form-group textarea {
    resize: vertical;
}

.btn-primary {
    background-color: #fff;
    color: #141414;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #e5e5e5;
}

@media (max-width: 650px) {
    .nav-left ul {
        display: none; /* Hide navigation text on small screens */
    }

    .logo-container {
        left: 50%;
        transform: translateX(-50%);
    }

    form {
        padding: 20px;
        margin: 0 20px;
    }

    .form-group label {
        font-size: 1rem;
    }

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

    .btn-primary {
        font-size: 0.9rem;
    }
}