/* ============================================================
   NORTON COLORADO — GALLERIES
   COMPLETE ORGANIZED DROP-IN CSS (FINAL)
============================================================ */


/* ============================================================
   SECTION TITLES (INDEX PAGE)
============================================================ */
.gallery-section-title {
    font-size: 26px;
    font-weight: 600;
    margin: 40px 0 20px 0;
    border-bottom: 2px solid #ddd;
    padding-bottom: 8px;
}


/* ============================================================
   INDEX PAGE — TILE GRID
============================================================ */
.gallery-index-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* Tile container */
.gallery-tile {
    display: block;
    background: #ffffff;
    padding: 14px;
    border: 1px solid #e1e1e1;
    text-decoration: none;
    color: inherit;
}

/* Thumbnail wrapper */
.gallery-thumb {
    width: 100%;
    height: 220px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #ddd;
}

/* Thumbnail image */
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    filter: contrast(0.92) brightness(0.98);
}

/* Hover brighten */
.gallery-thumb:hover img {
    filter: contrast(1.05) brightness(1.05);
}

/* Index tile text */
.gallery-meta h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}



/* ============================================================
   CATEGORY PAGE — BACK BUTTON
============================================================ */
.back-button {
    display: inline-block;
    padding: 8px 14px;
    background: #eee;
    border-radius: 6px;
    text-decoration: none;
    color: #000;
    margin-bottom: 25px;
    font-size: 14px;
}

.back-button:hover {
    background: #ddd;
}



/* ============================================================
   CATEGORY PAGE — HEADER (Title + Sort Dropdown)
============================================================ */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.category-header h1 {
    margin: 0;
    font-size: 32px;
}

/* Sort dropdown */
.sort-form select {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #bbb;
    background: #fff;
    border-radius: 6px;
}



/* ============================================================
   CATEGORY PAGE — PHOTO GRID
============================================================ */
.gallery-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Category tile (same as index tiles) */
.gallery-photo {
    background: #ffffff;
    padding: 14px;
    border: 1px solid #e1e1e1;
}

/* Category images (same crop as index thumbs) */
.gallery-photo img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top;
    display: block;
    filter: contrast(0.92) brightness(0.98);
}

/* Hover brighten */
.gallery-photo:hover img {
    filter: contrast(1.05) brightness(1.05);
}



/* ============================================================
   LIGHTBOX — OVERLAY + IMAGE + CAPTION
============================================================ */
#lightbox-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    z-index: 99999;
}

#lightbox-overlay.show {
    display: flex;
}

#lightbox-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    position: relative;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
}

#lightbox-caption {
    color: #fff;
    font-size: 16px;
    margin-top: 12px;
}



/* ============================================================
   LIGHTBOX — BUTTONS (Improved visibility + FIXED hover jump)
============================================================ */
#lightbox-close,
#lightbox-prev,
#lightbox-next {
    position: absolute;
    z-index: 100000;
    background: rgba(0,0,0,0.75);
    color: #fff;
    border: none;
    font-size: 40px;
    padding: 14px 20px;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s, transform 0.15s ease-out;
    box-shadow: 0 0 12px rgba(0,0,0,0.5);
}

/* CLOSE (X) — top right */
#lightbox-close {
    top: 20px;
    right: 20px;
}

#lightbox-close:hover {
    background: rgba(255,255,255,0.9);
    color: #000;
    transform: scale(1.12);
}

/* PREV ARROW — left */
#lightbox-prev {
    top: 50%;
    left: -60px;
    transform: translateY(-50%);
}

#lightbox-prev:hover {
    background: rgba(255,255,255,0.9);
    color: #000;
    transform: translateY(-50%) scale(1.12); /* FIXED */
}

/* NEXT ARROW — right */
#lightbox-next {
    top: 50%;
    right: -60px;
    transform: translateY(-50%);
}

#lightbox-next:hover {
    background: rgba(255,255,255,0.9);
    color: #000;
    transform: translateY(-50%) scale(1.12); /* FIXED */
}



/* ============================================================
   MEDIA QUERIES — TABLET & MOBILE
============================================================ */

/* Tablet */
@media (max-width: 991px) {
	
	  /* ======================================
   LIGHTBOX — MOBILE SCALING FIX
====================================== */
@media (max-width: 991px) {

    /* Standardized button sizing */
    #lightbox-prev,
    #lightbox-next,
    #lightbox-close {
        width: 34px;
        height: 34px;
        line-height: 34px;
        font-size: 18px;      /* Icon scale */
        transform: none !important; /* REMOVE old scaling */
        padding: 0;
        text-align: center;
    }

    /* Slightly smaller close button if desired */
    #lightbox-close {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 16px;
    }

    .gallery-index-grid,
    .gallery-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #lightbox-prev {
        left: 10px;
    }

    #lightbox-next {
        right: 10px;
    }

    #lightbox-close {
        top: 15px;
        right: 15px;
    }

    .category-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .sort-form {
        margin-top: 10px;
    }
}

/* Mobile */
@media (max-width: 600px) {

    .gallery-index-grid,
    .gallery-category-grid {
        grid-template-columns: 1fr;
    }

.gallery-thumb,
.gallery-photo img {
    height: 300px;   /* Increased visual impact */
}


    .category-header h1 {
        font-size: 24px;
    }

    #lightbox-prev {
        left: 5px;
    }

    #lightbox-next {
        right: 5px;
    }
}
