@charset "utf-8";

/* =============================================================================
   CARA — École de Danse
   gallery_page.css — Photo gallery page (gallerie.php)
   Depends on: blog.css (loaded first)
   ============================================================================= */

/* =============================================================================
   GALLERY PAGE — Individual event photo grid
   ============================================================================= */

/* -----------------------------------------------------------------------------
   Gallery section header
   ----------------------------------------------------------------------------- */

.gallery-title {
    margin-bottom: 48px;
}

.gallery-title h1 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 300;
    font-style: italic;
    color: var(--color-black);
    line-height: 1.1;
    margin-bottom: 8px;
}

.event-name {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-gold);
}

.event-name::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background: var(--color-gold);
    vertical-align: middle;
    margin-right: 10px;
    position: relative;
    top: -1px;
}

/* -----------------------------------------------------------------------------
   Gallery grid items
   ----------------------------------------------------------------------------- */

.gallery-item {
    height: 100%;
    overflow: hidden;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    background: var(--color-dark);
    /* Aspect ratio 4:3 */
    padding-bottom: 75%;
    height: 0;
}

.gallery-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 600ms ease, filter 400ms ease;
    filter: grayscale(10%) brightness(0.95);
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.07);
    filter: grayscale(0%) brightness(1);
}

/* Image overlay */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 15, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity 300ms ease;
    cursor: pointer;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gallery-overlay .fa {
    font-size: 1.4rem;
    color: var(--color-white);
}

.gallery-text {
    font-family: var(--font-sans);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
}

/* Thin gold border on hover */
.gallery-image::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 0px solid var(--color-gold);
    z-index: 1;
    pointer-events: none;
    transition: border-width 300ms ease, border-color 300ms ease;
}

.gallery-item:hover .gallery-image::after {
    border-width: 2px;
}

/* -----------------------------------------------------------------------------
   Modal — image lightbox
   ----------------------------------------------------------------------------- */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal[style*="display: block"],
.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Override jQuery's .show() which sets display:block */
#imageModal[style*="display: block"] {
    display: flex !important;
}

.modal-close {
    position: fixed;
    top: 24px;
    right: 32px;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    z-index: 10000;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    transition: color 200ms ease, border-color 200ms ease, background 200ms ease;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-gold);
    border-color: var(--color-gold);
    background: rgba(201, 168, 76, 0.08);
}

.modal-content {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

/* -----------------------------------------------------------------------------
   Responsive — Gallery page
   ----------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .gallery-image {
        /* Still 4:3 on tablet */
        padding-bottom: 75%;
    }
}

@media (max-width: 767px) {
    .gallery-title h1 {
        font-size: 2rem;
    }

    .gallery-title {
        margin-bottom: 32px;
    }
}

@media (max-width: 576px) {
    /* 2 columns on phone */
    .gallery-section .row > div {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .gallery-image {
        padding-bottom: 100%; /* Squarer on small screens */
    }

    .modal-content {
        max-width: 96vw;
    }
}
