/* Izglitibas projektu lapas kartisu un filtru stili. */

/* ===== PROJEKTU LAPA ===== */
.projekti-page {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
}

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

/* Atpakaļ saite */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #520505;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 30px;
    transition: all 0.2s;
    background: white;
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid #520505;
    box-shadow: 0 2px 8px rgba(82,5,5,0.1);
}

.back-link:hover {
    background: #520505;
    color: white;
    transform: translateX(-5px);
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #520505;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #ffcc00, #ffd700);
    border-radius: 2px;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 800px;
    margin: 20px auto 0;
}

.section-heading {
    font-size: 2rem;
    font-weight: 700;
    color: #520505;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #ffcc00;
    border-radius: 2px;
}

/* ===== IEVADA SEKCIJA ===== */
.intro-section {
    background: white;
    border-radius: 30px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 15px 35px rgba(82,5,5,0.1);
    border: 1px solid rgba(82,5,5,0.1);
}

.intro-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.intro-icon {
    width: 100px;
    height: 100px;
    background: #520505;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
    box-shadow: 0 15px 30px rgba(82,5,5,0.2);
}

.intro-text {
    flex: 1;
}

.intro-text h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 15px;
}

.intro-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2d3748;
}

/* ===== KATEGORIJU NAVIGĀCIJA ===== */
.kategoriju-navigacija {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
}

.kategorija-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    color: #666;
    border: 1px solid #e9ecef;
    text-decoration: none;
}

.kategorija-btn:hover {
    background: #520505;
    color: white;
    border-color: #520505;
    transform: translateY(-2px);
}

.kategorija-btn.active {
    background: #520505;
    color: white;
    border-color: #520505;
}

/* ===== PROJEKTU REŽĢIS ===== */
.projekti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.projekts-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(82,5,5,0.05);
    border: 1px solid rgba(82,5,5,0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.projekts-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px rgba(82,5,5,0.15);
    border-color: #ffcc00;
}

.projekts-bilde {
    height: 180px;
    overflow: hidden;
}

.projekts-bilde img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.projekts-card:hover .projekts-bilde img {
    transform: scale(1.1);
}

.projekts-content {
    padding: 20px;
    flex: 1;
}

.projekts-kategorija {
    display: inline-block;
    background: #ffcc00;
    color: #520505;
    padding: 3px 10px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.projekts-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 5px;
}

