/* Main Styles */

/* Global Styles */
body {
    background-color: #ffffff;
    color: #333;
    overflow-x: hidden;
    max-width: 1450px;
    margin: 0 auto;
}

/* Header Styles */
#site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 50px;
    background-color: #fff ;
    border-bottom: 0px solid #e0e0e0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

#site-header.header-hidden {
    transform: translateY(-100%);
}

#site-header-series {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 50px;
    background-color: #fff 0;
    border-bottom: 0px solid #e0e0e0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

#site-header-series.header-hidden {
    transform: translateY(-100%);
}

.logo {
    font-size: 40px;
    font-weight: bold;
}

.logo img {
    height: 55px; /* Adjust as needed */
    width: auto;
  }

.left-section {
    display: flex;
    align-items: center;
    justify-content: flex-start;  /* ensure everything hugs the left */
    flex-shrink: 0;
}

.left-section ul {
    display: flex;
    gap: 20px;
    padding: 0px 45px 0px;
}

.left-section li {
    font-size: 20px;
    color: #999;
}

.left-section li:hover a {
    font-weight: bold;
}

.left-section li.current a {
    color: #333;
    font-weight: bold;
    text-decoration: line-through;
}

/* Right Section Header*/
.right-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
}

.right-section button {
    padding: 4px 40px 0px;
    background-color: #ffffff;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Header Buttons */
.icon-btn {
    background: none;
    border: none;
    padding: 0px;
    cursor: pointer;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
  
.icon-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    transition: opacity 0.3s ease;
}
  
.icon-btn:hover img {
    opacity: 0.7;
}

/* Main Content */
main {
    margin-top: 0px; /* Account for fixed header */
    padding: 0 0px;
    overflow-x: hidden;
}

/* Photo Grid */
.photo-grid {
    display: flex;
    flex-direction: column;
    margin-top: 120px;
    margin-bottom: 15px;
    gap: 20px; /* Gap between rows */
}

.row {
    display: flex;
    width: 100%;
    gap: 20px; /* Gap between photos in a row */
}

.photo {
    height: 100%;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
}

.photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.photo img:hover {
    opacity: 0.9;
}

/* Modal for full image view */
.modal {
    display: flex; /* Change from 'none' to 'flex' */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0); /* Start with transparent background */
    overflow: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease, background-color 0.5s ease; /* Smooth transition */
}

.modal.show {
    opacity: 1;
    pointer-events: auto; /* Allow interaction when visible */
    background-color: rgba(255, 255, 255, 1);
}

/* Add transition for the modal content */
.modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0; /* Start invisible */
    transition: opacity 0.5s ease; /* Fade in transition */
}

.modal.show .modal-content {
    opacity: 1;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
}

.modal-content.changing {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #000000;
    font-size: 45px;
    font-weight: normal;
    cursor: pointer;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #000;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2010;
    padding: 10px;
    border-radius: 50%;
    user-select: none;
}

.modal-nav.left {
    left: 30px;
}

.modal-nav.right {
    right: 30px;
}

/* Fullscreen Button */
.fullscreen-btn {
    position: absolute;
    top: 65px;
    right: 32px;
    font-size: 50px;
    color: #000;
    cursor: pointer;
    z-index: 2010;
    user-select: none;
}

.fullscreen-btn.icon-fade img {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#fullscreen-icon {
    width: 24px;
    height: 24px;
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.icon-fade {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}
#fullscreen-icon {
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
}

/* Series Page Styles - Add this to styles.css */

.series-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
}

.series-title {
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
}

.series-container {
    width: 100%;
    max-width: 1200px;
    height: 70vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.series-image {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.series-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.nav-arrow:hover {
    background-color: rgba(255, 255, 255, 1);
}

.prev-arrow {
    left: 20px;
}

.next-arrow {
    right: 20px;
}

.image-counter {
    margin-top: 20px;
    font-size: 14px;
    color: #666;
}

/* Responsive adjustments for series page */
@media screen and (max-width: 900px) {
    .series-container {
        height: 60vh;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
    }
}

@media screen and (max-width: 600px) {
    .series-container {
        height: 50vh;
    }
    
    .nav-arrow {
        width: 35px;
        height: 35px;
    }
    
    .prev-arrow {
        left: 10px;
    }
    
    .next-arrow {
        right: 10px;
    }
}

/* Contact Page Styles - Add this to styles.css */

.contact-content {
    max-width: 900px;
    margin: 80px auto 0;
    padding: 40px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
}

.contact-info, .about-section {
    flex: 1;
    min-width: 300px;
}

.contact-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.contact-item {
    margin-bottom: 30px;
}

.contact-item h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 16px;
    color: #666;
}

.contact-item a:hover {
    border-bottom: 1px solid #666;
}

.divider {
    height: 1px;
    background-color: #e0e0e0;
    margin-bottom: 20px;
}

.about-section p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: #666;
}

.series-navigation {
    display: flex;
    justify-content: space-between;
    padding: 12px 60px 40px;
    margin-top: 25px;
    margin-bottom: 0px;
    border-top: 0px solid #000000;
}

.series-navigation a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: color 0.3s ease;
    font-weight: bold;
}

.series-navigation a:hover {
    color: #888;
}

.series-nav-title {
    font-size: 20px;
}

.series-nav-arrow {
    font-size: 35px; /* Base font size */
    line-height: 32px; /* Taller height */
    transform: scaleX(0.6); /* Make arrow thinner horizontally */
    display: inline-block; /* Needed for transform to work properly */
}

