* {
    -webkit-user-select: none;
    user-select: none;
}

/* Reset default margin and padding */
body, h1, h2, h3, p {
    margin: 0;
    padding: 0;
}

/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    overflow-x: hidden; /* Prevent horizontal scroll bar */
}

/* Header Styles */
header {
    background-color: #333;
    color: white;
    padding: 1rem;
	padding-top: 50px;
    width: 150px;
    white-space: nowrap; /* Prevent text from wrapping */
    overflow: hidden; /* Hide overflowing text */
}

/* Heading inside the header */
.header-title {
    font-size: 1rem; /* Set a default font size */
    margin: 0;
    white-space: nowrap; /* Prevent text from wrapping */
}

/* Wrapper for entire layout */
.wrapper {
    display: flex;
    flex-direction: row;
    height: 100vh; /* Set wrapper to full viewport height */
    overflow: hidden; /* Hide overflowing content */
}

/* Media query for smaller screens */
@media screen and (max-width: 768px) {
    header {
        width: 100%; 
		padding-top: 1rem;/* Take up full width */
    }

    .wrapper {
        flex-direction: column; /* Stack header on top of content */
    }

    .sidebar {
        width: 100%; /* Take up full width */
        position: static; /* Remove sticky position */
        height: auto; /* Reset height */
        overflow-y: visible; /* Show content without scroll */
    }

    .main-content {
        overflow-y: auto; /* Enable vertical scrolling for content */
		max-height: calc(100vh - 50px); /* Use min-height instead of height to cover the full viewport height */
    }
}

/* Sidebar Styles */
.sidebar {
    position: sticky;
    top: 0;
    background-color: #555;
    color: white;
    padding: 1rem;
    width: 15%; /* Set desired width for sidebar */
    height: 100vh; /* Cover entire viewport height */
    overflow-y: auto;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background-color: #f5f5f5; /* Set your desired background color */
}

/* Portfolio grid styling */
#portfolio {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Default 4-column grid */
    gap: 1rem;
}

/* Portfolio item styling */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    padding-top: 100%; /* Creates a square aspect ratio container */
}

.image-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    object-fit: cover; /* Crop the image to fit within the container */
    transition: transform 0.3s ease;
}

.image-wrapper[data-orientation="landscape"] img {
	
    height: 100%;
    width: auto;
}

.image-wrapper[data-orientation="portrait"] img {
	top: 75%;
    width: 100%;
    height: auto;
}

.image-wrapper:hover img {
    transform: translate(-50%, -50%) scale(1.05);
}


/* Load more button styling */
#loadMore {
    display: block;
    margin: 1rem auto;
    padding: 0.5rem 1rem;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#loadMore:hover {
    background-color: #444;
}

/* Popup styles */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-content {
    z-index: 20;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    width: auto; /* Set width to auto for responsiveness */
    height: auto; /* Set height to auto for responsiveness */
}

/* Responsive adjustments for popup */
@media screen and (max-width: 768px) {
    .popup-content {
		position: relative;
        max-width: 95%; /* Adjust max-width for smaller screens */
        max-height: 85%; /* Adjust max-height for smaller screens */
		padding: 0;
    }
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
}

.modal-header button.close {
    display: none;
}

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    z-index: 10; /* Ensure the overlay is above other content */
}

.no-more-content {
    text-align: center;
    padding: 1rem;
    font-weight: bold;
    color: #777;
}

.progress {
    width: 100%;
    background-color: #ddd;
}

.progress-bar {
    height: 20px;
    background-color: #4CAF50;
    transition: width 0.3s;
}

/* Slideshow styles */
.slideshow {
    display: flex;
    justify-content: center;
    max-width: 100%;
    max-height: 80vh;
}

.slideshow img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.slideshow-buttons {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.slideshow-buttons button {
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 0.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    pointer-events: auto; /* Allow button clicks */
}

.slideshow-buttons button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

/* Responsive grid adjustments */
@media screen and (min-width: 2100px) {
    #portfolio {
        grid-template-columns: repeat(9, 1fr);
    }
}

@media screen and (min-width: 1200px) {
    #portfolio {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media screen and (max-width: 768px) {
    #portfolio {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}
