/* Skolas vestures laika linijas un satura stili. */

/* ===== ANIMĀCIJAS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-block,
.director-card,
.alumni-card,
.fact-item,
.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.timeline-block:nth-child(1) { animation-delay: 0.1s; }
.timeline-block:nth-child(2) { animation-delay: 0.15s; }
.timeline-block:nth-child(3) { animation-delay: 0.2s; }
.timeline-block:nth-child(4) { animation-delay: 0.25s; }
.timeline-block:nth-child(5) { animation-delay: 0.3s; }
.timeline-block:nth-child(6) { animation-delay: 0.35s; }
.timeline-block:nth-child(7) { animation-delay: 0.4s; }

.director-card:nth-child(1) { animation-delay: 0.1s; }
.director-card:nth-child(2) { animation-delay: 0.15s; }
.director-card:nth-child(3) { animation-delay: 0.2s; }
.director-card:nth-child(4) { animation-delay: 0.25s; }
.director-card:nth-child(5) { animation-delay: 0.3s; }

.alumni-card:nth-child(1) { animation-delay: 0.1s; }
.alumni-card:nth-child(2) { animation-delay: 0.15s; }
.alumni-card:nth-child(3) { animation-delay: 0.2s; }
.alumni-card:nth-child(4) { animation-delay: 0.25s; }

.fact-item:nth-child(1) { animation-delay: 0.1s; }
.fact-item:nth-child(2) { animation-delay: 0.15s; }
.fact-item:nth-child(3) { animation-delay: 0.2s; }
.fact-item:nth-child(4) { animation-delay: 0.25s; }
.fact-item:nth-child(5) { animation-delay: 0.3s; }
.fact-item:nth-child(6) { animation-delay: 0.35s; }

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.15s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.25s; }
.gallery-item:nth-child(5) { animation-delay: 0.3s; }
.gallery-item:nth-child(6) { animation-delay: 0.35s; }

/* ===== VĒSTURES LAPA ===== */
.vesture-page {
    padding: 60px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* 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);
    position: relative;
    z-index: 3;
}

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

.page-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 3;
}

.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;
}

/* ===== LAIKA LĪNIJA ===== */
.timeline-section {
    margin-bottom: 80px;
    position: relative;
    z-index: 3;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: #ffcc00;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255,204,0,0.5);
}

.timeline-block {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    justify-content: flex-end;
    width: 100%;
}

.timeline-block:nth-child(even) {
    justify-content: flex-start;
}

.timeline-year {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background: #520505;
    color: white;
    padding: 12px 30px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 1.3rem;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(82,5,5,0.3);
    border: 2px solid #ffcc00;
    letter-spacing: 1px;
}

.timeline-content {
    width: 45%;
    margin-top: 70px;
}

.timeline-block:nth-child(odd) .timeline-content {
    margin-right: 55%;
}

.timeline-block:nth-child(even) .timeline-content {
    margin-left: 55%;
}

.timeline-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(82,5,5,0.1);
    border: 1px solid rgba(82,5,5,0.1);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.timeline-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: #ffcc00;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    background: #520505;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(82,5,5,0.3);
}

.timeline-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 15px;
}

.timeline-card p {
    color: #2d3748;
    line-height: 1.8;
    font-size: 1rem;
}

/* ===== DIREKTORU SARAKSTS - BORDO KARTES ===== */
.directors-section {
    margin-bottom: 80px;
    position: relative;
    z-index: 3;
}

.directors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    align-items: stretch;
}

.director-card {
    background: #520505;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(82,5,5,0.15);
    border: 1px solid #ffcc00;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.director-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,204,0,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.director-years {
    background: #ffcc00;
    color: #520505;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
    border: 1px solid white;
}

.director-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 10px;
}

.director-card p {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.director-more-btn {
    margin-top: auto;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #ffcc00;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center;
}

.director-more-btn:hover {
    background: #ffcc00;
    color: #520505;
}

.director-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 20000;
    background: rgba(0, 0, 0, 0.65);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.director-modal-content {
    width: 100%;
    max-width: 760px;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.25);
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    position: relative;
}

.director-modal-image {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    background: #f1f5f9;
}

.director-modal-meta {
    padding: 28px 24px;
}

