/* ============================================
   BELUGA POOL SERVICE - GALLERY PAGE STYLES
   Premium Professional Design
   ============================================ */

/* Import base variables from style.css */
@import url('style.css');

/* Gallery Hero Section - Similar to Home Page */
.gallery-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.50) 0%, rgba(0, 150, 199, 0.30) 100%), url('../images/maintenance-pool-3.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 100px 20px;
    overflow: hidden;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.gallery-hero > * {
    position: relative;
    z-index: 2;
}

.gallery-hero .container {
    max-width: 900px;
    background: rgba(255, 255, 255, 0.08);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.gallery-hero h1 {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5), 0 4px 24px rgba(0, 119, 182, 0.3);
    color: #ffffff;
}

.gallery-hero .subtitle {
    font-size: clamp(1.15rem, 3vw, 1.5rem);
    font-weight: 400;
    opacity: 1;
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    letter-spacing: 0.3px;
    margin-bottom: 0;
    color: #ffffff;
}

/* Category Filter Section */
.category-filter-section {
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
    padding: 60px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-title {
    font-size: 2rem;
    color: #0077B6;
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    position: relative;
    display: inline-block;
    width: 100%;
}

.filter-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: #48CAE4;
    border-radius: 2px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 2px solid #e0e0e0;
    padding: 18px 30px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    border-color: #0077B6;
    color: #0077B6;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 119, 182, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #0077B6 0%, #0096C7 100%);
    border-color: #0077B6;
    color: white;
    box-shadow: 0 8px 24px rgba(0, 119, 182, 0.4);
    transform: translateY(-2px);
}

.filter-btn.active:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 180, 216, 0.5);
}

.filter-icon {
    font-size: 1.6rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.filter-text {
    font-size: 1.05rem;
    white-space: nowrap;
    position: relative;
    z-index: 1;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0 8px;
    position: relative;
    z-index: 1;
}

.filter-btn.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Gallery Grid Section */
.gallery-grid-section {
    padding: 80px 20px;
    background: white;
}

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 40px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Gallery Items */
.gallery-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid #f0f0f0;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item.hidden {
    display: none;
}

.gallery-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 16px 48px rgba(0, 119, 182, 0.15);
}

/* Gallery Header */
.gallery-header {
    padding: 25px 30px;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e0e0e0;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
}

.category-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.category-badge[data-category="maintenance"] {
    background: linear-gradient(135deg, rgba(0, 180, 216, 0.15) 0%, rgba(0, 180, 216, 0.25) 100%);
    color: #0077B6;
    border: 1px solid rgba(0, 180, 216, 0.3);
}

.category-badge[data-category="recovery"] {
    background: linear-gradient(135deg, rgba(6, 214, 160, 0.15) 0%, rgba(6, 214, 160, 0.25) 100%);
    color: #059669;
    border: 1px solid rgba(6, 214, 160, 0.3);
}

.category-badge[data-category="repair"] {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.15) 0%, rgba(243, 156, 18, 0.25) 100%);
    color: #d68910;
    border: 1px solid rgba(243, 156, 18, 0.3);
}

.category-badge[data-category="installation"] {
    background: linear-gradient(135deg, rgba(144, 224, 239, 0.15) 0%, rgba(144, 224, 239, 0.25) 100%);
    color: #0077B6;
    border: 1px solid rgba(144, 224, 239, 0.3);
}

/* Before/After Container (side by side) */
.before-after-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.before-after-container .image-wrapper {
    aspect-ratio: auto;
}

.image-wrapper.before {
    border-right: 2px solid #f0f0f0;
}

.image-label {
    position: absolute;
    top: 15px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 10;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    text-transform: uppercase;
}

.image-label.before {
    left: 15px;
    border-left: 3px solid #E74C3C;
}

.image-label.after {
    right: 15px;
    border-left: 3px solid #27AE60;
}

/* Gallery Images */
.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.08);
}

/* Single Image Layout */
.single-image-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f0f0f0;
}

.single-image-container .gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Project Description */
.project-description {
    padding: 25px 30px 30px;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.7;
    background: white;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 100px 20px;
    display: none;
}

.no-results.show {
    display: block;
}

.no-results-icon {
    font-size: 5rem;
    color: #95a5a6;
    margin-bottom: 25px;
}

