/*
 * Page-Specific Styles for the Main Gallery Page (collections/index.html)
 * and other gallery-related pages.
 */

/* ------------------- */
/* Gallery Intro       */
/* ------------------- */
.gallery-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-intro h1 {
    color: var(--color-secondary-accent);
}

/* ------------------- */
/* Filter Navigation   */
/* ------------------- */
/*
 * Styles for the navigation bar used to filter art genres.
 */
.filter-nav {
    /* Centers the navigation buttons. */
    text-align: center;
    /* Adds space below the navigation. */
    margin-bottom: 3rem;
}

/*
 * Styles for individual filter buttons.
 */
.filter-btn {
    /* Removes default button styling. */
    background: none;
    border: 2px solid var(--color-text);
    /* Sets the color of the button text. */
    color: var(--color-text);
    /* Sets padding for a larger clickable area. */
    padding: 0.5rem 1.2rem;
    /* Adds space between buttons. */
    margin: 0 0.5rem;
    /* Sets the font to the heading font for a stylistic choice. */
    font-family: var(--font-headings);
    font-size: 1rem;
    /* Uppercase text for style. */
    text-transform: uppercase;
    /* Enables smooth transitions for hover effects. */
    transition: all 0.3s ease;
    /* Sets the cursor to a pointer on hover. */
    cursor: pointer;
}

/*
 * Hover and focus styles for filter buttons.
 */
.filter-btn:hover,
.filter-btn:focus {
    /* Changes the background and text color on hover. */
    background-color: var(--color-primary-accent);
    border-color: var(--color-primary-accent);
    color: var(--color-text);
    /* Removes the default focus outline. */
    outline: none;
}

/*
 * Styles for the currently active filter button.
 */
.filter-btn.active {
    background-color: var(--color-text);
    color: var(--color-background);
    border-color: var(--color-text);
}

/* ------------------- */
/* Series Grid         */
/* ------------------- */
/*
 * The grid container for the different art series.
 */
.series-grid {
    /* Uses CSS Grid for a responsive layout. */
    display: grid;
    /* Creates columns that are at least 300px wide, but will expand to fill space. */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Sets the gap between grid items. */
    gap: 2rem;
}

/*
 * Styles for each individual series card in the grid.
 */
.series-card {
    /* Removes the default underline from the link. */
    text-decoration: none;
    /* Sets the position to relative to allow absolute positioning of the title overlay. */
    position: relative;
    /* Hides any content that overflows the card's boundaries (like the image). */
    overflow: hidden;
    /* Adds a border and rounded corners. */
    border: 3px solid var(--color-text);
    border-radius: 8px;
    /* Displays the card as a block-level element. */
    display: block;
    /* A subtle shadow to lift the card off the page. */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    /* Smooth transition for the hover effect. */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/*
 * Hover effect for the series card.
 */
.series-card:hover {
    /* Lifts the card up slightly on hover. */
    transform: translateY(-5px);
    /* Increases the shadow to enhance the lifting effect. */
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
}

/*
 * Styles for the image within the series card.
 */
.series-card img {
    /* Ensures the image fills the entire card. */
    width: 100%;
    height: 100%;
    /* Scales the image to cover the container, cropping if necessary. */
    object-fit: cover;
    /* Vertically aligns the image. */
    vertical-align: middle;
    /* A smooth transition for the zoom effect on hover. */
    transition: transform 0.4s ease;
}

/*
 * Zoom effect for the image on card hover.
 */
.series-card:hover img {
    /* Scales the image up slightly to create a zoom effect. */
    transform: scale(1.05);
}

/*
 * The container for the title and genre text, overlaid on the image.
 */
.series-title {
    /* Positions the title at the bottom of the card. */
    position: absolute;
    bottom: 0;
    left: 0;
    /* Spans the full width of the card. */
    width: 100%;
    /* Adds padding inside the title block. */
    padding: 1rem;
    /* A semi-transparent background to ensure text is readable over the image. */
    background: rgba(44, 39, 42, 0.8); /* Semi-transparent version of --color-text */
    /* Text color that contrasts with the background. */
    color: #fff;
    /* Centers the text. */
    text-align: center;
    /* Smooth transition for the hover effect. */
    transition: background 0.3s ease;
}

.series-card:hover .series-title {
    background: var(--color-primary-accent);
    color: var(--color-text);
}

/*
 * Styles for the main heading (series name) in the title block.
 */
.series-title h3 {
    /* Removes the default margin. */
    margin: 0;
    /* Uses the heading font. */
    font-family: var(--font-headings);
    font-size: 1.5rem;
}

/*
 * Styles for the paragraph (genre) in the title block.
 */
.series-title p {
    /* Removes the default margin. */
    margin: 0;
    /* Uppercase text for style. */
    text-transform: uppercase;
    font-size: 0.9rem;
    opacity: 0.8;
}

/*
 * A class to apply when an item is filtered out.
 * This will be toggled by JavaScript.
 */
.series-card.fade-out {
    /* Hides the card. */
    display: none;
}
