/* styles.css */
:root {
    --primary-color: #000000;
    --secondary-color: #333333;
    --background-color: #ffffff;
    --text-color: #000000;
    --accent-color: #f0f0f0;
    --border-color: #e0e0e0;
    --hover-color: #f5f5f5;
}

[data-theme="dark"] {
    --primary-color: #ffffff;
    --secondary-color: #cccccc;
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --accent-color: #2a2a2a;
    --border-color: #404040;
    --hover-color: #333333;
}

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

body {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: background-color 0.8s ease, color 0.8s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--background-color);
    padding: 20px 0;
    border-bottom: 2px solid var(--border-color);
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo-section {
    text-align: center;
    flex: 1;
    display: flex; /* Change to flex for side-by-side logos */
    justify-content: center; /* Center the whole group */
    align-items: center; /* Vertically align logos with text */
    gap: 50px; /* Space between logos and title; adjust as needed */
}

.title-wrapper {
    text-align: center; /* Ensure title/subtitle center within their wrapper */
}

.desktop-logo {
    display: none; /* Hidden by default (mobile-first) */
    width: 75px; /* Small size */
    height: auto; /* Preserve aspect ratio */
}


/* Show on desktop */
@media (min-width: 600px) {
    .desktop-logo {
        display: block;
    }
}

.site-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-style: italic;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background-color: var(--hover-color);
}

/* Navigation */
nav {
    background-color: var(--accent-color);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Optional: subtle shadow for depth */
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
}

.nav-menu {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0 15px; /* Reduced margin between items for better spacing with increased padding */
    position: relative; /* For hover underline pseudo-element */
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none; /* Reinforce no underline */
    font-weight: 500;
    padding: 8px 16px; /* Increased padding for button-like feel: vertical 8px, horizontal 16px */
    transition: color 0.3s ease, background-color 0.3s ease;
    display: inline-block; /* Better for hover effects */
    border-radius: 4px; /* Move border-radius here for always-rounded, but highlight on hover */
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: var(--primary-color); /* Brighter/more contrasting hover color */
    background-color: var(--hover-color); /* Subtle background fade, now covering full padded area */
}

/* Optional: Add underline on hover with pseudo-element for custom styling */
.nav-menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%; /* Center underline start for smoother animation */
    transform: translateX(-50%); /* Center alignment */
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: calc(100% - 32px); /* Match width to text + padding, adjust if needed (32px = 16px left + 16px right) */
}

/* Theme toggle styling to match nav items */
.nav-toggle-wrapper {
    margin-left: auto;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-weight: 500; /* Match nav font weight */
}

.theme-toggle:hover {
    background-color: var(--hover-color);
    color: var(--primary-color); /* Match nav hover */
    border-color: var(--primary-color); /* Optional: border highlight */
}

/* Visited links reset (to prevent blue/purple defaults) */
.nav-menu a:visited {
    color: var(--text-color);
}



/* Main Content */
main {
    padding: 40px 0;
}

.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.section-content p {
    margin-bottom: 20px;
}

/* Gallery */
.gallery-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.gallery-scroll {
    display: flex;
}

.gallery-item {
    flex: 0 0 350px;
    margin-right: 20px;
    background-color: var(--accent-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    position: relative; /* For overlay positioning */
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    background-color: var(--hover-color);
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent overlay */
    color: #ffffff;
    padding: 10px;
    text-align: center;
    font-size: 0.9rem;
    display: none; /* Hidden by default; show if present */
}

.gallery-item:has(.gallery-caption) .gallery-caption {
    display: block; /* Show only if div is present */
}


/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    overflow: auto;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
}

/* Adjust for dark mode if needed */
[data-theme="dark"] .lightbox-modal {
    background-color: rgba(255, 255, 255, 0.1); /* Lighter overlay for dark mode visibility */
}

@keyframes autoScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Image placeholders for sections */
.inline-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    background: linear-gradient(45deg, var(--accent-color), var(--hover-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    color: var(--secondary-color);
    font-style: italic;
}

.image-left {
    float: left;
    margin: 0 30px 20px 0;
    max-width: 420px;
}

.image-right {
    float: right;
    margin: 0 0 20px 30px;
    max-width: 420px;
}

/* Specifications Table */
.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.spec-table th,
.spec-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
}

.spec-table th {
    background-color: var(--accent-color);
    font-weight: bold;
}

.spec-table tr:hover {
    background-color: var(--hover-color);
}

/* Footer */
footer {
    background-color: var(--accent-color);
    border-top: 2px solid var(--border-color);
    padding: 40px 0;
    margin-top: 80px;
}

div.email > span:nth-child(2) {
	display: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.footer-section p {
    margin-bottom: 10px;
    color: var(--text-color);
}

.footer-section a {
    color: var(--text-color);
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--secondary-color);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 20px;
    }
@media (max-width: 600px) {
nav .container {
        flex-direction: column; /* Stack menu and toggle on small screens */
        align-items: center;
    }

    .nav-menu {
        flex-direction: column;
        text-align: center;
        margin-bottom: 10px; /* Space above toggle */
    }

    .nav-menu li {
        margin: 10px 0;
    }

    .nav-toggle-wrapper {
        margin-left: 0; /* Center on mobile */
    }
}
    .section-title {
        font-size: 1.7rem;
    }

    .gallery-item {
        flex: 0 0 250px;
    }
    
    .gallery-item {
    flex: 0 0 300px;
    margin-right: 20px;
    background-color: var(--accent-color);
    border-radius: 20px;
}

.gallery-img {
    width: 100%;
    height: 170px;
    object-fit: contain;
    background-color: var(--hover-color);
    display: block;
}

    .image-left,
    .image-right {
        float: none;
        margin: 20px auto;
        max-width: 100%;
    }

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

    .spec-table {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .site-title {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .gallery-item {
        flex: 0 0 200px;
    }

    .spec-table th,
    .spec-table td {
        padding: 8px;
    }
}