:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --accent-color: #38bdf8;
    --exam-card-bg: #1d4ed8;
    --exam-text: #ffffff;
    --recruitment-bg: #065f46;
    --recruitment-text: #ffffff;
    --teachers-bg: #5b21b6;
    --teachers-text: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at top right, rgba(56, 189, 248, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(30, 41, 59, 0.5), transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
}

/* RESPONSIVE LAYOUT - Domyślnie na telefony (jedna kolumna) */
.wrapper {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Na monitory (Siatka 2-kolumnowa od 1024px) */
@media (min-width: 1024px) {
    .wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
    .main-service {
        grid-column: span 2;
    }

}

/* Główne kontenery kart */
.container {
    text-align: center;
    width: 100%;
    padding: 20px 30px;
    background-color: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.divider {
    height: 1px;
    width: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 auto 12px auto;
}

.footer {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Ilustracja prac serwisowych przechowywana w osobnym pliku SVG */
.maintenance-illustration {
    width: min(100%, 760px);
    margin: 0 auto 12px;
}

.maintenance-illustration img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}

/* Sekcja: Egzaminy Poprawkowe */
.exam-section {
    text-align: center;
    width: 100%;
    padding: 35px 30px;
    background-color: var(--exam-card-bg);
    background-image: linear-gradient(135deg, #1d4ed8 0%, #111827 100%);
    border-radius: 16px;
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.exam-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 35px -10px rgba(0, 0, 0, 0.6);
}

.exam-title {
    color: var(--exam-text);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.exam-desc {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.exam-button {
    display: inline-block;
    width: 100%;
    padding: 16px 32px;
    background-color: #ffffff;
    color: #111827;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
}

.exam-button:hover {
    background-color: #f1f5f9;
    transform: scale(1.01);
}

.exam-button:focus-visible {
    outline: 4px solid var(--accent-color);
    outline-offset: 4px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    align-self: center;
}

.badge-dot {
    width: 10px;
    height: 10px;
    background-color: #f87171;
    border-radius: 50%;
    animation: blink 2s infinite;
}

/* Sekcja: Rekrutacja */
.recruitment-section {
    width: 100%;
    padding: 40px 30px;
    text-align: center;
    background-color: var(--recruitment-bg);
    background-image:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 32%),
        linear-gradient(135deg, #065f46 0%, #043e2e 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 16px;
    box-shadow: 0 20px 30px -10px rgba(4, 62, 46, 0.58);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (min-width: 1024px) {
    .recruitment-section {
        grid-column: span 2;
    }
}

.recruitment-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 35px -10px rgba(4, 62, 46, 0.7);
}

.recruitment-title {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: clamp(1.7rem, 4vw, 2.15rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.recruitment-lead {
    max-width: 860px;
    margin: 0 auto 12px;
    color: #ffffff;
    font-size: 1.16rem;
    font-weight: 700;
    line-height: 1.55;
}

.recruitment-invitation {
    max-width: 820px;
    margin: 0 auto 24px;
    color: #ecfdf5;
    font-size: 1.05rem;
    line-height: 1.55;
}

.recruitment-places {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    max-width: 1040px;
    padding: 0;
    margin: 0 auto 20px;
    list-style: none;
    text-align: left;
}

@media (min-width: 700px) {
    .recruitment-places {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1050px) {
    .recruitment-places {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.recruitment-place {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 86px;
    padding: 16px 18px;
    color: #052e25;
    background-color: #ffffff;
    border: 2px solid #a7f3d0;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
}

.recruitment-program {
    font-size: 1.02rem;
    font-weight: 750;
    line-height: 1.35;
}

.recruitment-count {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    min-height: 48px;
    padding: 8px 11px;
    color: #3f2300;
    background-color: #fef3c7;
    border: 2px solid #d97706;
    border-radius: 9px;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}


.recruitment-button {
    display: inline-block;
    width: min(100%, 560px);
    padding: 16px 26px;
    color: #043e2e;
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.recruitment-button:hover {
    background-color: #ecfdf5;
    border-color: #6ee7b7;
    transform: translateY(-1px);
}

.recruitment-button:focus-visible {
    outline: 4px solid #fde047;
    outline-offset: 4px;
}

.badge-green {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    margin-bottom: 16px;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-dot-green {
    width: 10px;
    height: 10px;
    background-color: #fde047;
    border: 2px solid #ffffff;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@media (max-width: 560px) {
    .recruitment-section {
        padding: 32px 20px;
    }

    .recruitment-place {
        align-items: flex-start;
        flex-direction: column;
    }

    .recruitment-count {
        min-width: 0;
    }
}

/* Sekcja: Dla Nauczycieli */
.teachers-section {
    text-align: center;
    width: 100%;
    padding: 35px 30px;
    background-color: var(--teachers-bg);
    background-image: linear-gradient(135deg, #5b21b6 0%, #3b0764 100%);
    border-radius: 16px;
    box-shadow: 0 20px 30px -10px rgba(59, 7, 100, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.teachers-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 35px -10px rgba(59, 7, 100, 0.6);
}

.teachers-title {
    color: var(--teachers-text);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.teachers-desc {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: auto;
}

.teacher-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 20px;
    background-color: #ffffff;
    color: #2e0854;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.teacher-btn:hover {
    background-color: #f1f5f9;
    transform: scale(1.01);
}

.teacher-btn:focus-visible {
    outline: 4px solid var(--accent-color);
    outline-offset: 4px;
}

.badge-purple {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    align-self: center;
}

.badge-dot-purple {
    width: 10px;
    height: 10px;
    background-color: #c084fc;
    border-radius: 50%;
    animation: blink 2s infinite;
}

/* Definicje klatek animacji kluczowych */
@keyframes spin-clockwise { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes spin-counter-clockwise { 0% { transform: rotate(360deg); } 100% { transform: rotate(0deg); } }
@keyframes terminal-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes progress-move { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Obsługa użytkowników z redukcją ruchu systemowego (Zasada WCAG) */
@media (prefers-reduced-motion: reduce) {
    *, .badge-dot, .badge-dot-green, .badge-dot-purple {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Sekcja: Zestaw podręczników */
.textbooks-section {
    width: 100%;
    padding: 35px 30px;
    text-align: center;
    background-color: #78350f;
    background-image: linear-gradient(135deg, #78350f 0%, #431407 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    box-shadow: 0 20px 30px -10px rgba(67, 20, 7, 0.6);
}

/* Sekcja zajmuje całą szerokość siatki na dużym ekranie */
@media (min-width: 1024px) {
    .textbooks-section {
        grid-column: span 2;
    }
}

.textbooks-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 7px 15px;
    margin-bottom: 16px;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.textbooks-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 24px;
    padding: 2px 6px;
    color: #431407;
    background-color: #fde68a;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 800;
}

.textbooks-title {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.25;
}

.textbooks-desc {
    max-width: 760px;
    margin: 0 auto 26px;
    color: #ffffff;
    font-size: 1.08rem;
    line-height: 1.6;
}

.textbooks-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0;
    margin: 0;
    list-style: none;
    text-align: left;
}

@media (min-width: 760px) {
    .textbooks-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.textbooks-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 104px;
    height: 100%;
    padding: 18px 20px;
    color: #2b1205;
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 12px;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.textbooks-link:hover {
    background-color: #fff7ed;
    border-color: #f59e0b;
    transform: translateY(-2px);
}

.textbooks-link:focus-visible {
    outline: 4px solid #fde047;
    outline-offset: 4px;
}

.textbooks-link-content {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.textbooks-link-content strong {
    display: block;
    color: #2b1205;
    font-size: 1.02rem;
    line-height: 1.35;
}

.textbooks-file-type {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    color: #ffffff;
    background-color: #9a3412;
    border-radius: 9px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.textbooks-link-info {
    display: block;
    margin-top: 5px;
    color: #713f12;
    font-size: 0.9rem;
    font-weight: 600;
}

.textbooks-link-action {
    flex: 0 0 auto;
    color: #7c2d12;
    font-size: 0.95rem;
    font-weight: 800;
}

@media (max-width: 560px) {
    .textbooks-section {
        padding: 30px 20px;
    }

    .textbooks-link {
        align-items: flex-start;
        flex-direction: column;
    }

    .textbooks-link-action {
        margin-left: 62px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .textbooks-link {
        transition: none;
    }

    .textbooks-link:hover {
        transform: none;
    }
}