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

html {
    overflow-x: hidden; /* prevent horizontal scroll */
    overflow-y: auto;   /* allow vertical scroll */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #ffffff;
    color: #000000;
    min-height: 100vh;
    line-height: 0;
    margin: 0;
    padding: 30px;
    padding-bottom: 120px; /* Add extra padding at the bottom for footer */
    position: relative;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Hide main page scrollbar for Chrome, Safari and Opera */
body::-webkit-scrollbar {
    display: none;
}

/* Gear Link */
.gear-link {
    font-family: 'Unbounded', sans-serif;
    color: #000;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    border: 1px solid #000;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.gear-link:hover {
    background-color: #000;
    color: #fff;
}

/* Header/Logo */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px 0 0; /* Match gallery's right padding */
    position: relative;
    z-index: 10;
    background: transparent;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    max-width: 120px;
    height: auto;
    position: relative;
    margin: 0;
    padding: 0;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    position: relative;
}

.header-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.gear-container {
    position: relative;
    display: inline-flex;
    cursor: pointer;
    min-width: 120px; /* Ensure enough width for the gear text */
    justify-content: flex-end;
}

.gear-text {
    position: relative;
    transition: all 0.3s ease;
    display: inline-block;
    white-space: nowrap;
    padding-left: 10px;
    opacity: 1;
    cursor: pointer;
}

.gear-list {
    position: absolute;
    right: 0;
    top: 0;
    display: flex;
    gap: 15px;
    transform: translateX(10px);
    transition: all 0.3s ease;
    white-space: nowrap;
    background: white;
    padding-left: 10px;
    opacity: 0;
    pointer-events: none;
    padding-right: 10px;
}

.gear-container:hover .gear-list {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.gear-item {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.7rem;
    color: #000000;
    line-height: 1;
}

.email, .gear-text {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.7rem;
    color: #000000;
    white-space: nowrap;
    margin: 0;
    text-align: right;
    line-height: 1;
}

.logo img {
    padding: 0 0 20px 0;
    margin: 0;
    width: 200%;
    height: auto;
    display: block;
}

/* Screen reader only - hides element visually but keeps it accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
    clip-path: inset(50%);
}

/* Gallery Container */
.gallery-container {
    width: 100%;
    margin: 0;
    padding: 0;
    height: 40vh;
    min-height: 300px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    white-space: nowrap;
    font-size: 0;
    line-height: 0;
    letter-spacing: -4px;
}

.gallery-container .gallery-items-wrapper {
    display: inline-block;
    height: 100%;
    margin: 0;
    padding: 0;
    white-space: nowrap;
    font-size: 0;
    line-height: 0;
    letter-spacing: -4px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.gallery-container::-webkit-scrollbar {
    display: none;
}

.gallery-second {
    margin-top: 1rem; /* Reduced gap between galleries */
}

/* Third gallery spacing */
.gallery-third {
    margin-top: 1rem;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.gallery-container::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    display: inline-block;
    width: auto;
    height: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
    vertical-align: top;
    letter-spacing: 0;
    word-spacing: 0;
    transition: transform 180ms ease, opacity 180ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.image-frame {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    display: block;
    line-height: 0;
    font-size: 0;
    cursor: pointer;
    position: relative;
    background: #fff;
}

.image-frame:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

.image-frame img {
    height: 100%;
    width: auto;
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    line-height: 0;
    font-size: 0;
    object-fit: cover;
    position: relative;
}

/* Enlarged image styles */
.image-frame.enlarged {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    cursor: pointer;
}

.image-frame.enlarged img {
    max-height: 90vh;
    max-width: 90vw;
    object-fit: contain;
}

.image-frame video {
    border-radius: 0;
    display: block;
    object-fit: cover;
    pointer-events: auto;
}

.image-frame video.landscape {
    width: auto;
    height: 30vh; /* Match container height */
}

.image-frame video.portrait {
    width: auto;
    height: 30vh; /* Match container height */
}

/* =========================
   Video page grid layout
   ========================= */
body[data-gallery="video"] .gallery-container {
    height: auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: visible;
    white-space: normal;
}

body[data-gallery="video"] .gallery-container .gallery-items-wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    height: auto;
}

body[data-gallery="video"] .gallery-item {
    width: 100%;
    height: auto;
}

body[data-gallery="video"] .image-frame {
    aspect-ratio: 16 / 9;
    background: #000;
}

body[data-gallery="video"] .image-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 900px) {
    body[data-gallery="video"] .gallery-container .gallery-items-wrapper {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    body[data-gallery="video"] .gallery-container .gallery-items-wrapper {
        grid-template-columns: 1fr;
    }
}

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

    .gallery-container {
        padding: 1rem;
        gap: 1rem;
    }

    .gallery-item {
        min-width: 100%;
        max-width: 100%;
    }

    .image-frame {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        flex-direction: column;
        align-items: center;
    }

    .gallery-item {
        width: 100%;
    }
}

/* Header normalization across pages */
.header .logo img {
    height: 80px;
    width: auto;
}

.header .email,
.header .gear-link {
    font-size: 0.8rem;
}

/* Generic page content wrapper (used by gear.html) */
.page-content {
    max-width: 900px;
    margin: 10px auto 120px;
    line-height: 1.6;
}

.page-content h2 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1.2rem;
    margin: 10px 0 20px;
}

