/* Global Reset */
body {
    background-color: #000;
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #fff;
}

/* Main Page Container */
.site-container {
    max-width: 1400px;
    margin: 0 auto;
    border: 1px solid #1a1a1a;
    min-height: 100vh;
}

/* Header */
.main-header {
    text-align: center;
    padding: 20px 20px;
    background-color: #000;
}

.main-header h1 {
    font-size: clamp(2.2rem, 9vw, 3.5rem); 
    color: #fff;
    margin: 0;
    line-height: 1.1;
    letter-spacing: 2px;
    text-transform: uppercase;
    word-wrap: break-word;
}

.tagline {
    font-size: clamp(0.7rem, 2.5vw, 1.1rem);
    color: #888;
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.6;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* --- Poem & Manuscript Look --- */

.poem pre::first-letter {
    font-size: 4rem;
    font-family: serif;
    font-weight: bold;
    text-transform: uppercase;
    float: left;
    margin-right: 12px;
    margin-top: -8px; 
    line-height: 1;
}

/* Top Navigation */
.topnav {
    background-color: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    position: sticky;
    top: 0;
    z-index: 99999; /* Increased to ensure it stays above all content */
    width: 100%;
    overflow: visible !important; /* Critical: allows dropdown to show outside the bar */
}

.topnav a, .dropbtn {
    display: inline-block;
    color: #fff;
    text-align: center;
    padding: 20px 30px;
    text-decoration: none;
    font-size: 18px;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.topnav a:hover, .dropbtn:hover {
    color: #d4af37;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #000;
    min-width: 220px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.8);
    z-index: 100001; /* Must be higher than .topnav */
    border: 1px solid #1a1a1a;
    top: 100%;
    left: 50%; /* Center it under the button */
    transform: translateX(-50%);
}

/* Helper class for JS toggle */
.show { 
    display: block !important; 
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #1a1a1a;
    font-size: 13px;
    color: #fff;
}
.show { display: block !important; }

/* --- Gallery Detail (Fluid Desktop Layout) --- */
.gallery-detail {
    display: flex;
    flex-direction: row;
    gap: 4%;
    padding: 40px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: start;
    box-sizing: border-box;
}

.art-display {
    flex: 1.8; /* Gives the art more visual weight */
    min-width: 0; /* Prevents flex items from overflowing */
}

.art-display img {
    width: 100%;
    height: auto;
    border: 1px solid #1a1a1a;
    cursor: zoom-in !important;
}

.content-sidebar {
    flex: 1;
    min-width: 320px; /* Ensures text doesn't get too squashed before stacking */
}

.zoom-hint {
    color: #888;
    font-size: 0.8rem;
    margin-top: 10px;
    letter-spacing: 1px;
}

/* --- Masonry Grid (Index/Gallery Pages) --- */
.gallery-container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.masonry-grid {
    column-count: 3;
    column-gap: 15px;
    width: 100%;
}

.grid-item {
    display: inline-block;
    margin-bottom: 15px;
    width: 100%;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #222;
    transition: transform 0.3s ease;
}

.grid-item:hover { transform: scale(1.02); }
.grid-item img { width: 100%; display: block; }

.overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(212, 175, 55, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-weight: bold;
}

.grid-item:hover .overlay { opacity: 1; }

/* --- High-End Gallery Typography --- */
.content-sidebar p, 
.content-sidebar h2, 
.content-sidebar h3 {
    font-weight: 300;       /* Lighter weight looks more expensive */
    line-height: 1.8;       /* Matches the breathability of your poem */
    letter-spacing: 0.02em; /* Prevents characters from crowding */
    color: #e0e0e0;         /* Softens the glare to a 'Star-White' */
    margin-bottom: 1.8rem;  /* Creates space between narrative sections */
}

/* Specific fix for headers inside the sidebar */
.content-sidebar h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.content-sidebar h3 {
    font-size: 0.95rem;
    color: #888; /* Subdued gray for the "Artist / Medium" info */
    margin-top: 0;
    font-weight: 600;
}

/* --- Tablet & Mobile Responsive (Targets iPad Pro & smaller) --- */
@media (max-width: 1200px) {
    .main-header {
        padding: 20px 10px;
    }

    .main-header h1 {
        /* Reduced the max from 5rem to 3rem */
        font-size: clamp(1.8rem, 6vw, 3rem); 
        margin: 0 auto;
    }

    .topnav {
        flex-wrap: nowrap;         /* Force links to stay on one line */
        justify-content: center;
        gap: 5px;                  /* Reduce gap between items */
        padding: 5px;
        overflow-x: auto;          /* Allow side-scrolling if screen is tiny */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }

    .topnav a, .dropbtn {
        padding: 12px 10px;        /* Significantly reduce padding */
        font-size: 16px;           /* Smaller text for mobile fit */
        letter-spacing: 1px;       /* Tighten letter spacing */
    }

    


  
    .gallery-detail {
        flex-direction: column !important; /* Force stack on iPad/Mobile */
        align-items: center;
        padding: 20px;
        gap: 20px;
    }

    .art-display, .content-sidebar {
        width: 100%;
        max-width: 850px;
    }

    .content-sidebar {
        padding-left: 0;
        margin: 0 auto;
    }

    .zoom-hint {
        text-align: center;
        width: 100%;
    }



    .poem pre {
        padding-left: 20px; 
        font-size: 1.1rem;      
    }

    .poem pre::first-letter {
        font-size: 3.5rem;
        margin-top: -5px; 
    }
}

@media (max-width: 900px) { .masonry-grid { column-count: 2; } }
@media (max-width: 600px) { .masonry-grid { column-count: 1; } }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 100%;
    max-height: 100vh;
    object-fit: contain;
    cursor: zoom-out;
}
/* Container upgraded for stability and clickability */
.gallery-item {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Changed from center to flex-start */
    cursor: pointer;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #333;
}
.gallery-item img {
    width: 100%;
    height: auto;
    aspect-ratio: auto; /* Let the portrait height breathe */
    object-fit: contain !important; 
    display: block;
}}.gallery-grid {
    padding-bottom: 80px; /* Adjust this number to increase/decrease the gap */
}
/* Upgraded Overlay: Fixes the 'blocked click' issue */
.image-overlay {
    position: absolute;
    top: 15px; 
    left: 15px;
    right: 15px;
    height: 300px; /* Matches your image height exactly */
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 15px; 
    box-sizing: border-box;
    z-index: 2;
    /* Allows the click to reach the image/item below */
    pointer-events: none; 
}

