/* General Body Styling (often from style.css, but ensuring project page consistency) */
body {
    margin: 0;
    padding: 0;
    font-family: 'Georgia', serif; /* Consistent font */
    color: #f0f0f0; /* Default text color for project pages */
    /* Universal background for all project pages, set to Hugo Boss theme's background */
    background-color: #2a2a2a; 
}

/* Header for Project Pages */
header {
    background-color: #000000; /* Dark background */
    color: #ffd700; /* Gold text for logo */
    padding: 15px 40px;
    border-bottom: 2px solid #ffd700; /* Gold underline */
    display: flex;
    justify-content: space-between; /* Space out logo and nav links */
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%; /* Take full width of header */
}

/* Styling for "AB Designs" text in the header */
.logo-text {
    font-size: 1.8em;
    font-weight: bold;
    color: #ffd700; /* Make it gold */
    text-decoration: none; /* Ensure no underline */
    white-space: nowrap; /* Keep on one line */
}

.nav-links {
    display: flex;
    align-items: center;
}

/* Styling for the "Back to Portfolio" button in the header */
.header-back-btn {
    display: inline-block;
    padding: 8px 15px;
    background-color: #ffd700; /* Gold background */
    color: #1a1a1a; /* Dark text for contrast */
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin-left: 20px; /* Space from logo */
}

.header-back-btn:hover {
    background-color: #e0b0d0; /* Soft magenta/purple on hover */
}

/* Main content area for project details */
.project-detail-main {
    padding: 60px 40px; /* Ample padding */
    max-width: 1000px; /* Max width for readability */
    margin: 40px auto; /* Center the entire main content block */
    background-color: #282828; /* Slightly lighter dark background for content area */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4); /* Subtle shadow */
    border-radius: 10px;
    box-sizing: border-box; /* Include padding in element's total width/height */
}

/* Hero section with main project title */
.project-hero {
    text-align: center; /* Center everything in this section */
    margin-bottom: 50px;
}

.project-hero h1 {
    font-size: 4.5em; /* Large main title */
    /* Changed to gold color as requested */
    color: #ffd700; 
    margin-bottom: 10px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5); /* Subtle shadow for depth */
    /* Reset any conflicting text styles from style.css */
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    -webkit-text-stroke: unset;
}

.project-hero .project-tagline {
    font-size: 1.2em;
    color: #c0c0c0;
    max-width: 800px; /* Limit width for readability */
    margin: 0 auto; /* Center the tagline text block */
}

/* Overview Section */
.project-overview {
    margin-bottom: 50px;
}

.project-overview h2,
.project-gallery h2 {
    font-size: 2.2em; /* Consistent size for section headings */
    color: #fff; /* White color for headings */
    margin-bottom: 20px;
    border-bottom: 1px solid #444; /* Subtle separator line */
    padding-bottom: 10px;
    text-align: center; /* Center the headings */
    text-transform: uppercase; /* All caps */
    letter-spacing: 1px;
}

.project-overview p {
    font-size: 1.1em;
    color: #c0c0c0;
    line-height: 1.6;
    margin-bottom: 15px;
    text-align: center; /* Crucial: Centers the paragraph text */
    max-width: 800px; /* Limit paragraph width for readability */
    margin-left: auto; /* Centers the paragraph block itself */
    margin-right: auto; /* Centers the paragraph block itself */
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    /* Responsive grid: auto-fit creates as many columns as fit, min 250px wide */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; /* Space between images */
    justify-items: center; /* Centers grid items horizontally within their cells */
    align-items: start; /* Aligns grid items to the top of their cells vertically */
    padding: 0 20px;
    max-width: 900px; /* Constrain the overall gallery grid width */
    margin: 0 auto; /* Center the grid itself on the page */
}

.gallery-grid img {
    width: 100%;
    max-width: 100%; /* Ensure images don't exceed their grid cell */
    height: auto;
    border-radius: 10px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); /* Shadow for depth */
    display: block; /* Remove extra space below images */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
}

.gallery-grid img:hover {
    transform: scale(1.03); /* Slight zoom on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

/* Call to Action Section */
.call-to-action {
    text-align: center;
    margin-top: 60px;
    font-size: 1.2em;
}

.back-link { /* Styling for the "Want to see more?" link */
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
    transition: text-decoration 0.3s ease;
}
.back-link:hover {
    text-decoration: underline;
}

/* Footer Styling */
footer {
    background-color: #000000;
    color: #c0c0c0;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 50px;
    border-top: 2px solid #ffd700;
    display: flex;
    flex-direction: column; /* Stack items */
    align-items: center; /* Center items horizontally */
}

footer p {
    margin-top: 15px;
    font-size: 0.9em;
}

/* --- THEME-SPECIFIC STYLES (NO LONGER USED FOR COLORS, ONLY FOR BODY CLASS) --- */
/* The specific color overrides for themes are now removed to ensure consistent colors */

/* While body classes like .hugo-boss-theme, .mustang-gtd-theme, etc.
   still exist in your HTML, their specific background-color and h1 color
   rules are now removed from here, so the universal body and h1 styles apply. */

/* Responsive adjustments for project pages */
@media (max-width: 768px) {
    .project-detail-main {
        padding: 20px; /* Reduced padding on mobile */
        margin: 20px auto;
    }
    header {
        padding: 15px 20px;
        flex-direction: column; /* Stack logo and nav links */
        align-items: center;
    }
    .main-nav {
        flex-direction: column;
        align-items: center;
    }
    .logo-text {
        margin-bottom: 10px; /* Space between logo and back button */
    }
    .nav-links {
        margin-top: 10px; /* Space from logo */
    }
    .project-hero h1 {
        font-size: 2.8em; /* Adjust for mobile view */
        padding: 0 10px; /* Add horizontal padding to prevent text overflow */
    }
    .project-hero .project-tagline {
        font-size: 1.1em;
        padding: 0 15px;
    }
    .project-overview h2,
    .project-gallery h2 {
        font-size: 1.8em;
        padding: 0 10px;
    }
    .project-overview p {
        font-size: 1em;
        padding: 0 15px;
    }
    .gallery-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
        padding: 0 10px;
    }
    .gallery-grid img {
        max-width: 90%; /* Ensure images don't stretch too wide */
    }
    .call-to-action {
        font-size: 1.1em;
        margin-top: 40px;
    }
}
/* Styles for Image Zoom Modal */
.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.9); /* Black w/ opacity */
    display: flex; /* Use flexbox for centering */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%; /* Max width of the image */
    max-height: 90vh; /* Max height of the image, viewport height */
    box-shadow: 0 5px 15px rgba(0,0,0,0.6);
    border-radius: 8px;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {transform: scale(0.1)} 
    to {transform: scale(1)}
}

.close-button {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001; /* Ensure close button is above the image */
}

.close-button:hover,
.close-button:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

/* Add a pointer cursor to gallery images to indicate they are clickable */
.gallery-grid img {
    cursor: pointer; /* This line should already be in your CSS, but double check */
}

/* Responsive adjustments for modal on smaller screens */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        max-height: 80vh;
    }
    .close-button {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}