/* Sluzby CSS Styles */

/* ------ Archívna stránka služieb ------ */

.sluzby-archive-content {
    padding: 60px 0 80px;
    background-color: #fff;
}

.sluzby-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Kategórie služieb */
.sluzby-categories-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 30px;
    position: relative;
    color: #333;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: #7C877F;
}

.sluzby-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.sluzby-category-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sluzby-category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.sluzby-category-link {
    display: block;
    text-decoration: none;
    color: #333;
}

.sluzby-category-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.sluzby-category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sluzby-category-card:hover .sluzby-category-image img {
    transform: scale(1.05);
}

.sluzby-category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    transition: opacity 0.3s ease;
}

.sluzby-category-content {
    padding: 20px;
    background: #fff;
}

.sluzby-category-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 10px;
    color: #333;
}

.sluzby-category-description {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.no-categories {
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 40px 0;
    grid-column: span 3;
}

/* Filter */
.sluzby-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
    position: relative;
    padding-bottom: 10px;
}

.sluzby-filter:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 1px;
    background-color: rgba(124, 135, 127, 0.2);
}

.filter-btn {
    padding: 8px 20px;
    border: none;
    background: transparent;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.filter-btn:hover {
    color: #7C877F;
}

.filter-btn.active {
    color: #7C877F;
    font-weight: 600;
}

.filter-btn.active:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: #7C877F;
}

/* Sluzby Grid - upravené pre vzhľad projektov */
.sluzby-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 50px 0 40px;
    min-height: 400px; /* Minimálna výška pre zabránenie skokom pri filtrovaní */
    position: relative;
}

.sluzby-item {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    transform: scale(1);
}

.sluzby-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

.sluzby-item.visible {
    display: block;
    animation: fadeInScale 0.5s forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.sluzby-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.sluzby-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.sluzby-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sluzby-item:hover .sluzby-image img {
    transform: scale(1.05);
}

.sluzby-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.7));
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.sluzby-item .arrow-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: rgba(124, 135, 127, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: transform 0.3s ease;
}

.sluzby-item:hover .arrow-icon {
    transform: rotate(90deg);
}

.sluzby-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    color: #fff;
}

.sluzby-title {
    font-size: 22px;
    font-weight: 600;
    margin: 10px 0;
    color: #fff;
}

.sluzby-category {
    display: inline-block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sluzby-excerpt {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
    line-height: 1.6;
    max-width: 90%;
}

.no-sluzby {
    text-align: center;
    font-size: 18px;
    color: #666;
    grid-column: 1 / -1;
    padding: 40px 0;
}

/* Animácia načítavania */
.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(124, 135, 127, 0.3);
    border-radius: 50%;
    border-top-color: #7C877F;
    animation: spin 1s ease-in-out infinite;
    z-index: 3;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.sluzby-grid.loading .loading-spinner {
    display: block;
}

.sluzby-grid.loading .sluzby-item {
    opacity: 0.5;
}

/* Pagination */
.navigation.pagination {
    margin-top: 40px;
    text-align: center;
}

.nav-links {
    display: inline-flex;
    gap: 10px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    background: #f5f5f5;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-numbers.current {
    background: #7C877F;
    color: #fff;
}

.page-numbers:hover:not(.current) {
    background: #e0e0e0;
}

/* ------ Stránka jednotlivej služby ------ */

.sluzby-single-hero {
    position: relative;
    width: 100%;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    overflow: hidden;
    margin-bottom: 60px;
}

.sluzby-hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.sluzby-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sluzby-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(28, 32, 35, 0.6), rgba(28, 32, 35, 0.9));
}

.sluzby-hero__container {
    position: relative;
    width: 100%;
    z-index: 2;
}

.sluzby-hero__content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 20px 100px;
    text-align: center;
}

.sluzby-hero__title {
    font-size: 60px;
    font-weight: 600;
    margin: 0 0 20px;
    line-height: 1.1;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out;
}

.sluzby-hero__meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    animation: fadeInUp 1s ease-out 0.2s forwards;
    opacity: 0;
}

.sluzby-categories {
    display: flex;
    gap: 10px;
}

.sluzby-category {
    display: inline-block;
    background-color: rgba(124, 135, 127, 0.8);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
}

.sluzby-category:hover {
    background-color: #7C877F;
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.sluzby-single-content {
    background-color: #fff;
    padding: 0 0 80px;
}

/* Upravená štruktúra obsahu pre zobrazenie služby na celú šírku */
.sluzby-content-wrapper-full {
    width: 100%;
    margin: 0 auto;
}

.sluzby-main-content {
    width: 100%;
}

/* Main Content Area */
.sluzby-section {
    margin-bottom: 60px;
    animation: fadeInUp 1s ease;
}

.sluzby-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}

.sluzby-description p {
    margin-bottom: 20px;
}

/* Features List */
.features-list {
    list-style: none;
    padding: 0;
    margin: 25px 0 0;
}

