html, body {
    height: 100%;
    margin: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 0 0 12px 12px;
    background: #ffffff;
    color: #111827;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.18);
    transition: top 0.2s ease;
}

.skip-link:focus,
.skip-link:focus-visible {
    top: 0;
    outline: 3px solid #5a67d8;
    outline-offset: 2px;
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../../../img/main.png');
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: -2;
}

.levels-zone {
    background-color: #7189d821;
    min-height: 100vh;
    padding: 50px 20px;
}

.page-header-section {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    font-weight: 700;
    color: #4a5568;
}

.page-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 10px;
}

.page-subtitle {
    color: #4b5563;
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.levels-list {
    align-items: stretch;
}

.levels-list > li {
    display: flex;
}

.education-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    overflow: hidden;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 250px;
    border: 1px solid #d3d3d3;
    background-color: #ffffffbb;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.education-card-button {
    appearance: none;
    border: 0;
    font: inherit;
    color: inherit;
    text-align: center;
}

.education-card-button:focus-visible,
a:focus-visible {
    outline: 3px solid #5a67d8;
    outline-offset: 3px;
}

.highschool-card-theme {
    background-color: rgba(241, 206, 255, 0.561);
}

.education-card:not(.is-unavailable):hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    background-color: #ffbb0067;
}

.is-unavailable {
    cursor: default;
    opacity: 0.84;
}

.is-unavailable:hover {
    transform: none;
    box-shadow: none;
    background-color: #ffffffbb;
}

.card-state {
    display: inline-block;
    width: max-content;
    margin: 0 auto 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-soon {
    background: #eef2ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.badge-available {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.card-title {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0;
}

h2.card-title {
    margin-top: 0;
}

.card-level {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0;
}

.card-description {
    color: #4b5563;
    margin-bottom: 0;
}

.card-cta {
    display: inline-block;
    margin-top: auto;
    padding: 10px 16px;
    border-radius: 12px;
    background: #5a67d8;
    color: #ffffff;
    font-weight: 700;
}

.education-card-button:hover .card-cta,
.education-card-button:focus-visible .card-cta {
    background: #4c51bf;
}

.footer {
    text-align: center;
    padding: 20px 0;
    color: #2b2b2b;
}

.footer .brand {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
}

.logo-rotate {
    display: inline-block;
    animation: logo-spin 30s linear infinite;
    transform-origin: center;
}

#book-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.falling-book {
    position: absolute;
    top: -100px;
    animation: fall linear infinite;
    pointer-events: none;
    opacity: 0.8;
}

.ribbon {
    width: 150px;
    height: 150px;
    overflow: hidden;
    position: absolute;
    top: -10px;
    right: -10px;
}

.ribbon span {
    position: absolute;
    display: block;
    width: 200px;
    padding: 5px 0;
    background: #ffc107;
    color: #000;
    font-weight: bold;
    text-align: center;
    transform: rotate(45deg);
    top: 30px;
    right: -50px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

@keyframes fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(110vh) rotate(90deg);
        opacity: 0.2;
    }
}

@keyframes logo-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
    #book-container,
    .falling-book {
        display: none !important;
    }

    .education-card,
    .education-card-button,
    .skip-link {
        transition: none;
    }

    .logo-rotate {
        animation: none;
    }
}