.no-results h3 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.no-results p {
    font-size: 1.15rem;
    color: #6c757d;
    max-width: 500px;
    margin: 0 auto 30px;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 95%;
    max-height: 95%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 80px rgba(0,0,0,0.5);
}

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

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(231, 76, 60, 0.9);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-header {
    padding: 30px 35px;
    background: linear-gradient(to right, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e0e0e0;
}

.lightbox-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.lightbox-body {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

.lightbox-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #f0f0f0;
}

.lightbox-images.single {
    grid-template-columns: 1fr;
}

.lightbox-image-wrapper {
    position: relative;
    background: #000;
}

.lightbox-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.lightbox-image-label {
    position: absolute;
    top: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 24px;
    font-weight: 600;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.lightbox-image-label.before {
    left: 20px;
    border-left: 4px solid #E74C3C;
}

.lightbox-image-label.after {
    right: 20px;
    border-left: 4px solid #27AE60;
}

.lightbox-description {
    padding: 30px 35px;
    background: white;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #6c757d;
    border-top: 1px solid #e0e0e0;
}

/* CTA Section */
.gallery-cta {
    background: linear-gradient(135deg, #00B4D8 0%, #0077B6 100%);
    padding: 80px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.gallery-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.gallery-cta > * {
    position: relative;
    z-index: 2;
}

.gallery-cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: white;
    margin-bottom: 20px;
    font-weight: 800;
}

.gallery-cta p {
    font-size: 1.25rem;
    margin-bottom: 35px;
    opacity: 0.95;
}

.gallery-cta .btn-primary {
    background: white;
    color: #00B4D8;
    padding: 18px 40px;
    font-size: 1.15rem;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.gallery-cta .btn-primary:hover {
    background: #f0f0f0;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
        gap: 30px;
    }
    
    .lightbox-content {
        max-width: 90%;
        max-height: 90%;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 100px 20px 80px;
    }
    
    .gallery-hero h1 {
        font-size: 2.5rem;
    }
    
    .category-filter-section {
        padding: 40px 20px;
    }
    
    .filter-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .filter-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .before-after-container {
        grid-template-columns: 1fr;
        gap: 1px;
    }
    
    .image-wrapper.before {
        border-right: none;
        border-bottom: 2px solid #f0f0f0;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .lightbox-images {
        grid-template-columns: 1fr;
    }
    
    .lightbox-header {
        padding: 20px 25px;
    }
    
    .lightbox-title {
        font-size: 1.5rem;
    }
    
    .lightbox-description {
        padding: 20px 25px;
        font-size: 1rem;
    }
    
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 80px 15px 60px;
    }
    
    .gallery-hero h1 {
        font-size: 2rem;
    }
    
    .gallery-hero .subtitle {
        font-size: 1rem;
    }
    
    .category-filter-section {
        padding: 30px 15px;
    }
    
    .filter-title {
        font-size: 1.5rem;
    }
    
    .filter-btn {
        padding: 14px 20px;
        font-size: 0.95rem;
    }
    
    .filter-icon {
        font-size: 1.4rem;
    }
    
    .gallery-grid-section {
        padding: 50px 15px;
    }
    
    .gallery-header {
        padding: 20px;
    }
    
    .project-title {
        font-size: 1.25rem;
    }
    
    .project-description {
        padding: 20px;
        font-size: 0.95rem;
    }
    
    .image-label {
        padding: 6px 14px;
        font-size: 0.8rem;
        top: 10px;
    }
    
    .image-label.before {
        left: 10px;
    }
    
    .image-label.after {
        right: 10px;
    }
    
    .lightbox-header {
        padding: 15px 20px;
    }
    
    .lightbox-title {
        font-size: 1.25rem;
    }
    
    .lightbox-description {
        padding: 15px 20px;
        font-size: 0.95rem;
    }
    
    .lightbox-image-label {
        padding: 8px 16px;
        font-size: 0.85rem;
        top: 15px;
    }
    
    .lightbox-image-label.before {
        left: 15px;
    }
    
    .lightbox-image-label.after {
        right: 15px;
    }
    
    .gallery-cta {
        padding: 60px 15px;
    }
    
    .gallery-cta h2 {
        font-size: 1.75rem;
    }
    
    .gallery-cta p {
        font-size: 1.05rem;
    }
    
    .gallery-cta .btn-primary {
        padding: 15px 32px;
        font-size: 1rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: #00B4D8;
    color: white;
}

::-moz-selection {
    background: #00B4D8;
    color: white;
}
