﻿/* ===============================================
   NEW GALLERY STYLES
   Add this to your css/style.css file at the bottom
   =============================================== */

/* ----- Gallery Container ----- */
.gallery-container-new {
    width: 100%;
    padding: 40px 0;
}

/* ----- Gallery Rows ----- */
.gallery-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gallery-row-equal {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

    .gallery-row-equal .gallery-col {
        flex: 1;
        min-width: 200px;
    }

/* ----- Gallery Columns ----- */
.gallery-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-col-large {
    flex: 2;
    min-width: 300px;
}

.gallery-col-medium {
    flex: 1;
    min-width: 250px;
}

.gallery-col-small {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ----- Gallery Card ----- */
.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    height: 100%;
    min-height: 280px;
    background: #f5f5f5;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-col-small .gallery-card {
    min-height: 200px;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(255, 47, 104, 0.3);
}

/* ----- Gallery Images ----- */
.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-card:hover img {
    transform: scale(1.1);
}

/* ----- Gallery Overlay ----- */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient( to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.8) 100% );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 25px;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

/* ----- Gallery Text ----- */
.gallery-text {
    color: white;
    text-align: center;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-text {
    transform: translateY(0);
}

.gallery-text h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

/* ----- Gallery Section Title ----- */
.gallery .w3_tittle {
    margin-bottom: 50px;
}

/* ===============================================
   RESPONSIVE DESIGN
   =============================================== */

/* ----- Large Desktop (1200px+) ----- */
@media (min-width: 1200px) {
    .gallery-card {
        min-height: 320px;
    }

    .gallery-col-small .gallery-card {
        min-height: 230px;
    }
}

/* ----- Desktop (992px to 1199px) ----- */
@media (max-width: 1199px) {
    .gallery-card {
        min-height: 280px;
    }

    .gallery-col-small .gallery-card {
        min-height: 200px;
    }
}

/* ----- Tablet (768px to 991px) ----- */
@media (max-width: 991px) {
    .gallery-container-new {
        padding: 30px 0;
    }

    .gallery-row {
        gap: 15px;
        margin-bottom: 15px;
    }

    .gallery-row-equal {
        flex-wrap: wrap;
    }

        .gallery-row-equal .gallery-col {
            flex: 1 1 calc(50% - 10px);
            min-width: 200px;
        }

    .gallery-col {
        gap: 15px;
    }

    .gallery-col-large,
    .gallery-col-medium,
    .gallery-col-small {
        flex: 1 1 calc(50% - 10px);
        min-width: 280px;
    }

    .gallery-card {
        min-height: 250px;
    }

    .gallery-col-small .gallery-card {
        min-height: 180px;
    }

    .gallery-text h4 {
        font-size: 18px;
    }
}

/* ----- Mobile Large (576px to 767px) ----- */
@media (max-width: 767px) {
    .gallery-container-new {
        padding: 25px 0;
    }

    .gallery-row {
        gap: 12px;
        margin-bottom: 12px;
    }

    .gallery-row-equal {
        gap: 12px;
    }

        .gallery-row-equal .gallery-col {
            flex: 1 1 100%;
            min-width: 100%;
        }

    .gallery-col {
        gap: 12px;
    }

    .gallery-col-large,
    .gallery-col-medium,
    .gallery-col-small {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .gallery-card {
        min-height: 220px;
        border-radius: 10px;
    }

    .gallery-col-small .gallery-card {
        min-height: 200px;
    }

    .gallery-overlay {
        padding: 20px;
    }

    .gallery-text h4 {
        font-size: 16px;
    }

    /* Show overlay by default on mobile */
    .gallery-overlay {
        opacity: 0.8;
    }

    .gallery-card:hover .gallery-overlay {
        opacity: 1;
    }
}

/* ----- Mobile Small (up to 575px) ----- */
@media (max-width: 575px) {
    .gallery-container-new {
        padding: 20px 0;
    }

    .gallery-row {
        gap: 10px;
        margin-bottom: 10px;
    }

    .gallery-row-equal {
        gap: 10px;
    }

    .gallery-col {
        gap: 10px;
    }

    .gallery-card {
        min-height: 200px;
        border-radius: 8px;
    }

    .gallery-col-small .gallery-card {
        min-height: 180px;
    }

    .gallery-overlay {
        padding: 15px;
        background: linear-gradient( to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.85) 100% );
    }

    .gallery-text h4 {
        font-size: 15px;
    }
}

/* ----- Extra Small Mobile (up to 400px) ----- */
@media (max-width: 400px) {
    .gallery-card {
        min-height: 180px;
    }

    .gallery-col-small .gallery-card {
        min-height: 160px;
    }

    .gallery-text h4 {
        font-size: 14px;
    }

    .gallery-overlay {
        padding: 12px;
    }
}

/* ===============================================
   ACCESSIBILITY & PERFORMANCE
   =============================================== */

/* ----- Focus States for Keyboard Navigation ----- */
.gallery-card:focus {
    outline: 3px solid #ff2f68;
    outline-offset: 3px;
}

    .gallery-card:focus:not(:focus-visible) {
        outline: none;
    }

/* ----- Reduced Motion for Accessibility ----- */
@media (prefers-reduced-motion: reduce) {
    .gallery-card,
    .gallery-card img,
    .gallery-overlay,
    .gallery-text {
        transition: none;
    }

        .gallery-card:hover {
            transform: none;
        }

            .gallery-card:hover img {
                transform: none;
            }

            .gallery-card:hover .gallery-text {
                transform: none;
            }
}

/* ----- Loading State (Optional) ----- */
.gallery-card.loading {
    background: linear-gradient( 90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75% );
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ----- Print Styles ----- */
@media print {
    .gallery-row {
        page-break-inside: avoid;
    }

    .gallery-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .gallery-overlay {
        display: none;
    }
}


