/* Vadibas kontaktu kartisu un hierarhijas stili. */

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

.direktors-card,
.vietnieks-card,
.metodiskais-card,
.administracija-card,
.kontakti-box {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.direktors-card { animation-delay: 0.1s; }

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

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

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

/* ===== VADĪBAS LAPA ===== */
.vadiba-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;
}

/* 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;
}

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

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

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

/* ===== DIREKTORS - BALTA KARTE ===== */
.direktors-section {
    margin-bottom: 60px;
    position: relative;
}

.direktors-card {
    background: white;
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(82,5,5,0.15);
    border: 1px solid rgba(82,5,5,0.1);
    display: flex;
    align-items: center;
    gap: 50px;
    position: relative;
    overflow: hidden;
}

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

.direktors-foto {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #520505, #7a0f0f);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    flex-shrink: 0;
    border: 5px solid #ffcc00;
    box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.45), 0 20px 30px rgba(82,5,5,0.2);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.direktors-foto-trigger {
    border: none;
    padding: 0;
    cursor: zoom-in;
}

.direktors-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

@media (hover: hover) {
    .direktors-foto-trigger:hover {
        border-color: #ffd84d;
        box-shadow: 0 0 0 6px rgba(255, 204, 0, 0.6), 0 24px 36px rgba(82,5,5,0.25);
    }

    .direktors-foto-trigger:hover img {
        transform: scale(1.06);
        filter: brightness(1.05);
    }
}

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

.direktors-info {
    flex: 1;
}

.direktors-info h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: #520505;
    margin-bottom: 5px;
}

.direktors-amats {
    font-size: 1.3rem;
    color: #ffcc00;
    font-weight: 600;
    margin-bottom: 20px;
}

.direktors-kontakti {
    margin-bottom: 20px;
}

.direktors-kontakti p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    margin-bottom: 8px;
}

.direktors-kontakti i {
    color: #ffcc00;
    width: 20px;
}

.direktors-kontakti a {
    color: #520505;
    text-decoration: none;
    transition: color 0.2s;
}

.direktors-kontakti a:hover {
    color: #7a0f0f;
    text-decoration: underline;
}

.direktors-apraksts {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

/* ===== DIREKTORA VIETNIEKI - BORDO KARTES ===== */
.vietnieki-section {
    margin-bottom: 60px;
    position: relative;
}

.vietnieki-section .section-heading {
    color: #520505;
}

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

.vietnieks-card {
    background: #520505;
    border-radius: 20px;
    padding: 30px 25px;
    box-shadow: 0 15px 35px rgba(82,5,5,0.25);
    border: 2px solid #ffcc00;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.vietnieks-card:hover {
    transform: none;
    box-shadow: 0 15px 35px rgba(82,5,5,0.25);
    background: #520505;
}

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

.vietnieks-card:hover::before {
    opacity: 0;
}

.vietnieks-foto {
    width: 116px;
    height: 116px;
    background: #ffcc00;
    color: #520505;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 15px;
    transition: all 0.3s;
    overflow: hidden;
}

.vietnieks-foto-trigger {
    border: none;
    padding: 0;
    cursor: zoom-in;
}

.vietnieks-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.vietnieks-card:hover .vietnieks-foto {
    background: #ffcc00;
    transform: none;
}

@media (hover: hover) {
    .vietnieks-foto-trigger:hover {
        box-shadow: 0 0 0 4px rgba(255, 204, 0, 0.45);
    }

    .vietnieks-foto-trigger:hover img {
        transform: scale(1.06);
        filter: brightness(1.05);
    }
}

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

.vietnieks-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    margin-bottom: 5px;
    text-align: center;
}

