/* ===============================
   GALLERY PORTFOLIO SECTION - SPORTS CLUB ENHANCED VERSION
   =============================== */

/* ===== MAIN SECTION STYLING ===== */
.elementor-section.elementor-element-b8bbfb8 {
    background-color: #202020 !important; /* Dark gray background */
    background-image: none !important;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* Add dynamic geometric pattern overlay */
.elementor-section.elementor-element-b8bbfb8::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(93, 214, 44, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(51, 116, 24, 0.06) 0%, transparent 50%);
    background-size: 300px 300px;
    animation: pattern-shift 25s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 1;
}

/* Add subtle hexagon grid */
.elementor-section.elementor-element-b8bbfb8::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, rgba(93, 214, 44, 0.02) 1px, transparent 1px),
        linear-gradient(150deg, rgba(93, 214, 44, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(93, 214, 44, 0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    animation: grid-glow 12s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* ===== PORTFOLIO CONTAINER ===== */
.elementor-element-7133df7 .container {
    position: relative;
    z-index: 2;
}

/* Add section title (if needed in future) */
.gallery-section-title {
    text-align: center;
    margin-bottom: 60px;
}

.gallery-section-title h2 {
    color: #f8f8f8;
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.gallery-section-title .sub-title {
    color: #5DD62C;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* ===== PORTFOLIO GRID STYLING ===== */
.row.gy-4 {
    gap: 30px 20px !important;
}

/* ===== PORTFOLIO THUMBNAIL CONTAINER ===== */
.portfolio-thumb {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 15, 15, 0.8) 0%, rgba(32, 32, 32, 0.8) 100%);
    border: 2px solid rgba(93, 214, 44, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    transition: all 0.4s ease;
    cursor: pointer;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Add corner accents to portfolio items */
.portfolio-thumb::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    width: 30px;
    height: 30px;
    border-top: 3px solid #5DD62C;
    border-left: 3px solid #5DD62C;
    z-index: 3;
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-thumb::after {
    content: '';
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    border-bottom: 3px solid #337418;
    border-right: 3px solid #337418;
    z-index: 3;
    opacity: 0;
    transition: all 0.3s ease;
}

/* ===== PORTFOLIO HOVER EFFECTS ===== */
.portfolio-thumb:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: #5DD62C;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(93, 214, 44, 0.3);
}

.portfolio-thumb:hover::before,
.portfolio-thumb:hover::after {
    opacity: 1;
}

/* ===== PORTFOLIO IMAGES ===== */
.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
    transition: all 0.4s ease;
    filter: brightness(0.9) contrast(1.1);
}

.portfolio-thumb:hover img {
    transform: scale(1.05);
    filter: brightness(1.1) contrast(1.2);
}

/* ===== PORTFOLIO OVERLAY ===== */
.portfolio-thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg, 
        rgba(93, 214, 44, 0.15) 0%, 
        rgba(51, 116, 24, 0.25) 50%,
        rgba(15, 15, 15, 0.4) 100%
    );
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
    border-radius: 18px;
}

.portfolio-thumb:hover::before {
    opacity: 1;
}

/* ===== VIEW ICON BUTTON ===== */
.popup-image.icon-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #5DD62C, #337418);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(93, 214, 44, 0.4);
    text-decoration: none;
}

.popup-image.icon-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: scale(0);
    transition: all 0.3s ease;
}

.portfolio-thumb:hover .popup-image.icon-btn {
    transform: translate(-50%, -50%) scale(1);
}

.popup-image.icon-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 15px 40px rgba(93, 214, 44, 0.6);
    background: linear-gradient(135deg, #337418, #5DD62C);
}

.popup-image.icon-btn:hover::before {
    transform: scale(1);
}

