/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Base Styles */
body {
    font-family: 'Karla', sans-serif;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Karla', sans-serif;
}

/* Container */
.container {
    max-width: 1200px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Header */
.header {
    background-color: #999999; /* Pale gray */
    color: #DDDDDD; /* Black text */
    width: 100%;
    padding: 20px 0;
    position: relative; /* For absolute positioning of logo */
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the text */
    position: relative;
    gap: 20px;
}

.header-logo {
    position: absolute;
    left: 1.5rem; /* Matches container padding */
    top: 50%;
    transform: translateY(-50%);
    height: 80px;
    width: auto;
}

.header-text {
    text-align: center;
}

/* Header with Logo */
.header-with-logo {
    position: relative; /* Positioning context for logo */
    display: flex;
    justify-content: center; /* Center the title */
    align-items: flex-start; /* Align content to top */
    padding: 1.5rem; /* Match container padding */
    margin: 2rem 0; /* Consistent vertical spacing */
}

/* Logo in Sections */
.section-logo {
    position: absolute;
    top: 1.5rem; /* Align with container padding */
    left: 1.5rem; /* Match container padding for alignment */
    height: 50px; /* Smaller size to match title height */
    width: auto; /* Maintain aspect ratio */
}

/* Intro Text */
.intro-text {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}
.intro-text { h1, h2, h3, h4, h5, h6 
    font-family: 'Karla', sans-serif;
}

.intro-text strong {
    color: #1E3A8A;
    font-weight: bold;
}

/* Intro Text */
.article-text {
    font-family: 'Karla', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    text-align: left;
}

.article-text strong {
    color: #1E3A8A;
    font-weight: bold;
}
/* Tailwind Classes (remove if using Tailwind CSS) */
.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.md\:text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-bold {
    font-weight: 700;
}

.text-gray-900 {
    color: #111827;
}

/* new slide show code from grok */
/* Hero Slideshow */
.hero-slideshow {
    position: relative;
    height: 60vh;
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    z-index: 1; /* Ensure slides are behind indicators */
}

.slide.active {
    opacity: 1;
}

.slide-indicator {
    width: 16px; /* Larger for visibility */
    height: 16px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5); /* Darker semi-transparent for contrast */
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5); /* Shadow for better visibility */
    transition: background-color 0.3s ease;
    cursor: pointer;
    z-index: 10; /* Ensure indicators are above slides */
}

.slide-indicator.active {
    background-color: #000; /* Solid black for active state */
}

.slide-indicator:hover {
    background-color: rgba(0, 0, 0, 0.7); /* Slightly darker on hover */
}

.slide-indicator:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* hamburger menu revised by grok */
/* Hamburger Menu */
.menu-overlay {
    position: fixed;
    top: 0;
    right: -100%; /* Hidden by default */
    width: 75%; /* Smaller width */
    max-width: 300px; /* Cap for larger screens */
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* More transparent */
    z-index: 999;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu-overlay.active {
    right: 0; /* Slide in */
}

#menu-toggle {
    position: fixed;
    top: 1.5rem; /* Matches top-6 (6 * 0.25rem) */
    right: 1.5rem; /* Matches right-6 */
    width: 3rem; /* Matches w-12 (12 * 0.25rem) */
    height: 3rem; /* Matches h-12 */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 9999px; /* Matches rounded-full */
    transition: background-color 0.3s ease;
    z-index: 1000;
    cursor: pointer;
}

#menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.7); /* Matches hover:bg-opacity-70 */
}

#menu-toggle i {
    color: #fff;
    font-size: 1.5rem; /* Matches ri-lg */
}

#menu-toggle.active i.ri-menu-line::before {
    content: '\eb98'; /* Remix Icon code for ri-close-line */
}

#close-menu {
    position: absolute;
    top: 1.5rem; /* Matches top-6 */
    right: 1.5rem; /* Matches right-6 */
    width: 3rem; /* Matches w-12 */
    height: 3rem; /* Matches h-12 */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1); /* Matches bg-white bg-opacity-10 */
    border: none;
    border-radius: 9999px; /* Matches rounded-full */
    transition: background-color 0.3s ease;
    cursor: pointer;
}

#close-menu:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Matches hover:bg-opacity-20 */
}

#close-menu i {
    color: #fff;
    font-size: 1.5rem; /* Matches ri-lg */
}

.menu-link {
    margin: 15px 0;
    font-size: 24px;
    color: #fff;
    text-decoration: none;
    position: relative;
    white-space: nowrap; /* Matches HTML class */
}

.menu-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.menu-link:hover::after,
.menu-link:focus::after {
    width: 100%;
}

.menu-link:focus {
    outline: none;
    color: #fff;
}

/* Media Queries */
@media (min-width: 768px) {
    .menu-overlay {
        width: 300px; /* Fixed width for larger screens */
        right: -300px; /* Match width when hidden */
    }
    .menu-overlay.active {
        right: 0;
    }
/* Photo Grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    width: 100%;
}

.photo-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3; /* Changed this ratio from 4/3 or 3/4 */
}

.photo-item-square {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1/1; /* Changed to square ratio */
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-item:hover img {
    transform: scale(1.5); /* Zoom in on hover */
}

.photo-item-square img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.photo-item-square:hover img {
    transform: scale(1.5); /* Zoom in on hover */
}

/* Video Container */
.video-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000; /* Fallback for video failure */
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Techbox Container */
.techbox {
    padding: 20px;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
}

/* Project Details Section */
.project-details {
    max-width: 800px; /* Limits text width for readability */
    margin: 0 auto; /* Centers the content */
}

/* Image Container */
.image-container {
    margin: 20px 0; /* Spacing above and below */
    text-align: center; /* Centers image and caption */
}

.project-image {
    max-width: 100%; /* Ensures responsiveness */
    height: auto; /* Maintains aspect ratio */
    max-height: 300px; /* Limits image height */
    object-fit: cover; /* Crops if needed */
    border-radius: 8px; /* Matches Tailwind default */
}

/* Article Box */
.articlebox {
    align-items: stretch; /* Ensures the image and text divs stretch to the same height */
}

.articlebox p {
    font-size: 1rem; /* Matches intro-text */
    line-height: 1.6; /* Matches intro-text */
    color: #333; /* Matches intro-text */
}

.articlebox strong {
    color: #1E3A8A; /* Matches intro-text strong */
    font-weight: bold; /* Matches intro-text strong */
}

.articlebox a {
    font-size: 0.875rem; /* Slightly smaller for the link */
    letter-spacing: 1px; /* Matches the uppercase spacing in the image */
}

/* Smaller Images Grid */
.articlebox + .grid img {
    aspect-ratio: 4/3; /* Ensures consistent image proportions */
    object-fit: cover; /* Prevents distortion */
}

/* Full Photo Box */
.fullphotobox {
    width: 100%;
    margin: 0 auto;
    text-align: center; /* Centers the image */
}

.fullphotobox .center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullphotobox img {
    max-width: 100%;
    height: auto;
    object-fit: cover; /* Ensures the image covers the area without distortion */
    width: 100%; /* Makes the image full-width */
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    font-family: 'Karla', sans-serif;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    user-select: none;
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.photo-item {
    cursor: pointer; /* Reinforced for clarity */
}

/* Media Queries */
@media (min-width: 768px) {
    .menu-overlay {
        width: 400px;
        right: -400px;
    }
    .menu-overlay.active {
        right: 0;
    }
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 640px) {
    .photo-grid {
        grid-template-columns: 1fr;
    }
    .intro-text {
        font-size: 0.9rem; /* Slightly smaller on mobile */
    }
}