/* styles.css */
:root {
  --bg: #f1f7ed;
  --text: #243e36;
  --link: #7ca982;
}

body {
    margin:0;
    padding:0;
    background-color: var(--bg);
    color: var(--text);
    font-family: "Azeret Mono", monospace;
    font-optical-sizing: auto;
    font-weight: 100;
    font-style: normal;
}

ul { 
    padding:0;
    margin:0;
}

li {
    margin:0;
    line-height: 1;
    list-style-type: none;
}
li:first-child {
    font-weight: 500;
}

a { 
    color: var(--link);
    text-decoration: none;
}
a:hover {
    opacity: .75;
}

.fake-link {
    text-decoration: underline;
    cursor: pointer;
    color: var(--link);
    text-decoration: none;
}

/* Optional: Slight opacity change on hover to mimic a real link interaction */
.fake-link:hover {
    opacity: 0.75;
}

/* 1. Mobile First (Default size for small screens) */
li { font-size: 3rem; }
/* 2. Tablet & Up (Standard breakpoint: 768px) */
@media (min-width: 768px) {
  li { font-size: 4rem; }
}
/* 3. Desktop & Up (Standard breakpoint: 1024px) */
@media (min-width: 1024px) {
    li { font-size: 7rem; }
}


/* --- Accordion Base --- */
.accordion-item {
    cursor: pointer;
    position: relative;
    /* Optional: prevent text selection if users double-tap quickly */
    user-select: none; 
}

/* The magic grid trick for smooth, snappy height animation */
.gallery-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s cubic-bezier(0, 0.7, 0.1, 1);
}

.gallery-inner {
    /* Changed from overflow: hidden to overflow-x: auto */
    overflow-x: auto; 
    overflow-y: hidden;
    display: flex;
    gap: 1rem;

    /* Adds native mobile swiping feel */
    scroll-snap-type: x mandatory; 
    
    /* Optional: Adds a tiny bit of horizontal padding so the first/last images don't touch the exact edge of the screen */
    padding: 0 20px;     
    /* Hide the ugly default scrollbar for a cleaner look */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}
/* Hide scrollbar for Chrome, Safari and Opera */
.gallery-inner::-webkit-scrollbar {
    display: none;
}

/* --- Image Gallery & Captions --- */
.image-box {
    position: relative;
    width: 300px;
    height: 225px;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0; /* Ensures images never squish, forcing the container to scroll instead */
    
    /* Tells the browser to snap perfectly to the edge of each image when swiping */
    scroll-snap-align: start; 
}
.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-box:hover img {
    transform: scale(1.05); /* Slight zoom on image hover */
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    padding: 8px;
    box-sizing: border-box;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.2s ease-out; /* Snappy caption reveal */
}

.image-box:hover .caption {
    transform: translateY(0);
    opacity: 1;
}

/* --- Triggers (Desktop Hover & Mobile Active Class) --- */

/* --- Base Caption (Mobile First: Always Visible) --- */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    padding: 8px;
    box-sizing: border-box;
    transition: all 0.2s ease-out;
    
    /* Visible by default for mobile */
    transform: translateY(0);
    opacity: 1;
}

/* --- Desktop Only (Hover to Reveal) --- */
@media (hover: hover) {
    /* Hide the caption by default on devices with a mouse */
    .caption {
        transform: translateY(100%);
        opacity: 0;
    }
    
    /* Reveal it when hovering over the image box */
    .image-box:hover .caption {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile: Open when 'active' class is applied via JS */
.accordion-item.active .gallery-wrapper {
    grid-template-rows: 1fr;
}
.accordion-item.active .gallery-inner {
    padding: 12px 0;
}