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

:root {
    --accent: #f0c674;
    --muted: #8c96ac;
    --panel: rgba(255, 255, 255, 0.04);
    --panel-light: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Manrope', Arial, sans-serif;
    background: radial-gradient(circle at 20% 20%, #1a2233, #0b0f17 50%, #05070c 100%);
    color: #e7ecf5;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Camera Overlay */
.camera-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.camera-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    animation: none;
    user-select: none;
    -webkit-user-drag: none;
}

@keyframes zoomIn {
    from { transform: scale(1); }
    to { transform: scale(5); opacity: 0; }
}

/* Header */
header {
    background: linear-gradient(to right, #04070c, #18438d);
    color: #fff;
    padding: 2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-bottom: 4px solid #1e3c72;
}

header:hover { background: linear-gradient(to right, #2a5298, #1e3c72); }

header img#homeButton {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    cursor: pointer;
}

.main-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(2.5rem, 4vw, 3.6rem);
    text-align: center;
    margin: 2.5rem auto 8.0rem;
    letter-spacing: 1px;
    color: #f7f8fb;
    text-transform: uppercase;
    
}

.subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.gallery-title {
    text-align: center;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 1rem 0 0.2rem;
    color: #f7f8fb;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    font-family: 'Playfair Display', 'Times New Roman', serif;
}

.gallery-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background-color: var(--accent);
    border-radius: 2px;
}

.gallery-lede {
    text-align: center;
    color: var(--muted);
    max-width: 720px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    padding: 0 1.25rem;
}

.gallery-wrapper { padding: 0 1.25rem 4rem; }

.category-block {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.5rem 1.25rem 2rem;
    margin: 1.5rem auto 2rem;
    max-width: 1200px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(6px);
}

.category-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

.category-heading h4 {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: 1.6rem;
    letter-spacing: 1px;
    color: #f7f8fb;
    text-transform: uppercase;
}

.category-heading p {
    color: var(--muted);
    font-size: 1rem;
}

.toggle-btn {
    background: var(--accent);
    color: #0b0f17;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.toggle-btn:hover {
    background: #f0c674;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(240, 198, 116, 0.3);
}

.toggle-btn:active { transform: scale(0.95); }

.gallery {
    transition: all 0.3s ease;
}

.gallery[style*="display: none"] {
    opacity: 0;
    pointer-events: none;
}

.gallery:not([style*="display: none"]) {
    opacity: 1;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar Navigation */
.sidebar {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    height: 100%;
    background-color: #333;
    padding-top: 60px;
    z-index: 1000;
}

.sidebar a {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 18px;
    color: #fff;
    display: block;
}

.sidebar a:hover { background-color: #575757; }

/* Gallery Styles */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 0.5rem 0;
}

.gallery.preview {
    overflow: hidden;
}

/* Hide all items by default in preview mode, then reveal the first 4 */
.gallery.preview .gallery-item {
    display: none;
}

.gallery.preview .gallery-item:nth-child(-n+4) {
    display: block;
}

/* Mobile-only preview: show only one image on smaller screens */
@media (max-width: 767px) {
    .gallery {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .gallery.preview .gallery-item {
        display: none;
    }

    .gallery.preview .gallery-item:nth-child(-n+4) {
        display: none;
    }

    .gallery.preview .gallery-item:nth-child(1) {
        display: block;
    }
}

/* Tablet (small laptops / large tablets) tweaks */
@media (min-width: 768px) and (max-width: 1024px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }

    .toggle-btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.95rem;
    }

    .gallery-item {
        min-height: 260px;
    }

    .main-title {
        font-size: clamp(2.25rem, 5vw, 3rem);
        margin-bottom: 1.4rem;
    }
}

/* Mobile-specific touch and lightbox improvements */
@media (max-width: 767px) {
    header {
        padding: 1.25rem;
    }

    header img#homeButton {
        width: 36px;
        right: 0.75rem;
    }

    .toggle-btn {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .gallery-item {
        min-height: 220px;
    }

    .gallery-title {
        font-size: 1.6rem;
        margin-top: 1rem;
    }

    /* Ensure lightbox fits mobile screens and images scale correctly */
    .lightbox {
        align-items: center;
        justify-content: center;
        padding: 1rem;
    }

    .lightbox .lightbox-content {
        max-width: 95vw;
        max-height: 90vh;
        object-fit: contain;
    }
}

/* When not in preview mode, animate items 5+ on reveal */
.gallery:not(.preview) .gallery-item:nth-child(n+5) {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
}

/* Hint to the browser to improve animation and scroll smoothness */
.gallery-item, .gallery-item img {
    will-change: transform;
    transform: translateZ(0);
}

.gallery-item:hover { transform: scale(1.05); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); }

.gallery-item:hover img { transform: scale(1.1); }

.gallery-item::after {
    /* hide redundant data-label badge */
    display: none;
}

/* Honeypot styling: keep off-screen but accessible to bots */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

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

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
    z-index: 3100;
    transition: color 0.3s ease;
}

.lightbox .close:hover { color: #f00; }

/* Footer */
footer {
    background: linear-gradient(to right, #04070c, #18438d);
    color: #fff;
    text-align: center;
    padding: 1rem;
    position: fixed;
    width: 100%;
    bottom: 0;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
    border-top: 4px solid #1e3c72;
}

footer:hover { background: linear-gradient(to right, #2a5298, #1e3c72); }

/* Responsive Design */
@media (max-width: 768px) {
    header h1 { font-size: 2rem; }
    header p { font-size: 1rem; }
    .sidebar { width: 200px; }
    .category-heading { flex-direction: column; align-items: flex-start; }
}

/* About Section */
.about-section { padding: 2rem 1rem 6rem; }
.about-container {
    width: min(1200px, 95%);
    margin: 2.5rem auto;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    background: var(--panel-light);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow);
}
.about-image {
    width: 320px;
    height: 320px;
    object-fit: contain;
    background: rgba(11,15,23,0.45);
    padding: 10px;
    border-radius: 8px;
    flex: 0 0 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.about-header {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    text-align: center;
    color: #f7f8fb;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}
.about-text p {
    line-height: 1.6;
    color: #e7ecf5;
    font-size: 1rem;
}
.about-text .note {
    margin-top: 1rem;
    color: var(--muted);
    font-style: italic;
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .about-container { flex-direction: column; align-items: center; text-align: center; padding: 1rem; }
    .about-image { width: 85%; height: auto; flex: 0 0 auto; }
    .about-text { padding: 0; }
}

/* Contact form styles */
.contact-section { padding: 2rem 1rem 6rem; }
.contact-container {
    width: min(1100px, 95%);
    margin: 1.25rem auto 3rem;
}
.contact-form {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.06);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.contact-form label { color: #f7f8fb; font-weight: 600; font-size: 0.95rem; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="date"],
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(11,15,23,0.5);
    color: #e7ecf5;
    font-size: 1rem;
}
.contact-form textarea { resize: vertical; }
.contact-form .row { display: flex; gap: 1rem; }
.contact-form .col { flex: 1; display:flex; flex-direction: column; gap: 0.35rem; }
.contact-form .form-actions { display:flex; gap: 1rem; align-items:center; margin-top:0.5rem; }
.contact-form .hidden { display: none; }
.contact-form #formStatus { color: var(--accent); font-weight:600; }

@media (max-width: 768px) {
    .contact-form .row { flex-direction: column; }
}