/* Gallery Page Styles */

/* Gallery Hero Section */
.gallery-hero-section {
    padding: 80px 0;
    background-color: var(--primary);
    position: relative;
    overflow: hidden;
}

/*.gallery-hero-section::after {*/
/*    content: '';*/
/*    position: absolute;*/
/*    bottom: -50px;*/
/*    left: 0;*/
/*    width: 100%;*/
/*    height: 100px;*/
/*    background-color: var(--accent);*/
/*    transform: skewY(-2deg);*/
/*    z-index: 1;*/
/*}*/

/* Gallery Main Section */
.gallery-main-section {
    padding: 80px 0;
    background-color: #f9f9f9;
}

/* Gallery Filters */
.gallery-filters {
    margin-bottom: 40px;
}

.btn-filter {
    padding: 8px 20px;
    background-color: #f0f0f0;
    border: none;
    border-radius: 30px;
    color: #555;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-filter:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.btn-filter.active {
    background-color: var(--accent);
    color: white;
}

/* Gallery Grid */
.gallery-grid {
    margin-bottom: 40px;
}

.gallery-item {
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.gallery-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    aspect-ratio: 3/2;
}

.gallery-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-info {
    text-align: center;
    color: white;
    padding: 20px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-info h5 {
    margin-bottom: 10px;
    font-weight: 600;
}

.gallery-info p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

.gallery-image-container:hover img {
    transform: scale(1.1);
}

.gallery-image-container:hover .gallery-overlay {
    opacity: 1;
}

.gallery-image-container:hover .gallery-info {
    transform: translateY(0);
}

/* SimpleLightbox Custom Styles */
.sl-wrapper .sl-close {
    color: #fff;
    font-size: 30px;
}

.sl-wrapper .sl-navigation button {
    color: #fff;
    font-size: 30px;
}

.sl-wrapper .sl-counter {
    color: #fff;
    font-size: 16px;
}

.sl-wrapper .sl-caption {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.8);
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
}

.sl-overlay {
    background-color: #000;
    opacity: 0.9;
}

/* Mobile optimizations for lightbox */
@media (max-width: 767.98px) {
    /* Ensure lightbox takes full viewport on mobile */
    .sl-wrapper {
        background-color: rgba(0, 0, 0, 0.95);
    }

    .sl-wrapper .sl-close {
        font-size: 32px;
        right: 15px;
        top: 15px;
        width: 40px;
        height: 40px;
        line-height: 40px;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
    }

    .sl-wrapper .sl-navigation button {
        font-size: 28px;
        width: 44px;
        height: 44px;
        background-color: rgba(0, 0, 0, 0.5);
        border-radius: 50%;
    }

    .sl-wrapper .sl-caption {
        font-size: 14px;
        padding: 10px 15px;
        margin-bottom: 20px;
        border-radius: 4px;
    }

    /* Make images more touch-friendly */
    .sl-wrapper .sl-image {
        padding: 20px 10px;
    }

    /* Improve navigation button touch targets */
    .sl-wrapper .sl-navigation button.sl-prev {
        left: 10px;
        padding-left: 10px;
    }

    .sl-wrapper .sl-navigation button.sl-next {
        right: 10px;
        padding-right: 10px;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #0e9ab8;
    transform: translateY(-5px);
}

/* Lazy Loading */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img:not(.lazy-load) {
    opacity: 1;
}

/* SEO Content Section */
.seo-content-section {
    padding: 60px 0;
    background-color: #f8f9f9;
}

.seo-content-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    position: relative;
}

.seo-content-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent);
}

.seo-text {
    color: #555;
    line-height: 1.8;
}

.seo-text p {
    margin-bottom: 20px;
}

.seo-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.seo-text a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .gallery-hero-section {
        padding: 60px 0;
    }

    .gallery-main-section {
        padding: 60px 0;
    }

    .gallery-filters {
        margin-bottom: 30px;
    }

    .btn-filter {
        padding: 6px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 767.98px) {
    .gallery-hero-section {
        padding: 50px 0;
    }

    .gallery-main-section {
        padding: 50px 0;
    }

    .gallery-item {
        margin-bottom: 20px;
    }

    .gallery-info h5 {
        font-size: 1rem;
    }

    .gallery-info p {
        font-size: 0.8rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    .seo-content-section {
        padding: 40px 0;
    }

    .seo-content-section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .seo-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}

@media (max-width: 575.98px) {
    .gallery-hero-section {
        padding: 40px 0;
    }

    .gallery-main-section {
        padding: 40px 0;
    }

    .gallery-filters {
        margin-bottom: 20px;
    }

    .btn-filter {
        padding: 5px 12px;
        font-size: 0.8rem;
        margin-bottom: 10px;
    }

    .gallery-item {
        margin-bottom: 15px;
    }

    .gallery-overlay {
        background-color: rgba(0, 0, 0, 0.7);
        opacity: 1;
    }

    .gallery-info {
        transform: translateY(0);
    }

    .gallery-info h5 {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .gallery-info p {
        font-size: 0.7rem;
    }

    .seo-content-section {
        padding: 30px 0;
    }

    .seo-content-section h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .seo-content-section h2::after {
        width: 40px;
        height: 2px;
        bottom: -8px;
    }

    .seo-text {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .seo-text p {
        margin-bottom: 15px;
    }
}

@media (max-width: 575.98px) {
    .gallery-overlay {
        opacity: 0 !important;
    }

    .gallery-info {
        display: none !important;
    }

    .gallery-image-container:hover .gallery-overlay {
        opacity: 0 !important; /* мобилното няма hover */
    }
}
