/* ==========================================================================
   1. Global Reset & Layout Base
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #333;
    background-color: #fff;
    line-height: 1.5;
}

p {
    margin-bottom: 0.75rem;
}

/* Master Site Grid Layout (Sidebar + Main Content) */
.site-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .site-layout {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   2. Left Sidebar Navigation
   ========================================================================== */
.left-sidebar {
    width: 180px;
    flex-shrink: 0;
    background: #f0f0f2;
    padding: 2.5rem 1.5rem 2.5rem 2rem;
    border-right: 1px solid #ddd;
}

.left-sidebar h2 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    margin-bottom: 1.25rem;
}

/* Mobile Menu Toggle Button */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: block;
    }
        
    .menu-list {
        display: none;
        margin-top: 10px;
    }
    
    .menu-list.active {
        display: block;
    }
        
    .left-sidebar {
        padding: 10px 15px;
        width: 100%;
    }
}
.menu-list {
    list-style: none;
}

.menu-list li {
    margin-bottom: 0.75rem;
}

.menu-list a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 0.95rem;
}

.menu-list a:hover {
    color: #000;
    text-decoration: underline;
}


/* ==========================================================================
   3. Main Content Area & Gallery Grids
   ========================================================================== */
.main-content {
    padding: 1rem 1rem;
    background: #fff;
}

.gallery-content {
    margin-right: 200px;
}

.main-content h1 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.main-content h2 {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Category Sections & Masonry Grids (Home Page) */
.category-section {
    margin-bottom: 3rem;
    margin-right: 200px;
}

.category-section h2 {
    text-align: left;
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
    width: 100%;
}

.mosaic-item {
    break-inside: avoid;
    margin-bottom: 0;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.mosaic-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.mosaic-item img {
    width: 100%;
    height: auto;
    display: block;
}

.mosaic-caption {
    font-size: 0.8rem;
    font-style: italic;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #666;
}


/* ==========================================================================
   4. Detail Page Layout
   ========================================================================== */
.artwork-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    align-items: start;
}

@media (max-width: 1024px) {
    .artwork-layout {
        grid-template-columns: 1fr;
    }
}

.artwork-main-pane {
    max-width: 800px;
}

.artwork-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.image-viewport-wrapper {
    max-width: 300px;
    background: transparent;
    border: none;
    padding: 0;
    text-align: left;
}

.image-viewport-wrapper img {
    max-width: 250px;
}

/* Multi-image container styles for primary and secondary shots */
.artwork-images-container {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.artwork-images-container.has-secondary .image-viewport-wrapper {
    flex: 1;
    min-width: 280px;
}

#mainArtImage {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    cursor: zoom-in;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.artwork-medium {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 1rem;
}

.artwork-description {
    font-size: 1rem;
    color: #444;
    margin-bottom: 1.5rem;
}

.artwork-description p {
    margin-bottom: 0.75rem;
}

.artwork-price {
    font-size: 1.15rem;
    color: #111;
    margin-bottom: 2rem;
}

/* ==========================================================================
   Secondary Image & Metadata Adjustments
   ========================================================================== */

/* Enable zoom-in cursor for all lightbox trigger images */
.lightbox-trigger {
    cursor: zoom-in;
}

/* Secondary image medium text underneath */
.secondary-medium {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

/* ==========================================================================
   5. Comments & Testimonials
   ========================================================================== */
.comments-section {
    margin-top: 2.5rem;
    border-top: 1px solid #eaeaea;
    padding-top: 1.5rem;
}

.comments-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.comment-row {
    background: #f9f9fb;
    border: 1px solid #eef0f2;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.comment-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
}

.comment-body p {
    font-size: 0.95rem;
    color: #333;
}

.comment-form-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
    display: none;
}

.comment-form-container.active {
    display: block;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9rem;
}

.form-group input[type="text"], 
.form-group input[type="email"], 
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.btn-comment-toggle {
    background: #0275d8;
    color: #fff;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 15px;
    display: inline-block;
    text-decoration: none;
}

.btn-comment-toggle:hover {
    background: #025aa5;
}

.msg-success {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.msg-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Testimonials Styles */
.testimonials-block {
    margin: 25px 0;
}

.testimonial-item {
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.testimonial-item p {
    margin: 0 0 8px 0;
}


/* ==========================================================================
   6. Right Sidebar Mini-Gallery
   ========================================================================== */
.right-sidebar {
    background: #f9f9fb;
    padding: 1.5rem;
    border-left: 1px solid #e1e1e5;
    border-radius: 4px;
}

@media (max-width: 1024px) {
    .right-sidebar {
        border-left: none;
        border-top: 1px solid #e1e1e5;
        margin-top: 2rem;
    }
}

.right-sidebar h3 {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e1e1e5;
}

.mini-gallery-section {
    margin-bottom: 1.5rem;
}

.mini-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mini-grid a {
    display: block;
    height: 75px;
}

.mini-grid img {
    height: 100%;
    width: auto;
    border-radius: 2px;
    border: 1px solid #ccc;
    display: block;
    transition: opacity 0.2s ease;
}

.mini-grid img:hover {
    opacity: 0.8;
}


/* ==========================================================================
   7. Lightbox Modal
   ========================================================================== */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.lightbox-modal img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 98vw;
    max-height: 98vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.7);
    cursor: zoom-in;
    user-select: none;
}

.lightbox-modal img.is-zoomed {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    cursor: grab;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.4);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.4rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: scale(1.05);
}

