/* Stundu laiku tabulu un laika bloku stili. */

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

.dokumenta-section,
.konsultacija-card,
.pusdienas-card,
.info-box {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.dokumenta-section { animation-delay: 0.1s; }

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

.pusdienas-card:nth-child(1) { animation-delay: 0.45s; }
.pusdienas-card:nth-child(2) { animation-delay: 0.5s; }
.pusdienas-card:nth-child(3) { animation-delay: 0.55s; }

.info-box { animation-delay: 0.6s; }

/* ===== STUNDU LAIKU LAPA ===== */
.stundu-laiki-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: 50px;
    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: 30px;
    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;
}

/* ===== DOKUMENTA SEKCIJA (aizvieto zvanu grafiku) ===== */
.dokumenta-section {
    margin-bottom: 50px;
    position: relative;
    z-index: 3;
}

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

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

.dokumenta-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #520505, #7a0f0f);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    flex-shrink: 0;
    border: 3px solid #ffcc00;
    box-shadow: 0 10px 20px rgba(82,5,5,0.2);
}

.dokumenta-content {
    flex: 1;
}

.dokumenta-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 10px;
}

.dokumenta-content p {
    font-size: 1.1rem;
    color: #2d3748;
    margin-bottom: 20px;
}

.dokumenta-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #520505;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #ffcc00;
}

.dokumenta-link:hover {
    background: #7a0f0f;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(82,5,5,0.2);
}

.dokumenta-link i {
    transition: transform 0.3s;
}

.dokumenta-link:hover i {
    transform: translateX(5px);
}

.stundu-section-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.stundu-section-header .section-heading {
    grid-column: 2;
    margin-bottom: 0;
    text-align: center;
}

.stundu-section-header .section-heading::after {
    left: 50%;
    transform: translateX(-50%);
}

.stundu-section-header .stundu-admin-btn {
    grid-column: 3;
    justify-self: end;
}

.stundu-admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #520505;
    color: #fff;
    border: 2px solid #ffcc00;
    border-radius: 999px;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.stundu-admin-btn:hover {
    background: #7a0f0f;
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(82, 5, 5, 0.16);
}

.stundu-section-message {
    margin-bottom: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
}

.stundu-section-message.success {
    background: #ecfdf3;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.stundu-section-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.stundu-card-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.stundu-icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stundu-icon-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.stundu-icon-btn.delete {
    background: rgba(127, 29, 29, 0.45);
}

.pusdienas-card .stundu-icon-btn,
.pusdienas-card .stundu-icon-btn.delete {
    background: #520505;
    color: #fff !important;
}

.pusdienas-card .stundu-icon-btn i,
.pusdienas-card .stundu-icon-btn.delete i {
    color: #fff !important;
}

.pusdienas-card .stundu-icon-btn:hover,
.pusdienas-card .stundu-icon-btn.delete:hover {
    background: #7a0f0f;
}

.stundu-empty-state {
    grid-column: 1 / -1;
    background: white;
    border-radius: 20px;
    padding: 28px 24px;
    text-align: center;
    border: 1px dashed rgba(82, 5, 5, 0.2);
    box-shadow: 0 10px 25px rgba(82, 5, 5, 0.06);
}

.stundu-empty-state i {
    font-size: 2rem;
    color: #520505;
    margin-bottom: 10px;
}

.stundu-empty-state h3 {
    margin-bottom: 8px;
    color: #520505;
}

.stundu-empty-state p {
    color: #4b5563;
    justify-content: center;
}

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

.stundu-modal-content {
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.stundu-modal-content-small {
    max-width: 520px;
}

.stundu-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.stundu-modal-header h3 {
    margin: 0;
    color: #520505;
    font-size: 1.2rem;
}

.stundu-modal-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.stundu-modal-form {
    padding: 24px;
}

.stundu-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.stundu-form-grid.single-column {
    grid-template-columns: 1fr;
}

.stundu-form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #374151;
}

