.gallery-page {
    padding: 40px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.section-header p {
    color: #777;
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 60px 0;
    color: #777;
}

/* GRID */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

/* CARD */
.gallery-card {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
}

.gallery-img img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    transition: 0.3s ease;
}

.gallery-card:hover img {
    transform: scale(1.08);
}

/* Overlay Hover */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 35%;
    background: linear-gradient(transparent, rgba(0,0,0,.9));
    color: #fff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: .9;
}

.gallery-overlay h3 {
    font-size: 16px;
    margin: 0;
}

.gallery-overlay span {
    font-size: 12px;
    opacity: .8;
}

/* PREVIEW MODAL */
.preview-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 70px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.9);
}

.preview-content {
    margin: auto;
    display: block;
    max-width: 85%;
    max-height: 80vh;
    border-radius: 10px;
}

.close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
}

.preview-caption {
    text-align: center;
    color: white;
    margin-top: 15px;
}

.preview-caption h3 {
    margin-bottom: 5px;
}

@media (max-width: 600px){
    .preview-content{
        width: 95%;
    }
}


/* SEARCH BAR */
.gallery-search{
    text-align:center;
    margin-bottom:25px;
}
.gallery-search input{
    width:260px;
    padding:8px 12px;
    border-radius:8px;
    border:1px solid #ccc;
}
.gallery-search button{
    padding:9px 14px;
    border:none;
    border-radius:8px;
    background:#0a3d62;
    color:white;
    cursor:pointer;
}
.gallery-search button:hover{
    background:#1e90ff;
}

/* PAGINATION */
.gallery-pagination{
    margin:30px 0;
    text-align:center;
}

.gallery-pagination .page-btn,
.gallery-pagination .page-number{
    display:inline-block;
    padding:8px 12px;
    margin:3px;
    border-radius:6px;
    border:1px solid #ccc;
    text-decoration:none;
    color:#333;
}

.gallery-pagination .active{
    background:#0a3d62;
    color:white;
    border-color:#0a3d62;
}

.gallery-pagination .page-btn:hover,
.gallery-pagination .page-number:hover{
    background:#1e90ff;
    color:white;
    border-color:#1e90ff;
}