.features-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.features-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.feature-check {
    color: #7C877F;
    margin-right: 15px;
    margin-top: 5px;
    font-size: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-check svg {
    width: 22px;
    height: 22px;
}

.feature-text {
    flex: 1;
    color: #666;
}

/* Gallery Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    height: 250px;
    cursor: pointer;
}

.gallery-link {
    display: block;
    height: 100%;
    overflow: hidden;
    transition: all 0.3s ease;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,0.5) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Navigation */
.sluzby-navigation {
    margin: 60px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 30px 0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
}

.nav-previous, .nav-next {
    max-width: 45%;
}

.nav-title {
    display: block;
    font-size: 14px;
    color: #999;
    margin-bottom: 8px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.nav-previous a, .nav-next a {
    text-decoration: none;
    transition: transform 0.3s ease;
    display: block;
}

.nav-previous a:hover {
    transform: translateX(-5px);
}

.nav-next a:hover {
    transform: translateX(5px);
}

.nav-previous a:hover .post-title,
.nav-next a:hover .post-title {
    color: #7C877F;
}

.nav-next {
    text-align: right;
}

/* Related Services */
.related-sluzby {
    margin-top: 60px;
}

.related-title {
    font-size: 32px;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    color: #333;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #7C877F;
}

.related-sluzby-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-sluzba {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.related-sluzba:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.related-sluzba img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.related-sluzba-title {
    padding: 20px 20px 10px;
    font-size: 18px;
    margin: 0;
    color: #333;
}

.related-sluzba-categories {
    padding: 0 20px 20px;
    font-size: 14px;
    color: #999;
}

/* CTA Section */
.sluzby-cta-section {
    margin-top: 60px;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
}

.cta-title {
    font-size: 32px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #333;
}

.cta-description {
    font-size: 18px;
    color: #666;
    margin: 0 0 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background-color: #7C877F;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #000;
    color: #fff;
    transform: translateY(-3px);
    text-decoration: none;
}

.cta-button svg {
    width: 20px;
    height: 20px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Lightbox štýly - opravené */
.portfolio-lightbox,
.sluzby-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: none; /* Začíname s display: none */
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden; /* Pridané visibility: hidden */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.portfolio-lightbox.active,
.sluzby-lightbox.active {
    display: flex;
    opacity: 1;
    visibility: visible; /* Zmení sa na visible keď je aktívny */
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: 0 auto;
}

.lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    margin: 0 auto;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    box-sizing: border-box;
    z-index: 1000000;
}

.lightbox-prev,
.lightbox-next {
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    opacity: 0.8;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(124, 135, 127, 0.8);
    opacity: 1;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000001;
    transition: background-color 0.3s ease;
    opacity: 0.8;
}

.lightbox-close:hover {
    background-color: rgba(124, 135, 127, 0.8);
    opacity: 1;
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 16px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Šípky navigácie */
.lightbox-prev::before,
.lightbox-next::before {
    content: '';
    display: block;
    width: 12px;
    height: 12px;
    border-style: solid;
    border-color: #fff;
    border-width: 0 0 3px 3px;
    transform: rotate(45deg);
    margin-left: 5px;
}

.lightbox-next::before {
    transform: rotate(-135deg);
    margin-left: -5px;
}

.lightbox-close::before,
.lightbox-close::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 3px;
    background-color: #fff;
    top: 50%;
    left: 50%;
}

.lightbox-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.lightbox-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* Skrytie prvkov pri zobrazení lightboxu */
body.lightbox-open {
    overflow: hidden;
}

/* Animácia pre obrázky */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Kompatibilita s projektovým dizajnom z front-page.css */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 50px 0 40px;
    min-height: 400px;
    position: relative;
}

.project-item {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    transform: scale(1);
}

.project-item.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.8);
}

.project-item.visible {
    display: block;
    animation: fadeInScale 0.5s forwards;
}

.project-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.project-image {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-item:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.7));
    opacity: 1;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    color: #fff;
}

.project-title {
    font-size: 22px;
    font-weight: 600;
    margin: 10px 0;
    color: #fff;
}

.project-category {
    display: inline-block;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.project-excerpt {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
    line-height: 1.6;
    max-width: 90%;
}

.projects-grid.loading .loading-spinner {
    display: block;
}

.projects-grid.loading .project-item {
    opacity: 0.5;
}

/* Responsívny dizajn */
@media screen and (max-width: 991px) {
    .sluzby-categories,
    .sluzby-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sluzby-image,
    .project-image {
        height: 300px;
    }

    .sluzby-hero__title {
        font-size: 48px;
    }

    .related-sluzby-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .no-categories {
        grid-column: span 2;
    }

    .cta-buttons {
        flex-direction: column;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media screen and (max-width: 767px) {
    .sluzby-categories,
    .sluzby-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .sluzby-single-hero {
        height: 400px;
    }

    .sluzby-hero__content {
        padding: 100px 20px 60px;
    }

    .sluzby-hero__title {
        font-size: 36px;
    }

    .sluzby-hero__meta {
        flex-direction: column;
        gap: 10px;
    }

    .sluzby-single-content {
        padding: 0 0 40px;
    }

    .section-title {
        font-size: 28px;
    }

    .sluzby-container {
        padding: 0 15px;
    }

    .related-sluzby-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .nav-links {
        flex-direction: column;
        gap: 20px;
    }

    .nav-previous, .nav-next {
        max-width: 100%;
        text-align: center;
    }

    .filter-btn {
        white-space: nowrap;
        padding: 8px 15px;
        font-size: 14px;
    }

    .sluzby-filter {
        flex-direction: row;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 15px;
    }

    .no-categories {
        grid-column: span 1;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .sluzby-cta-section {
        padding: 40px 20px;
    }

    .cta-title {
        font-size: 24px;
    }

    .cta-description {
        font-size: 16px;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
    }

    .lightbox-counter {
        bottom: 10px;
    }

    .lightbox-prev::before,
    .lightbox-next::before {
        width: 10px;
        height: 10px;
    }

    .lightbox-close::before,
    .lightbox-close::after {
        width: 17px;
    }
}