.projekts-dates {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.projekts-apraksts {
    color: #2d3748;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.projekts-detalas {
    padding-top: 10px;
    border-top: 1px dashed rgba(82,5,5,0.1);
}

.projekts-detalas p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2d3748;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.projekts-detalas i {
    color: #ffcc00;
    width: 18px;
}

.lasit-vairak {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    color: #520505;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.lasit-vairak:hover {
    color: #7a0f0f;
    gap: 12px;
}

.pagination-bottom {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.nav-pasakumu {
    grid-column: 1 / -1;
    background: white;
    border: 1px solid rgba(82, 5, 5, 0.1);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    color: #2d3748;
}

/* ===== PROJEKTA DETALAS ===== */
.projekta-full {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(82, 5, 5, 0.1);
    border: 1px solid rgba(82, 5, 5, 0.1);
}

.projekta-body {
    padding: 30px;
}

.projekta-title {
    margin-top: 12px;
    margin-bottom: 14px;
    color: #520505;
    font-size: 2rem;
    line-height: 1.2;
}

.projekta-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.projekta-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border-radius: 999px;
    padding: 8px 14px;
    color: #520505;
    border: 1px solid #520505;
}

.projekta-meta span i {
    color: #ffcc00;
}

/* ===== GALERIJA - PASAKUMU SHOW STILS ===== */
.pasakuma-galerija {
    margin-bottom: 30px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.galerija-pamatattels {
    width: 100%;
    height: 500px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    cursor: pointer;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.galerija-pamatattels img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 16px;
}

.galerija-sikbildes {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
}

.galerija-sikbilde {
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.galerija-sikbilde:hover {
    opacity: 0.8;
    border-color: #520505;
}

.galerija-sikbilde.aktivs {
    border-color: #520505;
    opacity: 1;
}

.galerija-sikbilde img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.galerija-modal,
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.galerija-modal-saturs,
.lightbox-content {
    position: relative;
    margin: auto;
    padding: 0 60px;
    width: 100%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#projektaModalImage {
    max-width: 95vw;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}

.galerija-modal-slide {
    display: none;
    text-align: center;
    width: 100%;
    height: 90vh;
    justify-content: center;
    align-items: center;
}

.galerija-modal-slide img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 20px;
}

.galerija-modal-close,
.lightbox-close {
    position: fixed;
    top: 20px;
    right: 35px;
    color: white;
    cursor: pointer;
    font-size: 40px;
    z-index: 10000;
}

.galerija-modal-close:hover,
.lightbox-close:hover { color: #520505; }

.galerija-modal-prev,
.galerija-modal-next,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(82,5,5,0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    cursor: pointer;
    border-radius: 50%;
    user-select: none;
    z-index: 10001;
    padding: 0;
    line-height: 1;
}

.galerija-modal-prev,
.lightbox-prev { left: 5px; }

.galerija-modal-next,
.lightbox-next { right: 5px; }

.galerija-modal-prev:hover,
.galerija-modal-next:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: #520505;
    transform: translateY(-50%) scale(1.1);
    text-decoration: none;
}

.galerija-modal-prev:focus,
.galerija-modal-next:focus,
.lightbox-prev:focus,
.lightbox-next:focus {
    outline: none;
}

.lightbox-close::before {
    content: "×";
    display: block;
    line-height: 1;
    margin-top: -1px;
}

.zoom-controls {
    position: fixed;
    bottom: 100px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10002;
    background: rgba(82,5,5,0.8);
    padding: 8px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: none;
    color: #520505;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-btn:hover {
    background: #ffcc00;
    transform: scale(1.1);
}

/* Projekta modala šķirstīšana: 1:1 kā galerijas lightbox */
.lightbox-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    cursor: pointer;
    background: rgba(82,5,5,0.6);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10000;
    border: 2px solid rgba(255,255,255,0.2);
    font-size: 28px;
    line-height: 1;
    font-family: Arial, Helvetica, sans-serif;
}

.lightbox-close:hover {
    background: #7a0f0f;
    transform: scale(1.1);
    border-color: white;
    color: white;
}

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(82,5,5,0.7);
    color: white;
    border: 2px solid #ffcc00;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.lightbox-prev { left: 6px; }
.lightbox-next { right: 6px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: #ffcc00;
    color: #520505;
    transform: translateY(-50%) scale(1.1);
    border-color: white;
}

.lightbox-caption {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    text-align: center;
    padding: 8px 16px;
    font-size: 16px;
    background-color: rgba(82,5,5,0.8);
    border-radius: 30px;
    z-index: 10000;
    font-weight: 500;
    border: 2px solid rgba(255,255,255,0.2);
}

.galerija-modal-indikators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    padding: 8px 16px;
    font-size: 16px;
    background-color: rgba(82,5,5,0.8);
    border-radius: 30px;
    z-index: 10000;
}

@media (max-width: 768px) {
    .galerija-pamatattels {
        height: 300px;
    }

    .galerija-sikbildes {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .galerija-sikbilde {
        height: 60px;
    }

    .galerija-modal-saturs {
        padding: 0 40px;
    }

    .galerija-modal-prev,
    .galerija-modal-next,
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }

    .zoom-controls {
        bottom: 80px;
        right: 15px;
        gap: 8px;
        padding: 6px;
    }

    .zoom-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 50%;
    }

    .lightbox-close {
        top: 20px;
        right: 25px;
        font-size: 40px;
    }

    .lightbox-prev { left: 4px; }
    .lightbox-next { right: 4px; }
}

.projekta-apraksts {
    color: #2d3748;
    line-height: 1.8;
}

/* ===== REZULTĀTU INFO ===== */
.rezultati-info {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(82,5,5,0.05);
    border: 1px solid rgba(82,5,5,0.1);
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 50px;
}

.rezultati-info span {
    font-weight: 700;
    color: #520505;
}

/* ===== AKTĪVIE PROJEKTI ===== */
.aktīvie-section {
    margin-bottom: 50px;
}