.prev-series .series-nav-arrow {
    margin-right: 30px;
}

.next-series .series-nav-arrow {
    margin-left: 30px;
}

@media screen and (max-width: 640px) {
    .series-navigation {
        padding: 20px 15px 40px;
    }
    
    .series-nav-title {
        font-size: 16px;
    }

    .series-nav-arrow {
        font-size: 28px;
        line-height: 20px;
    }
}

/* Responsive adjustments for contact page */
@media screen and (max-width: 600px) {
    .contact-content {
        margin-top: 60px;
        padding: 30px 15px;
        gap: 40px;
    }
    
    .contact-content h2 {
        font-size: 24px;
    }
}

/* --- Fluid Layout Constraints --- */
:root {
    --header-h: 110px;
    --img-height: 75vh; /* Image takes 75% of screen height */
    --img-width: 55vw;  /* Image takes 55% of screen width */
    --left-margin: 5vw;
    --right-margin: 15vw;
}

.slider-container {
    margin-top: 110px;
    width: 100vw;
    height: calc(85vh - 15px);
    position: relative;
    overflow: hidden;
    align-items: center;
}

.slider-wrapper {
    display: flex;
    height: 100%;
}

.slide {
    min-width: 100vw;
    height: 100%;
    display: flex;
    align-items: flex-start; /* Touches the top */
}

.slide-layout {
    display: flex;
    padding-left: var(--left-margin);
    padding-right: var(--right-margin);
    gap: 1.5vw; /* Gap scales with screen width */
    height: auto;
}

/* --- Image & Barcode (Fluid) --- */
.image-column {
    max-width: 2200px;
    display: flex;
    flex-direction: column;
    width: 83vw;
    flex-shrink: 0;
    overflow: hidden;
    height: 100vh;
}

.image-container {
    height: var(--img-height);
    width: 100%;
    overflow: hidden;
    background: #f9f9f9;
    margin-top: 0px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* The "Zoom" effect */
}

.barcode-footer {
    width: 100%;
    height: 30px;
    margin-top: 1vh;
    display: flex;
    justify-content: flex-start;
    align-items: var(--right-margin);
    color: #333;

    /* Fluid Font: Shrinks/Grows between 10px and 24px */
    font-size: clamp(10px, var(--left-margin), 300px); 
    font-family: 'Libre Barcode 128'; /* Replace with your Barcode font */
    text-transform: uppercase;
    letter-spacing: 0;
}

.barcode-footer img {
    height: 100%;  /* Fill the 30px height */
    width: auto;   /* Maintain aspect ratio */
    object-fit: contain;  /* Don't stretch */
}

/* --- Vertical Typography (Riding the side) --- */
.text-column {
    display: flex;
    flex-direction: row;
    gap: 1vw;
    height: var(--img-height); /* Matches image height exactly */
    align-items: flex-end;
    margin-top: 0px;
}

.vertical-title {
    display: flex;
    flex-direction: column-reverse;
    justify-content: space-between; /* Perfect vertical kerning */
    height: 50%;
    /* Fluid Font: Scales based on screen height */
    font-size: clamp(25px, 4vh, 600px); 
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1;
}

.vertical-subtitle {
    display: flex;
    flex-direction: column-reverse;
    justify-content: flex-start;
    gap: 0px;
    height: 100%;
    font-size: clamp(9px, 1.5vh, 16px);
    font-weight: 400;
    color: #575757;
}

/* Sets characters upright while container stacks them vertically */
.char {
    display: inline-block;
    text-align: center;
    /* Optional: if characters look squashed, adjust width */
    width: 1em; 
    transform: rotate(-90deg);
}

/* --- Navigation --- */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    font-size: 5vw;
    color: #333;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.nav-btn:hover { opacity: 1; }
.prev { left: 1.5vw; }
.next { right: 1.5vw; }

/* 1. By default, hide the mobile layout */
.mobile-layout {
    display: none;
}

/* 2. When the screen is 640px or narrower... */
@media screen and (max-width: 640px) {
    
    /* Hide the desktop slider entirely */
    .desktop-slider {
        display: none !important;
    }

    /* Show the mobile layout */
    .mobile-layout {
        display: block; /* or 'flex' / 'grid' depending on your design */
    }
    
    /* Ensure the body can scroll vertically again if your mobile is a list */
    html, body {
        overflow-y: auto;
        overflow-x: hidden;
    }
}

/* This ONLY runs on the Series page */
body.series-page {
    max-width: 100vw;
    overflow-x: hidden;
    /* Prevents the 'bounce' effect on mobile browsers */
    position: relative;
}

body.series-page .slider-container {
    width: 100vw;
    overflow: hidden;
    /* Stops horizontal swiping/gestures on touch devices */
    touch-action: pan-y; 
}

/* 1. DESKTOP: Ban scrolling (Greater than 640px) */
@media screen and (min-width: 641px) {
    body.series-page {
        overflow: hidden; /* Locks both horizontal and vertical */
        height: 100vh;    /* Ensures the page doesn't try to be taller than the screen */
    }
}

/* 2. MOBILE: Allow vertical scrolling (640px and below) */
@media screen and (max-width: 640px) {
    body.series-page {
        overflow-y: auto;   /* Allows normal up/down scrolling */
        overflow-x: hidden; /* Still bans side-to-side wobbling */
        height: auto;       /* Let the page grow as long as the content needs */
    }

    /* If your mobile layout is inside the slider-container, 
       we need to make sure the container doesn't chop it off */
    .slider-container {
        height: auto; 
        overflow: visible; 
    }
}