/* ============================================
   GALLERY SECTION - CSS STYLESHEET
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Gallery Section Container */
.services-gallery {
    width: 100%;
    padding: 80px 20px;
    background-color: #f9f9f9;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-in-out;
}

.section-title {
    font-size: 2.8rem;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.section-description {
    font-size: 1.15rem;
    color: #666;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
    font-family: 'Arial', sans-serif;
}

/* 3×3 Grid Layout */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Individual Image Container */
.services-image {
    position: relative;
    width: 100%;
    padding-bottom: 100%; /* Square aspect ratio */
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Hover effect on container */
.services-image:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    transform: translateY(-5px);
}

/* Image Styling */
.services-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Smooth Zoom on Hover */
.services-image:hover img {
    transform: scale(1.15);
}

/* Image Overlay */
.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.services-image:hover .image-overlay {
    transform: translateY(0);
}

.overlay-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CTA Button Section */
.gallery-cta {
    text-align: center;
    margin-top: 50px;
}

.view-more-btn {
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.view-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.view-more-btn:active {
    transform: translateY(-1px);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Add fade-in animation to grid items */
.services-image {
    animation: fadeInUp 0.6s ease-in-out;
    animation-fill-mode: both;
}

.services-image:nth-child(1) { animation-delay: 0.1s; }
.services-image:nth-child(2) { animation-delay: 0.2s; }
.services-image:nth-child(3) { animation-delay: 0.3s; }
.services-image:nth-child(4) { animation-delay: 0.4s; }
.services-image:nth-child(5) { animation-delay: 0.5s; }
.services-image:nth-child(6) { animation-delay: 0.6s; }
.services-image:nth-child(7) { animation-delay: 0.7s; }
.services-image:nth-child(8) { animation-delay: 0.8s; }
.services-image:nth-child(9) { animation-delay: 0.9s; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet View (768px - 1024px) */
@media (max-width: 1024px) {
    .section-title {
        font-size: 2.3rem;
    }

    .section-description {
        font-size: 1.05rem;
    }

    .services-grid {
        gap: 20px;
    }
}

/* Tablet View (768px and below) */
@media (max-width: 768px) {
    .services-gallery {
        padding: 60px 15px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-description {
        font-size: 1rem;
        padding: 0 10px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }

    .view-more-btn {
        padding: 12px 35px;
        font-size: 0.95rem;
    }
}

/* Mobile View (480px and below) */
@media (max-width: 480px) {
    .services-gallery {
        padding: 40px 10px;
    }

    .section-header {
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-description {
        font-size: 0.95rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .services-image {
        border-radius: 10px;
    }

    .overlay-text {
        font-size: 0.9rem;
    }

    .view-more-btn {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .gallery-cta {
        margin-top: 35px;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .section-title {
        font-size: 1.5rem;
    }

    .section-description {
        font-size: 0.9rem;
    }
}