.aktīvie-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.aktīvs-projekts {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 25px rgba(82,5,5,0.05);
    border: 1px solid rgba(82,5,5,0.1);
    transition: all 0.3s;
}

.aktīvs-projekts:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px rgba(82,5,5,0.15);
    border-color: #ffcc00;
}

.aktīvs-projekts h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 15px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #520505, #ffcc00);
    border-radius: 4px;
}

.aktīvs-projekts p {
    color: #2d3748;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== GALERIJA ===== */
.galerija-section {
    margin-bottom: 50px;
}

.galerija-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.galerija-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 200px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(82,5,5,0.1);
    transition: all 0.3s;
}

.galerija-item:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(82,5,5,0.2);
}

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

.galerija-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(82,5,5,0.9), transparent);
    color: white;
    padding: 15px;
    font-size: 0.9rem;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.galerija-item:hover .galerija-caption {
    transform: translateY(0);
}

/* ===== KOORDINATORI ===== */
.koordinatori-section {
    margin-bottom: 50px;
}

.koordinatori-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.koordinators-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(82,5,5,0.05);
    border: 1px solid rgba(82,5,5,0.1);
    transition: all 0.3s;
}

.koordinators-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 35px rgba(82,5,5,0.15);
    border-color: #ffcc00;
}

.koordinators-card i {
    font-size: 3rem;
    color: #ffcc00;
    margin-bottom: 10px;
}

.koordinators-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 5px;
}

.koordinators-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.koordinators-card a {
    color: #520505;
    text-decoration: none;
    font-size: 0.85rem;
}

.koordinators-card a:hover {
    text-decoration: underline;
}

/* ===== SAITES ===== */
.saites-section {
    margin-bottom: 50px;
}

.saites-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.saite-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(82,5,5,0.05);
    border: 1px solid rgba(82,5,5,0.1);
    transition: all 0.3s;
    display: block;
}

.saite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(82,5,5,0.15);
    border-color: #ffcc00;
}

.saite-card i {
    font-size: 2rem;
    color: #ffcc00;
    margin-bottom: 10px;
}

.saite-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #520505;
}

/* ===== PIETEIKUMS ===== */
.pieteikums-section {
    margin-bottom: 40px;
}

.info-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    border-left: 5px solid #ffcc00;
    box-shadow: 0 10px 25px rgba(82,5,5,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-box i {
    font-size: 2.5rem;
    color: #ffcc00;
}

.info-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 8px;
}

.info-box p {
    color: #2d3748;
    line-height: 1.7;
    margin-bottom: 15px;
}

.pieteikums-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #520505;
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.pieteikums-btn:hover {
    background: #7a0f0f;
    transform: translateY(-2px);
    gap: 12px;
}

/* ===== RESPONSĪVAIS DIZAINS ===== */
@media (max-width: 992px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .intro-content {
        flex-direction: column;
        text-align: center;
    }
    
    .aktīvie-grid,
    .galerija-grid,
    .koordinatori-grid,
    .saites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .section-heading {
        font-size: 1.8rem;
    }
    
    .intro-section {
        padding: 25px;
    }
    
    .intro-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .intro-text h2 {
        font-size: 1.5rem;
    }
    
    .intro-text p {
        font-size: 1rem;
    }
    
    .kategoriju-navigacija {
        flex-direction: column;
        align-items: stretch;
    }
    
    .kategorija-btn {
        width: 100%;
    }
    
    .projekti-grid {
        grid-template-columns: 1fr;
    }
    
    .info-box {
        flex-direction: column;
        text-align: center;
    }

    .projekta-body {
        padding: 20px;
    }

    .projekta-title {
        font-size: 1.6rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-heading {
        font-size: 1.6rem;
    }
    
    .aktīvie-grid,
    .galerija-grid,
    .koordinatori-grid,
    .saites-grid {
        grid-template-columns: 1fr;
    }
    
    .projekts-bilde {
        height: 150px;
    }
}

/* Animācijas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.intro-section,
.projekts-card,
.aktīvs-projekts,
.galerija-item,
.koordinators-card,
.saite-card,
.info-box {
    animation: fadeInUp 0.6s ease forwards;
}