.popup-image.icon-btn i {
    color: #f8f8f8;
    font-size: 20px;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.popup-image.icon-btn:hover i {
    transform: scale(1.1);
}

/* ===== PORTFOLIO CATEGORIES (for future enhancement) ===== */
.portfolio-thumb[data-category]::after {
    content: attr(data-category);
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(93, 214, 44, 0.9);
    color: #0f0f0f;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.portfolio-thumb:hover[data-category]::after {
    opacity: 1;
    transform: translateY(0);
}

/* ===== LOADING ANIMATION ===== */
.portfolio-thumb img {
    opacity: 0;
    animation: fadeInImage 1s ease-out forwards;
}

.portfolio-thumb:nth-child(1) img { animation-delay: 0.1s; }
.portfolio-thumb:nth-child(2) img { animation-delay: 0.2s; }
.portfolio-thumb:nth-child(3) img { animation-delay: 0.3s; }
.portfolio-thumb:nth-child(4) img { animation-delay: 0.4s; }

/* ===== ANIMATIONS ===== */
@keyframes pattern-shift {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(30px) translateY(-20px); }
}

@keyframes grid-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    }
    50% { 
        box-shadow: 
            0 15px 35px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(93, 214, 44, 0.2);
    }
}

/* Apply subtle glow animation */
.portfolio-thumb {
    animation: pulse-glow 8s ease-in-out infinite;
}

/* ===== SECTION ENTRANCE ANIMATION ===== */
.elementor-element-b8bbfb8.elementor-invisible {
    animation: slideUpSection 1s ease-out forwards;
}

/* @keyframes slideUpSection {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} */

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .elementor-section.elementor-element-b8bbfb8 {
        padding: 80px 0;
    }
    
    .row.gy-4 {
        gap: 25px 15px !important;
    }
    
    .popup-image.icon-btn {
        width: 50px;
        height: 50px;
    }
    
    .popup-image.icon-btn i {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .elementor-section.elementor-element-b8bbfb8 {
        padding: 60px 0;
    }
    
    .row.gy-4 {
        gap: 20px 10px !important;
        margin: 0 10px;
    }
    
    .portfolio-thumb {
        border-radius: 15px;
        aspect-ratio: 1.2;
    }
    
    .portfolio-thumb img {
        border-radius: 13px;
    }
    
    .popup-image.icon-btn {
        width: 45px;
        height: 45px;
    }
    
    .popup-image.icon-btn i {
        font-size: 16px;
    }
    
    .portfolio-thumb::before,
    .portfolio-thumb::after {
        width: 20px;
        height: 20px;
    }
    
    .portfolio-thumb::before {
        top: 10px;
        left: 10px;
    }
    
    .portfolio-thumb::after {
        bottom: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .row.gy-4 {
        gap: 15px 5px !important;
    }
    
    .portfolio-thumb {
        border-radius: 12px;
    }
    
    .portfolio-thumb img {
        border-radius: 10px;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.portfolio-thumb,
.portfolio-thumb img,
.popup-image.icon-btn {
    will-change: transform;
}

/* Reduce animations for accessibility */
@media (prefers-reduced-motion: reduce) {
    .portfolio-thumb,
    .portfolio-thumb img,
    .popup-image.icon-btn,
    .elementor-section.elementor-element-b8bbfb8::before,
    .elementor-section.elementor-element-b8bbfb8::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== ADDITIONAL SPORTS CLUB ENHANCEMENTS ===== */

/* Add sport-specific styling for different portfolio items */
.portfolio-thumb.fitness-photo {
    border-color: rgba(255, 140, 0, 0.3);
}

.portfolio-thumb.fitness-photo:hover {
    border-color: #FF8C00;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(255, 140, 0, 0.3);
}

.portfolio-thumb.training-photo {
    border-color: rgba(220, 20, 60, 0.3);
}

.portfolio-thumb.training-photo:hover {
    border-color: #DC143C;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(220, 20, 60, 0.3);
}

.portfolio-thumb.facilities-photo {
    border-color: rgba(70, 130, 180, 0.3);
}

.portfolio-thumb.facilities-photo:hover {
    border-color: #4682B4;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(70, 130, 180, 0.3);
}

/* Add masonry-style layout option */
.portfolio-masonry .portfolio-thumb:nth-child(2n) {
    transform: translateY(20px);
}

.portfolio-masonry .portfolio-thumb:nth-child(3n) {
    transform: translateY(-15px);
}

/* Image lazy loading enhancement */
.portfolio-thumb img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-thumb img[loading="lazy"].loaded {
    opacity: 1;
}