.stundu-form-group input,
.stundu-form-group select,
.stundu-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.95rem;
    background: #fff;
}

.stundu-form-group input:focus,
.stundu-form-group select:focus,
.stundu-form-group textarea:focus {
    outline: none;
    border-color: #520505;
    box-shadow: 0 0 0 3px rgba(82, 5, 5, 0.08);
}

.stundu-form-error {
    color: #dc2626;
    font-size: 0.8rem;
    margin-top: 4px;
}

.stundu-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.stundu-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.stundu-modal-btn.primary {
    background: #520505;
    color: #fff;
}

.stundu-modal-btn.primary:hover {
    background: #7a0f0f;
}

.stundu-modal-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stundu-modal-btn.secondary {
    background: #e5e7eb;
    color: #111827;
}

.stundu-modal-btn.secondary:hover {
    background: #d1d5db;
}

.stundu-modal-btn.danger {
    background: #b91c1c;
    color: #fff;
}

.stundu-modal-btn.danger:hover {
    background: #991b1b;
}

.stundu-delete-text {
    padding: 16px 24px 0;
    color: #374151;
    margin: 0;
}

/* ===== KONSULTĀCIJAS ===== */
.konsultacijas-section {
    margin-bottom: 50px;
    position: relative;
    z-index: 3;
}

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

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

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

.konsultacija-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ffcc00;
}

.konsultacija-card p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.konsultacija-card i {
    color: #ffcc00;
    width: 18px;
}

/* ===== PUSDIENAS ===== */
.pusdienas-section {
    margin-bottom: 50px;
    position: relative;
    z-index: 3;
}

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

.pusdienas-card {
    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: none;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

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

.pusdienas-card p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #2d3748;
    margin-bottom: 5px;
}

.pusdienas-card i {
    color: #ffcc00;
}

/* ===== PIEZĪMES UN INFORMĀCIJA ===== */
.piezime {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: rgba(255,204,0,0.1);
    border-radius: 12px;
    border-left: 4px solid #ffcc00;
}

.piezime i {
    color: #ffcc00;
    font-size: 1.2rem;
}

.piezime p {
    color: #2d3748;
    font-size: 0.95rem;
}

.info-section {
    margin-top: 30px;
    position: relative;
    z-index: 3;
}

.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;
    position: relative;
    overflow: hidden;
}

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

.info-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%);
}

.info-box i {
    font-size: 2rem;
    color: #ffcc00;
    position: relative;
    z-index: 2;
}

.info-box h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #520505;
    margin-bottom: 5px;
    position: relative;
    z-index: 2;
}

.info-box p {
    color: #2d3748;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* ===== RESPONSĪVAIS DIZAINS ===== */
@media (max-width: 992px) {
    .page-title {
        font-size: 2.2rem;
    }
    
    .konsultacijas-grid,
    .pusdienas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dokumenta-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2rem;
    }
    
    .section-heading {
        font-size: 1.8rem;
    }
    
    .dokumenta-card {
        padding: 30px;
    }
    
    .dokumenta-icon {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .dokumenta-content h2 {
        font-size: 1.5rem;
    }
    
    .dokumenta-content p {
        font-size: 1rem;
    }

    .stundu-section-header {
        grid-template-columns: 1fr;
    }

    .stundu-section-header .section-heading,
    .stundu-section-header .stundu-admin-btn {
        grid-column: auto;
        justify-self: center;
    }

    .stundu-admin-btn {
        justify-content: center;
    }

    .stundu-form-grid {
        grid-template-columns: 1fr;
    }
    
    .info-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .section-heading {
        font-size: 1.6rem;
    }
    
    .konsultacijas-grid,
    .pusdienas-grid {
        grid-template-columns: 1fr;
    }
    
    .dokumenta-card {
        padding: 20px;
    }
    
    .dokumenta-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .dokumenta-link {
        width: 100%;
        justify-content: center;
    }
    
    .piezime {
        flex-direction: column;
        text-align: center;
    }
}