/* ==========================================================================
   8. About & Contact Pages
   ========================================================================== */
/* First Row: Easel photo and text */
.about-row-easel {
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.figure-easel {
    margin: 0;
    text-align: left;
    max-width: 350px;
}

.figure-easel img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
}

.easel-text {
    flex: 1;
    min-width: 250px;
    font-size: 0.8rem;
    color: #444;
}

/* Second Row: Studio photo and Boss photo */
.about-row-studio {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 35px 0;
    flex-wrap: wrap;
}

.figure-studio {
    margin: 0;
    text-align: left;
    max-width: 320px;
}

.figure-studio img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
}

.figure-boss {
    margin: 0;
    text-align: left;
    max-width: 160px;
}

.figure-boss a {
    text-decoration: none;
}

.figure-boss img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ddd;
    display: block;
}

.image-caption {
    font-size: 0.75rem;
    color: #666;
    margin-top: 6px;
    text-align: left;
}

/* Contact form styling */
.contact-form-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 25px;
    border-radius: 6px;
    max-width: 600px;
    margin-top: 20px;
}

.btn-submit {
    background: #0275d8;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-top: 10px;
    display: inline-block;
    text-decoration: none;
}

.btn-submit:hover {
    background: #025aa5;
}


/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    border-top: 1px solid #eaeaea;
    font-size: 0.9rem;
    color: #555;
}

.site-footer p {
    margin: 5px 0;
}

.site-footer a {
    color: #0275d8;
    text-decoration: none;
}

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

/* ==========================================================================
   Testimonials Page Layout
   ========================================================================== */
.testimonial-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background: #f9f9fb;
    border: 1px solid #eef0f2;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.testimonial-thumb-wrapper {
    text-align: center;
    max-width: 150px;
}

.testimonial-art-title {
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 4px;
    text-align: left;
    line-height: 1.2;
}

.testimonial-art-title a {
    color: #333;
    text-decoration: none;
}

.testimonial-art-title a:hover {
    text-decoration: underline;
}

.testimonial-art-medium {
    font-size: 0.7rem;
    font-style: italic;
    color: #666;
    margin-top: 4px;
    text-align: left;
    line-height: 1.2;
}

.testimonial-thumb img {
    width: 120px;
    height: auto;
    border-radius: 4px;
    border: 1px solid #ccc;
    display: block;
    transition: opacity 0.2s ease;
}

.testimonial-thumb img:hover {
    opacity: 0.85;
}

.testimonial-content {
    flex: 1;
}

.testimonial-quote p {
    font-size: 1rem;
    font-style: italic;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.6;
}

.testimonial-author {
    font-size: 0.9rem;
    color: #555;
    text-align: right;
}

.testimonial-author a {
    color: #0275d8;
    text-decoration: none;
}

.testimonial-author a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .testimonials-page-layout {
        grid-template-columns: 1fr !important;
    }
    .testimonial-card {
        flex-direction: column;
    }
    .testimonial-thumb img {
        width: 120px;
    }
}

/* ==========================================================================
   Mobile Body Text Legibility Fixes
   ========================================================================== */
@media (max-width: 768px) {
    body {
        font-size: 1.1rem; /* Bumps base body size up for comfortable reading */
        line-height: 1.6;
    }

    /* Ensure description paragraphs and comment bodies scale up nicely */
    .artwork-description,
    .comment-body p,
    .testimonial-item,
    .easel-text,
    p {
        font-size: 1.05rem !important;
        line-height: 1.6;
    }
}

/* ==========================================================================
   Full Width Mobile Layout (Remove Right Margins & Sidebar Spacing)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Clear out desktop margins holding space for the right sidebar */
    .gallery-content,
    .category-section {
        margin-right: 0 !important;
    }

    /* Hide or stack the right sidebar gracefully on mobile */
    .right-sidebar {
        display: none; /* Hides the mini-gallery sidebar on mobile to keep it clean and full width */
    }

    /* Maximize main content padding usage on mobile */
    .main-content {
        padding: 1rem 1.25rem;
    }
}

/* ==========================================================================
   Full Width Mobile Layout (Remove Right Margins & Sidebar Spacing)
   ========================================================================== */
@media (max-width: 1024px) {
    /* Clear out desktop margins holding space for the right sidebar across all pages */
    .gallery-content,
    .category-section,
    .contact-form-container {
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Hide the right sidebar on mobile */
    .right-sidebar {
        display: none;
    }

    /* Maximize main content padding usage on mobile */
    .main-content {
        padding: 1rem 1.25rem;
    }
}

/* =Clean Mobile Typography = */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    body {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    p, 
    .artwork-description, 
    .comment-body p {
        font-size: 1.1rem;
        line-height: 1.6;
    }
}