/* Laptop styles (1281px and up) */
@media (min-width: 745px) and (max-width: 1280px) {

    html, body {
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-content: start;
        justify-content: flex-start; /* Align content to the top of the page */
        font-family: 'Montserrat', sans-serif;
        box-sizing: border-box;
        height: auto;
        overflow-y: auto;
    }

    .page-container {
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Ensure content starts at the top */
        align-content: start;
        width: 100%;
        padding: 0px; /* Add 20px margin around the content */
        box-sizing: border-box;
        min-height: auto;
        overflow-y: auto;
        display: block;
    }

    .carousel-container {
        width: calc(100% - 40px);
        max-width: 1500px;
        margin: auto;
        position: relative;
        overflow: hidden;
        margin-bottom: 150px;
    }
    
    .carousel {
        display: flex;
        transition: transform 0.3s ease-in-out;
    }

    .carousel-item {
        width: 100%;
        display: flex;
        justify-content: center;
        align-content: top;
        flex-shrink: 0;
        margin-top: 20px;
    }

    /* Carousel Welcome Section Styling */
    .carousel-welcome-section {
        /* width: calc(100% - 40px); */
        max-width: 1500px;
        margin: 0 auto; /* Center it horizontally */
        margin-top: 0; /* Space between the scrolling box and this section */
        background-color: rgba(0, 0, 0, 0.20); /* Semi-transparent background */
        backdrop-filter: blur(5px);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Subtle shadow */
        text-align: center;
    }
    
    /* Title in the Carousel Welcome Section */
    .carousel-welcome-section h2 {
        font-family: 'Montserrat', sans-serif;
        font-size: 48px;
        font-weight: 400;
        color: #E0D202; /* Theme color */
        margin: 0;
        margin-bottom: 12px;
    }
    
    /* Paragraph in the Carousel Welcome Section */
    .carousel-welcome-section p {
        font-family: 'Montserrat', sans-serif;
        font-size: 24px;
        font-weight: 300;
        color: #f1f1f1;
        line-height: 1.5;
        margin-left: 60px;
        margin-right: 60px;
    }

    /* Carousel Item Column Layout */
    .carousel-item-column {
        display: flex;
        flex-direction: column; /* Stack images and text vertically */
        align-items: start; /* Center content horizontally */
        margin-bottom: 0px; /* Add space below the section */
    }

    .projects-grid-item {
        position: relative;
        overflow: hidden;
        cursor: pointer;
    }

    .projects-image-gridpp {
        display: grid;
        gap: 10px;
        width: 100%;
        grid-template-columns: repeat(4, 1fr); /* Two equal columns */
        grid-auto-rows: minmax(150px, auto); /* Flexible row heights */
    }
    
    .projects-grid-item img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Ensures images cover the area completely */
    }
    

    
    .projects-grid-item-pp1 {
        grid-column: span 2;
        grid-row: span 2;
    }

    .projects-grid-item-pp2 {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    /* Specific styles for custom spans */
    .projects-grid-item-pp3 {
        grid-column: span 2;
        grid-row: span 1;
    }

    .projects-grid-item-pp4 {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    /* Larger spans for specific items */
    .projects-grid-item-pp5 {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    /* Larger spans for specific items */
    .projects-grid-item-pp6 {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .projects-grid-item-pp7 {
        grid-column: span 1;
        grid-row: span 2;
        /* display: none; */
    }
    
    .projects-grid-item-pp8 {
        grid-column: span 1;
        grid-row: span 2;
        /* display: none; */
    }

    .projects-grid-item-pp9 {
        grid-column: span 2;
        grid-row: span 1;
        /* display: none; */
    }
    
    .projects-grid-item-pp10 {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .projects-grid-item-pp11 {
        grid-column: span 1;
        grid-row: span 1;
    }

    .projects-grid-item-pp12 {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .projects-grid-item-pp13 {
        grid-column: span 2;
        grid-row: span 1;
    }

    .projects-grid-item-pp14 {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .projects-grid-item-pp15 {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .projects-grid-item-pp16 {
        grid-column: span 2;
        grid-row: span 1;
    }
    
    .projects-grid-item-pp17 {
        grid-column: span 2;
        grid-row: span 1;
        /* display: none; */
    }
    
    .projects-grid-item-pp18 {
        grid-column: span 2;
        grid-row: span 1;
        /* display: none; */
    }

    .projects-grid-item-pp19 {
        grid-column: span 2;
        grid-row: span 1;
        /* display: none; */
    }
    
    .projects-grid-item-pp20 {
        grid-column: span 1;
        grid-row: span 1;
        /* display: none; */
    }

    .projects-grid-item-pp21 {
        grid-column: span 1;
        grid-row: span 1;
        /* display: none; */
    }

    .projects-grid-item-pp22 {
        grid-column: span 1;
        grid-row: span 1;
        /* display: none; */
    }
    
    .projects-grid-item-pp23 {
        grid-column: span 1;
        grid-row: span 1;
        /* display: none; */
    }
   
    .projects-grid-item-pp24 {
        grid-column: span 2;
        grid-row: span 2;
        /* display: none; */
    }


/* Overlay styles */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: none; /* Flexbox for centering */
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    flex-direction: column;
    text-align: center; /* Center text inside the overlay */
}

/* Styling for titles within the overlay */
.overlay .project-title {
    color: #E0D202; /* Bright color for visibility */
    font-size: 24px; /* Larger font size for titles */
    font-weight: bold; /* Bold font weight for emphasis */
    margin-bottom: 10px; /* Space between title and description */
    text-align: center; /* Center-align the text */
    text-transform: uppercase; /* Uppercase text for stylistic preference */
}

/* Styling for descriptions within the overlay */
.overlay .project-description {
    color: #f1f1f1; /* White color for contrast */
    font-size: 18px; /* Smaller font size than title */
    font-weight: 250;
    text-align: justify; /* Justify alignment for better readability */
    margin-bottom: 20px; /* Space between description and link */
    margin: 10px;
    text-align: center;
    font-style: italic;
}

/* Styling for links within the overlay */
.overlay .view-project-link {
    display: inline-block; /* Ensures the button behaves like a block element */
    color: #82B1FF; /* Light blue for links */
    font-size: 16px; /* Moderate size for clickable links */
    text-decoration: none; /* No underline to keep it clean */
    padding: 8px 16px; /* Padding for better touch target */
    background-color: #333; /* Dark background for the button */
    border-radius: 5px; /* Rounded corners for the button */
    text-align: center; /* Center-align the text */
    transition: background-color 0.2s, color 0.2s; /* Transition for hover effects */
    overflow: hidden; /* Ensures pseudo-elements don't extend outside the button */
    line-height: 1.5; /* Ensures button text is vertically centered */
    width: fit-content; /* Button size adjusts to fit the content */
    margin-top: 20px; /* Add some space above the button */
}

/* Pseudo-element for underline effect */
.overlay .view-project-link::after {
content: '';
position: absolute;
bottom: 0; /* Position it directly at the bottom of the button */
left: 50%; /* Start from the center */
width: 0; /* Start with no width */
height: 2px; /* Line thickness */
background-color: #E0D202; /* Bright yellow for visibility */
transition: all 0.3s ease; /* Transition for animation */
transform: translateX(-50%) scaleX(0); /* Center the element and scale it down to 0 */
}

/* Hover effect for link */
.overlay .view-project-link:hover::after {
transform: translateX(-50%) scaleX(1); /* Expand the line from the center outward */
}

/* Hover effect to change background color and text color */
.overlay .view-project-link:hover {
background-color: #0b0b0b; /* Darken the background on hover */
color: #E0D202; /* Change text color on hover */
}


/* Display overlay on hover or when it's active */
.projects-grid-item:hover .overlay,
.projects-grid-item .overlay.active {
    display: flex;
}

/* ---------- Footer Background ---------- */
.footerRight {
    position: fixed;
    bottom: 5vh;
    left: 2.5vw;
    text-align: left;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    color: #a1a1a1;
    width: 100%;
    z-index: 2;
    padding-right: 2.5vw;
}

.footerRight a {
    margin-right: 2vw;
    margin-bottom: 1vh;
    text-decoration: none;
    color: inherit;
    font-size: 1rem; /* Fixed font size */
    font-weight: 400;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease;
    padding: 5px 0;
    box-sizing: border-box;
}

.footerRight a::before {
    content: '';
    position: absolute;
    top: 90%;
    left: 50%;
    transform: translate(-50%, -50%) scaleX(0);
    width: 100%;
    height: 2px;
    background-color: rgba(161, 161, 161, 0.75);
    transition: transform 0.3s ease-out;
    transform-origin: center;
}

.footerRight a:hover::before {
    transform: translate(-50%, -50%) scaleX(1);
}

/* ---------- HEADERS ---------- */
.headerContainer {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 2.5vw;
    position: fixed; /* Change to fixed */
    top: 0; /* Aligns the header to the top of the screen */
    width: 100%;
    box-sizing: border-box;
    z-index: 2;
    padding-top: 20px; /* Add padding at the top */
    padding-bottom: 20px; /* Add padding at the bottom */
}


.headerLeft {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    text-align: center;
}

/* Fixed sizes for header text */
.headerLeft1 {
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-size: 2rem; /* Fixed font size */
    color: #a1a1a1;
    margin: 0;
}

.headerLeft1 a {
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    font-weight: inherit;
    position: relative; /* Required for absolute positioning of pseudo-elements */
    display: inline-block; /* Ensures the link does not span the full container width */
    overflow: hidden; /* Hides anything outside the boundary of the link */
}

.headerLeft1 a::before,
.headerLeft1 a::after {
    content: '';
    position: absolute;
    top: 90%; /* Center vertically */
    height: 2px; /* Line thickness */
    background-color: rgba(161, 161, 161, 0.75); /* Using variable for transparency */
    transition: width 0.3s ease-out, transform 0.3s ease-out; /* Smooth transitions for width and movement */
    width: 0; /* Start with no width */
    left: 50%; /* Start from the center */
    transform: translateX(-50%); /* Center the lines exactly at the middle */
}

.headerLeft1 a:hover::before {
    width: 50%; /* Extend to half the element's width */
    transform: translateX(-100%); /* Move line to start from the exact center and extend left */
}

.headerLeft1 a:hover::after {
    width: 50%; /* Extend to half the element's width */
    transform: translateX(0); /* Start from the center and extend right */
}

.headerLeft2 {
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    font-size: 1rem; /* Fixed size */
    color: #a1a1a1;
    margin-top: 10px;
    text-align: center;
}

.headerRight {
    display: flex;
    align-items: center;
    text-align: center;
    font-family: "Montserrat", sans-serif;
    font-weight: 400;
    color: #a1a1a1;
    white-space: nowrap;
    padding: 0;
    gap: 2vw;
}

.headerRight p {
    font-size: 1.5rem; /* Fixed font size */
    margin: 1vw 2vw;
}

.headerRight a {
    text-decoration: none;
    color: inherit;
    font-family: inherit;
    font-weight: inherit;
    font-size: 1.5rem; /* Fixed font size */
    position: relative;
    display: inline-block;
    overflow: hidden;
    transition: color 0.3s ease;
}

.headerRight a::before,
.headerRight a::after {
    content: '';
    position: absolute;
    top: 90%; /* Center vertically */
    height: 2px;
    background-color: rgba(161, 161, 161, 0.75);
    width: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease-out, transform 0.3s ease-out;
}

.headerRight a:hover::before {
    width: 50%;
    transform: translateX(-100%);
}

.headerRight a:hover::after {
    width: 50%;
    transform: translateX(0);
}

/* ---------- Ruled Lines Background ---------- */
.ruled-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: 
        repeating-linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.15) 1px,
            transparent 1px,
            transparent 320px
        ),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.15),
            rgba(255, 255, 255, 0.15) 1px,
            transparent 1px,
            transparent 320px
        );
    background-position: center;
    background-size: 240px 240px;
}

/* Style for ruled lines above the 3D background */
.ruled-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none; /* Ensures clicks go through the ruled lines */
}

}