/* General Body Styles */
html {
    width: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Manrope', sans-serif;
    line-height: 1.6;
    color: #222;
    background-color: #a9a9a9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Fixed Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #a9a9a9;
    padding: 0;
    text-align: center;
    z-index: 1000;
}

/* Title */
.animated-title {
    font-size: 4vw; /* Responsive font size */
    font-weight: bold;
    margin: 0;
    padding: 1rem 0 0.5rem;
    line-height: 1;
    color: #455A64; /* Darker Teal Blue/Gray */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 4px 4px 8px rgba(0, 0, 0, 0.6);
}

.animated-titleh1 {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    margin: 0;
    padding: 2rem 0;
    line-height: 1;
    color: #455A64;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 4px 4px 8px rgba(0, 0, 0, 0.6);
    text-align: center;
}

h1::before {
    content: 'Mark Painter';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    padding: 2rem 0;
    line-height: 1;
    color: #455A64; /* The actual text color */
    transform: scaleX(0);
    transform-origin: left;
    animation: wipe-in-left 2.75s forwards ease-out;
}

@keyframes slideInTitle {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Navigation Menu */
nav ul {
    list-style: none;
    margin-top: 1.5rem; /* Lower the menu */
    padding: 0 0 1rem 0;
    display: flex;
    justify-content: center;
}

nav li {
    margin: 0 1.5rem;
}

nav a {
    text-decoration: none;
    color: #222;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #FF0000; /* Bright Red */
}

nav a.active-link {
    color: #FF00FF; /* Magenta */
}

/* Calculate total header height */
.site-header {
    height: auto;
}

/* Main Content */
main {
    margin-top: 300px; /* This will be adjusted by JavaScript */
    flex: 1;
    width: 100%;
    box-sizing: border-box;
    padding: 0 2rem 2rem;
    position: relative;
    z-index: 1;
}

/* Main Content Area */
#main-content {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 0;
}

#enlarged-view {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

#enlarged-view img {
    max-width: 80%;
    max-height: 75%;
    object-fit: contain;
}

#enlarged-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 60%;
    margin-top: 1rem;
}

#enlarged-details {
    color: white;
    text-align: center;
    flex-grow: 1;
}

#prev-enlarged, #next-enlarged {
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0 1rem;
    z-index: 2001;
}

#close-enlarged {
    position: absolute;
    top: 20px;
    right: 30px;
    color: red;
    font-size: 3rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2001;
}

/* Content Sections */
.content-section {
    display: none; /* Hidden by default */
    background-color: #a9a9a9; 
    padding: 2rem;
    box-sizing: border-box;
}

.content-section.active {
    display: block; /* Show active section */
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: #455A64; /* Darker Teal Blue/Gray */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3), 4px 4px 8px rgba(0, 0, 0, 0.6);
    margin-top: 0; /* Remove default top margin from h2 */
}

/* About Section Layout */
.about-container {
    display: flex;
    align-items: flex-start; /* Image Grid Layout */
    gap: 2rem; /* Space between image and text */
}

.image-gallery {
    width: 100%;
    margin: 2em auto;
    padding: 0;
    max-width: 1400px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.image-container {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1; /* Make containers square */
}

.image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-info {
    padding: 1rem;
    background: #fff;
}

.image-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #333;
}

.image-meta {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* Lightbox Styles */
/* Make scrollbar transparent when lightbox is active */
body.lightbox-active {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* Make scrollbar transparent */
body::-webkit-scrollbar {
    width: 0.5em;
    background-color: transparent;
}

body.lightbox-active::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

body.lightbox-active::-webkit-scrollbar-thumb {
    background: transparent;
}

#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden;
}

#lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    cursor: default; /* Show default cursor over image */
    transition: transform 0.2s ease;
}

#lightbox-info {
    color: white;
    text-align: center;
    margin-top: 1rem;
    max-width: 80%;
}

#lightbox-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    color: white;
}

#lightbox-info p {
    margin: 0;
    font-size: 1rem;
    color: #ccc;
    font-style: italic;
}

/* Close button removed */

/* Image hover effect */
.img-container {
    overflow: hidden;
    cursor: zoom-in;
    width: 100%;
    height: 100%;
}

.img-container img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.img-container:hover img {
    transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-section {
        padding: 1.5rem 1rem;
    }
    
    .image-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 1.25rem 0.75rem;
    }
    
    .image-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0 0.5rem;
    }
}

.about-image {
    flex: 1; /* Take up 1 part of the space */
    max-width: 40%; /* Limit image width */
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px; /* Optional: rounded corners for the image */
}

.about-text {
    flex: 2; /* Take up 2 parts of the space */
}

.about-subsection {
    margin-bottom: 1.5rem;
}

.about-subsection:last-child {
    margin-bottom: 0;
}

/* Headings */
.animated-heading1,
.animated-heading2,
.animated-heading3,
.animated-heading4 {
    opacity: 1;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #455A64;
    margin-bottom: 0.5rem;
}

.about-subsection h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #37474F;
    font-size: 1.2rem;
    font-weight: 600;
}

.about-subsection ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 0;
}

.about-subsection li {
    margin-bottom: 0.3rem;
    color: #455A64;
    font-size: 1rem;
}

/* Responsive Design */

/* Mobile Menu Toggle */
.menu-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #222;
    cursor: pointer;
    position: absolute;
    top: 2rem;
    right: 3rem;
    z-index: 1001;
}

/* Tablet and smaller devices */
@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
    }

    .animated-title {
        font-size: 8vw;
    }

    nav ul {
        display: none; /* Hide nav links */
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        justify-content: center;
        align-items: center;
    }

    nav.active ul {
        display: flex; /* Show on active */
    }

    nav li {
        margin: 1.5rem 0;
    }

    nav a {
        font-size: 1.5rem;
    }

    .menu-toggle {
        display: block; /* Show hamburger */
    }

    .about-container {
        flex-direction: column;
    }

    .about-image {
        max-width: 100%;
    }

    #main-content {
        padding-top: 150px;
    }
}

/* Footer Styles */
.footer {
    background-color: transparent;
    color: #333;
    text-align: center;
    padding: 2rem 0;
    width: 100%;
    position: relative;
    z-index: 10;
    box-sizing: border-box;
    margin: 6rem auto 0; /* Added more top margin */
    flex-shrink: 0;
}

.social-icons {
    margin-bottom: 1rem;
}

.social-icons a {
    color: #333;
    margin: 0 15px;
    font-size: 1.5rem;
    transition: color 0.3s ease;
    text-decoration: none;
    opacity: 0.8;
}

.social-icons a:hover {
    opacity: 1;
    color: #000;
}

.social-icons a:hover {
    color: #ff0000; /* Bright red on hover, matching nav */
}

.footer-text {
    margin: 0;
    font-size: 0.9rem;
}