.page-content h3 {
    font-family: 'Unbounded', sans-serif;
    font-size: 1rem;
    margin: 24px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #eee;
}

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


.page-content ul {
    margin: 12px auto 24px;
    padding-left: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    justify-content: center;
}

.page-content li {
    position: relative;
    margin: 0; /* handled by grid gap */
    padding: 10px 12px 10px 36px;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.page-content li::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #000;
    border-radius: 50%;
}

.page-content li:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

@media (max-width: 640px) {
    .page-content ul {
        grid-template-columns: 1fr;
    }
}


/* Brands strip */
.brands {
    margin: 20px;
    margin-bottom: 100px; /* ensure clear of fixed footer */
}

.brands-title {
    font-family: 'Unbounded', sans-serif;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-align: center;
}

.brands-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px 24px;
}

.brands-logos img {
    height: 36px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.9;
    transition: filter 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

.brands-logos img:hover {
    filter: none;
    opacity: 1;
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .brands-logos img {
        height: 28px;
    }
}

/* =========================
   Immersive Lightbox Styles
   ========================= */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999; /* above footer */
    display: grid;
    grid-template-areas: 'stage';
    align-items: center;
    justify-items: center;
    opacity: 0;
    transition: opacity 180ms ease;
}

.lightbox-overlay.open { opacity: 1; }
.lightbox-overlay.closing { opacity: 0; }

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: opacity 180ms ease;
}

.lightbox-stage {
    grid-area: stage;
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: grid;
    place-items: center;
    transform-origin: center center;
}

.lightbox-stage.loading::after {
    content: '';
    position: absolute;
    width: 28px; height: 28px;
    border: 3px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lb-spin 900ms linear infinite;
}

@keyframes lb-spin {
    to { transform: rotate(360deg); }
}

.lightbox-image {
    max-width: 92vw;
    max-height: 92vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transform: scale(0.97);
    transition: transform 180ms ease;
}

.lightbox-image.enter { transform: scale(1); }
.lightbox-stage.zoom .lightbox-image {
    transform: scale(1.5);
    cursor: zoom-out;
}

/* White brand bar overlay at bottom of lightbox */
.lightbox-brandbar {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    height: auto;
    padding: 0;
    gap: 0;
    border-radius: 0;
    box-shadow: none;
    pointer-events: none; /* let clicks go to the image/lightbox */
}

.lightbox-brandbar img {
    /* Keep similar visual size */
    width: 12%;
    max-width: 220px;
    height: auto;
    display: block;
}

@media (max-width: 600px) {
    .lightbox-brandbar { bottom: 10px; }
    .lightbox-brandbar img { width: 18%; max-width: 180px; }
}

.lightbox-nav,
.lightbox-close {
    position: absolute;
    top: 16px;
    background: rgba(255,255,255,0.9);
    color: #000;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: transform 120ms ease, background 120ms ease;
}

.lightbox-close { right: 16px; }
.lightbox-left { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-right { right: 16px; top: 50%; transform: translateY(-50%); }

.lightbox-nav:hover,
.lightbox-close:hover { transform: scale(1.05); background: #fff; }

@media (max-width: 600px) {
    .lightbox-image { max-width: 94vw; max-height: 86vh; }
    .lightbox-left, .lightbox-right { top: auto; bottom: 16px; transform: none; }
    .lightbox-left { left: 16px; }
    .lightbox-right { right: 16px; }
}

/* =========================
   Mobile-friendly overrides
   ========================= */
@media (max-width: 640px) {
    body {
        line-height: 1.4; /* readable text on mobile */
        padding: 16px;
        padding-bottom: 140px; /* clear fixed footer */
    }

    .header {
        align-items: center;
        gap: 10px;
    }

    .header .logo img {
        height: 60px;
    }

    .header-buttons {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end;
    }

    .gear-link {
        padding: 10px 12px; /* larger tap target */
        font-size: 0.75rem;
    }

    .page-content {
        margin: 6px auto 140px; /* ensure space above fixed footer */
    }
}
