/* Moore Crest Builders - Gallery Page Styles */

/* Gallery Hero Section */
.gallery-hero {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.9), rgba(165, 42, 42, 0.8)), url('../../images/129.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 0 80px;
    color: white;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.gallery-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: #e0e7ff;
    font-weight: 600;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    opacity: 0.95;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 120px;
    transition: all 0.3s ease;
}

.stat:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #e0e7ff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Gallery Filter Section */
.gallery-filter {
    background: white;
    padding: 40px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.gallery-filter h2 {
    text-align: center;
    font-size: 2.2rem;
    color: #8B0000;
    margin-bottom: 30px;
    font-weight: 700;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-btn:hover {
    background: #8B0000;
    border-color: #8B0000;
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    border-color: #8B0000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 0, 0, 0.3);
}

/* Main Gallery Section */
.main-gallery {
    padding: 80px 0;
    background: #f8f9fa;
}

.gallery-category {
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.gallery-category.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-category.hidden {
    display: none;
}

.category-title {
    font-size: 2.5rem;
    color: #8B0000;
    margin-bottom: 15px;
    font-weight: 700;
    text-align: center;
}

.category-description {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.gallery-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px);
}

.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 0, 0, 0.2);
}

/* Image Placeholders */
.image-placeholder {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8B0000;
    border-bottom: 3px solid #8B0000;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s;
}

.gallery-item:hover .image-placeholder::before {
    left: 100%;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    opacity: 0.7;
}

.placeholder-text {
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    font-size: 1rem;
}

/* Gallery Item Info */
.gallery-item-info {
    padding: 25px;
}

.gallery-item-info h4 {
    color: #8B0000;
    font-size: 1.3rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.gallery-item-info p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.location {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
}

/* Before & After Grid */
.before-after-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.before-after-item {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.before-after-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(139, 0, 0, 0.2);
}

.before-after-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
}

.before-image,
.after-image {
    position: relative;
    height: 200px;
}

.before-image .image-placeholder {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-bottom: 3px solid #dc3545;
}

.after-image .image-placeholder {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-bottom: 3px solid #28a745;
}

.before-label,
.after-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

.before-label {
    background: #dc3545;
}

.after-label {
    background: #28a745;
}

.transformation-info {
    padding: 25px;
}

.transformation-info h4 {
    color: #8B0000;
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.transformation-info p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

/* Upload Photos Section */
.upload-photos {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.upload-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 700;
}

.upload-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    opacity: 0.95;
}

.upload-methods {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.upload-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
}

.upload-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Gallery CTA Section */
.gallery-cta {
    background: white;
    padding: 100px 0;
    text-align: center;
}

.gallery-cta .cta-content h2 {
    font-size: 2.8rem;
    color: #8B0000;
    margin-bottom: 20px;
    font-weight: 700;
}

.gallery-cta .cta-content p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #8B0000, #A52A2A);
    color: white;
    border: 2px solid #8B0000;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #A52A2A, #B22222);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.4);
}

.btn-outline {
    background: transparent;
    color: #8B0000;
    border: 2px solid #8B0000;
}

.btn-outline:hover {
    background: #8B0000;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.3);
}

/* Lightbox Styles */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #8B0000;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-info {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.lightbox-info h3 {
    color: #8B0000;
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.lightbox-info p {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.5;
}

.lightbox-info span {
    color: #999;
    font-style: italic;
    font-size: 0.9rem;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    font-size: 24px;
    padding: 15px 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(139, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .before-after-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-stats {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 100px 0 60px;
        background-attachment: scroll;
        min-height: 500px;
    }
    
    .gallery-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .stat {
        min-width: 150px;
    }
    
    .filter-buttons {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-title {
        font-size: 2rem;
    }
    
    .before-after-container {
        grid-template-columns: 1fr;
    }
    
    .before-image,
    .after-image {
        height: 180px;
    }
    
    .upload-methods {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .upload-btn {
        min-width: 250px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn {
        width: 250px;
        text-align: center;
    }
    
    .main-gallery {
        padding: 60px 0;
    }
    
    .upload-photos,
    .gallery-cta {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .gallery-hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .gallery-filter {
        padding: 30px 0;
    }
    
    .gallery-filter h2 {
        font-size: 1.8rem;
        margin-bottom: 20px;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .filter-btn {
        width: 250px;
        text-align: center;
    }
    
    .category-title {
        font-size: 1.8rem;
    }
    
    .category-description {
        font-size: 1.1rem;
    }
    
    .gallery-item-info,
    .transformation-info {
        padding: 20px;
    }
    
    .image-placeholder {
        height: 200px;
    }
    
    .placeholder-icon {
        font-size: 2.5rem;
    }
    
    .placeholder-text {
        font-size: 0.9rem;
    }
    
    .gallery-cta .cta-content h2 {
        font-size: 2.2rem;
    }
    
    .upload-content h2 {
        font-size: 2rem;
    }
    
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .lightbox-nav {
        padding: 0 10px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 20px;
        padding: 12px 15px;
    }
}

/* Animation keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scroll animations */
.gallery-category,
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(even) {
    animation-delay: 0.1s;
}

.gallery-item:nth-child(odd) {
    animation-delay: 0.2s;
}