.director-modal-years {
    display: inline-block;
    background: #ffcc00;
    color: #520505;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.director-modal-meta h3 {
    margin: 0 0 10px;
    color: #520505;
    font-size: 1.5rem;
}

.director-modal-meta p {
    margin: 0;
    color: #374151;
    line-height: 1.7;
    font-size: 0.98rem;
}

.director-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: 0;
    color: #6b7280;
    font-size: 1.9rem;
    cursor: pointer;
    z-index: 2;
}

.director-modal-close:hover {
    color: #520505;
}

/* ===== ABSOLVENTI - BALTAS KARTES ===== */
.alumni-section {
    margin-bottom: 80px;
    position: relative;
    z-index: 3;
}

.alumni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.alumni-card {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    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;
    position: relative;
    overflow: hidden;
}

.alumni-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #520505, #ffcc00);
}

.alumni-photo {
    width: 100px;
    height: 100px;
    background: #520505;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 3rem;
    border: 3px solid #ffcc00;
    transition: all 0.3s;
}

.alumni-photo-trigger {
    border: none;
    padding: 0;
    cursor: zoom-in;
}

.alumni-photo-trigger img {
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

@media (hover: hover) {
    .alumni-photo-trigger:hover img {
        transform: scale(1.06);
        filter: brightness(1.05);
        box-shadow: 0 0 0 4px rgba(82, 5, 5, 0.25);
    }
}

.alumni-photo-trigger:focus-visible {
    outline: 3px solid #ffcc00;
    outline-offset: 3px;
}

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

.alumni-year {
    font-size: 1rem;
    color: #ffcc00;
    font-weight: 600;
    margin-bottom: 15px;
    background: rgba(82,5,5,0.05);
    padding: 5px 10px;
    border-radius: 30px;
    display: inline-block;
}

.alumni-card p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== FAKTI - BORDO KARTES ===== */
.facts-section {
    margin-bottom: 80px;
    position: relative;
    z-index: 3;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.fact-item {
    background: #520505;
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(82,5,5,0.15);
    border: 1px solid #ffcc00;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.fact-item::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,204,0,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s;
}

.fact-item i {
    font-size: 2.5rem;
    color: #ffcc00;
}

.fact-item span {
    font-size: 1.1rem;
    color: white;
    font-weight: 500;
}

/* ===== FOTO GALERIJA - BALTAS KARTES ===== */
.gallery-section {
    margin-bottom: 40px;
    position: relative;
    z-index: 3;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

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

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 35px rgba(82,5,5,0.2);
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, #520505, transparent);
    color: white;
    padding: 20px 15px 15px;
    font-weight: 500;
    font-size: 1rem;
    transform: translateY(0);
}

/* ===== RESPONSĪVAIS DIZAINS ===== */
@media (max-width: 992px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .timeline-container::before {
        left: 30px;
    }
    
    .timeline-year {
        left: 30px;
        transform: none;
        font-size: 1.1rem;
        padding: 10px 25px;
    }
    
    .timeline-block,
    .timeline-block:nth-child(even) {
        justify-content: flex-end;
    }
    
    .timeline-content,
    .timeline-block:nth-child(odd) .timeline-content,
    .timeline-block:nth-child(even) .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
        margin-right: 0 !important;
    }
    
    .timeline-card {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .section-heading {
        font-size: 1.8rem;
    }
    
    .directors-grid,
    .alumni-grid,
    .facts-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline-card h3 {
        font-size: 1.2rem;
    }
    
    .timeline-card p {
        font-size: 0.95rem;
    }

    .director-modal-content {
        grid-template-columns: 1fr;
        max-height: 90vh;
        overflow-y: auto;
    }

    .director-modal-image {
        min-height: 220px;
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-heading {
        font-size: 1.6rem;
    }
    
    .directors-grid,
    .alumni-grid,
    .facts-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-year {
        left: 20px;
        font-size: 1rem;
        padding: 8px 20px;
    }
    
    .timeline-content,
    .timeline-block:nth-child(odd) .timeline-content,
    .timeline-block:nth-child(even) .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
    }
    
    .timeline-card {
        padding: 20px;
    }
    
    .alumni-photo {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
}