/* Gallery Page Styles */

/* Gallery Hero */
.gallery-hero {
    height: 60vh !important;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 80px;
}

.gallery-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/martin-pechy-DmZj6XZXbLQ-unsplash.jpg');
    z-index: 1;
}

.gallery-hero .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 0 20px;
}

.hero-tag {
    display: inline-block;
    padding: 8px 24px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
}

.gallery-hero h1 {
    font-size: 72px;
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 900;
}

.gallery-hero p {
    font-size: 22px;
    opacity: 0.95;
}

.hero-text-side {
    text-align: left;
    color: var(--white);
}

.hero-text-side h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-text-side p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-image-side img {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

@media (max-width: 968px) {
    .hero-content-with-image {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-text-side {
        text-align: center;
    }

    .hero-image-side {
        order: -1;
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 0.9rem;
    letter-spacing: 1px;
    opacity: 0.8;
    animation: bounce 2s infinite;
    cursor: pointer;
}

.scroll-indicator span {
    text-transform: uppercase;
    font-weight: 500;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Gallery Section */
.gallery-section {
    padding: 120px 0;
    background: #ffffff;
    overflow: hidden;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
}

.section-header h2 {
    font-size: 38px;
    font-weight: 900;
    color: #111;
    display: inline-block;
    padding: 18px 50px;
    background: #fff;
    border: 1px solid #eee;
    border-top: 6px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    margin: 0 auto 25px;
    letter-spacing: -0.5px;
    position: relative;
    text-transform: capitalize;
}

.highlight {
    background: var(--primary-color);
    color: #fff;
    padding: 2px 14px;
    border-radius: 6px;
    display: inline-block;
    margin-left: 10px;
    box-shadow: 0 4px 12px rgba(255, 102, 0, 0.25);
    font-weight: 800;
}

.section-header p {
    font-size: 18px;
    color: #666;
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
}

/* Gallery Filters */
.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 80px;
    flex-wrap: wrap;
    position: relative;
    z-index: 10;
}

.filter-btn {
    padding: 14px 34px;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 50px;
    color: #444;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.5px;
}

.filter-btn:hover {
    background: #fff;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 102, 0, 0.1);
}

.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 15px 30px rgba(255, 102, 0, 0.25);
}

/* Grid Layout - Uniform Row Style */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    /* Uniform columns */
    grid-auto-rows: 250px;
    /* Uniform row height */
    gap: 20px;
    opacity: 1;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    margin: 0;
    /* No specific spans - items default to 1x1 */
}

.gallery-item .gallery-image {
    width: 100%;
    height: 100%;
}

.gallery-item .gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures images fill the uniform box */
    transition: transform 1.2s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Premium Glassmorphism Overlay */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(2px);
}

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.4s ease;
    width: 100%;
}

.overlay-content span {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 102, 0, 0.8);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 12px;
}

.overlay-content h4 {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.view-btn {
    width: 54px;
    height: 54px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.view-btn:hover {
    transform: scale(1.1) rotate(90deg);
    background: var(--primary-color);
    color: #fff;
}

/* Hover Effects */
.gallery-item:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

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

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    backdrop-filter: blur(4px);
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

/* Responsive Scaling for Mosaic */
/* Responsive Scaling for Mosaic */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        grid-auto-rows: 200px;
    }
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    /* Adjust spans for 2-column layout */
    .gallery-item:nth-child(n) {
        grid-column: span 1;
        grid-row: span 1;
    }

    /* Keep some features prominent but smaller */
    .gallery-item:nth-child(1),
    .gallery-item:nth-child(5) {
        grid-column: span 2;
        grid-row: span 2;
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
        /* Slightly larger for mobile tap targets, but still compact */
    }

    /* Reset all spans for mobile single column */
    .gallery-item:nth-child(n) {
        grid-column: span 1;
        grid-row: span 1 !important;
    }

    .section-header h2 {
        font-size: 36px;
    }
}

/* Horizontal Gallery Section */
.horizontal-gallery-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.horizontal-gallery-section h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

.horizontal-gallery {
    display: flex;
    gap: 20px;
    padding: 20px 10px;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #f0f0f0;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
}

.horizontal-gallery::-webkit-scrollbar {
    height: 6px;
}

.horizontal-gallery::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.horizontal-gallery::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.h-gallery-item {
    flex: 0 0 auto;
    width: 250px;
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.h-gallery-item.wide {
    width: 800px;
}

.h-gallery-item:hover {
    transform: translateY(-10px);
}

.h-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1400px) {
    .horizontal-gallery {
        justify-content: flex-start;
        padding-bottom: 30px;
    }
}

@media (max-width: 600px) {
    .h-gallery-item {
        width: 200px;
        height: 200px;
    }
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .gallery-hero h1 {
        font-size: 42px;
    }

    .gallery-hero p {
        font-size: 18px;
    }

    .horizontal-gallery {
        justify-content: flex-start;
        /* Ensure scroll works correctly */
        padding-left: 20px;
        /* Add some start padding */
    }
}

@media (max-width: 576px) {
    .gallery-hero {
        height: 50vh !important;
    }

    .gallery-hero h1 {
        font-size: 32px;
    }

    .section-header h2 {
        font-size: 24px;
        padding: 10px 20px;
    }

    .section-header p {
        font-size: 14px;
        padding: 0 15px;
    }
}