/* Upgraded Text: Prevents truncation */
.poetic-description {
    font-size: 0.85rem; 
    line-height: 1.5;
    text-align: center;
    margin: 0;
    max-height: 100%;
    overflow-y: auto; /* Adds a scrollbar ONLY if the text is too long */
    overflow-wrap: break-word;
}

/* Shows the overlay on hover */
.gallery-item:hover .image-overlay {
    opacity: 1;
}

/* Maintains your caption style */
.caption-text {
    display: block;
    text-align: center;
    margin-top: 5px;
    font-style: italic;
    color: #ccc;
}
/* Container for the text inside the lightbox */
.lightbox-caption-overlay {
    position: absolute;
    bottom: 10px; /* Distance from the bottom of the image */
    left: 50%;
    transform: translateX(-50%);
    width: 90%; /* Keeps text from hitting the very edges */
    background: rgba(0, 0, 0, 0.7); /* Black background with 70% opacity */
    color: #ffffff;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    font-family: 'serif'; /* Matches your gallery's poetic style */
    z-index: 10; /* Ensures it stays on top of the image */
}

.lightbox-caption-overlay strong {
    display: block;
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #ffd700; /* Gold color for the title to stand out */
}
.coming-soon {
    cursor: not-allowed; /* Shows a "no-go" icon instead of a hand */
    opacity: 0.6;        /* Makes it look slightly faded/inactive */
}

.coming-soon:hover::after {
    content: " (Coming Soon)";
    font-size: 0.6rem;
    vertical-align: middle;
}
/* Target PRIMATES specifically and override the topnav default */
.topnav .dropdown-content a:nth-child(3) {
    letter-spacing: 3px !important; /* Start with 4px to see a clear difference, then adjust down */
    display: block; 
}


/* Target PRIMATES specifically and override the topnav default */
.topnav .dropdown-content a:nth-child(5) {
    letter-spacing: 3px !important; /* Start with 4px to see a clear difference, then adjust down */
    display: block; 
}

/* Target MOTORCYCLES specifically and override the topnav default */
.topnav .dropdown-content a:nth-child(8) {
    letter-spacing: 3px !important; /* Start with 4px to see a clear difference, then adjust down */
    display: block; 
}

/* Target SNOWMOBILES specifically and override the topnav default */
.topnav .dropdown-content a:nth-child(9) {
    letter-spacing: 4px !important; /* Start with 4px to see a clear difference, then adjust down */
    display: block; 
}
/* Target SNOWMOBILES specifically and override the topnav default */
.topnav .dropdown-content a:nth-child(14) {
    letter-spacing: 2px !important; /* Start with 4px to see a clear difference, then adjust down */
    display: block; 
}


#footer-container {
    min-height: 250px; /* Match the approximate height of your footer */
    width: 100%;
    background-color: #000; /* Use your site's background color */
}