.vietnieks-amats {
    font-size: 1rem;
    color: #ffcc00;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

.vietnieks-kontakti {
    margin-bottom: 15px;
}

.vietnieks-kontakti p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.vietnieks-kontakti i {
    color: #ffcc00;
    width: 16px;
}

.vietnieks-kontakti a {
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

.vietnieks-kontakti a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.vietnieks-pienakumi {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 15px;
}

/* ===== METODISKO KOMISIJU VADĪTĀJI - BALTAS KARTES ===== */
.metodiskie-section {
    margin-bottom: 60px;
    position: relative;
}

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

.metodiskais-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    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;
}

.metodiskais-card:hover {
    transform: none;
    box-shadow: 0 10px 25px rgba(82,5,5,0.05);
    border-color: rgba(82,5,5,0.1);
}

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

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

.metodiskais-prieksmets {
    font-size: 0.95rem;
    color: #ffcc00;
    font-weight: 500;
    margin-bottom: 10px;
}

.metodiskais-card p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2d3748;
    font-size: 0.9rem;
}

.metodiskais-card i {
    color: #ffcc00;
    width: 16px;
}

.metodiskais-card a {
    color: #520505;
    text-decoration: none;
}

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

/* ===== ADMINISTRATĪVAIS PERSONĀLS - BORDO KARTES ===== */
.administracija-section {
    margin-bottom: 60px;
    position: relative;
}

.administracija-section .section-heading {
    color: #520505;
}

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

.administracija-card {
    background: #520505;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 15px 35px rgba(82,5,5,0.25);
    border: 2px solid #ffcc00;
    transition: all 0.3s;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.administracija-card:hover {
    transform: none;
    box-shadow: 0 15px 35px rgba(82,5,5,0.25);
    background: #520505;
}

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

.administracija-card:hover::before {
    opacity: 0;
}

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

.administracija-amats {
    font-size: 0.95rem;
    color: #ffcc00;
    font-weight: 500;
    margin-bottom: 15px;
}

.administracija-card p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: white;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.administracija-card i {
    color: #ffcc00;
    width: 16px;
}

.administracija-card a {
    color: white;
    text-decoration: none;
    transition: color 0.2s;
}

.administracija-card a:hover {
    color: #ffcc00;
    text-decoration: underline;
}

/* ===== KONTAKTINFORMĀCIJA - BALTA KARTE ===== */
.kontakti-info {
    margin-bottom: 40px;
    position: relative;
}

.kontakti-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    border-left: 5px solid #ffcc00;
    box-shadow: 0 10px 25px rgba(82,5,5,0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.kontakti-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(82,5,5,0.15);
}

.kontakti-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,204,0,0.1) 0%, transparent 70%);
}

.kontakti-box h3 {
    font-size: 1.3rem;
    color: #520505;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kontakti-box p {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2d3748;
    margin-bottom: 10px;
    line-height: 1.6;
}

.kontakti-box i {
    color: #ffcc00;
    width: 20px;
}

.kontakti-box a {
    color: #520505;
    text-decoration: none;
    transition: color 0.2s;
}

.kontakti-box a:hover {
    color: #7a0f0f;
    text-decoration: underline;
}

/* ===== RESPONSĪVAIS DIZAINS ===== */
@media (max-width: 992px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .direktors-card {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }
    
    .direktors-kontakti p {
        justify-content: center;
    }
    
    .vietnieki-grid,
    .administracija-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .section-heading {
        font-size: 1.8rem;
    }
    
    .direktors-foto {
        width: 150px;
        height: 150px;
        font-size: 5rem;
    }
    
    .direktors-info h2 {
        font-size: 1.8rem;
    }
    
    .direktors-amats {
        font-size: 1.1rem;
    }
    
    .vietnieki-grid,
    .administracija-grid {
        grid-template-columns: 1fr;
    }
    
    .metodiskie-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-heading {
        font-size: 1.6rem;
    }
    
    .direktors-card {
        padding: 20px;
    }
    
    .direktors-foto {
        width: 120px;
        height: 120px;
        font-size: 4rem;
    }
    
    .direktors-info h2 {
        font-size: 1.5rem;
    }
    
    .vietnieki-grid,
    .administracija-grid {
        grid-template-columns: 1fr;
    }
    
    .metodiskie-grid {
        grid-template-columns: 1fr;
    }
    
    .kontakti-box {
        padding: 20px;
    }
}