/* css/resources.css */
/* Базові стилі (*, body, .page-wrapper, h1-h6, footer.main-footer) — у global.css.
   Тут лише компоненти, специфічні для resources.html. */

/* === Page header === */

.course-header {
    text-align: center;
    margin-bottom: 20px;
    color: #4b0082;
}

.course-header h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 5px;
}

.course-header p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #555;
}


/* === Resource sections === */

.resource-section {
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--color-border-soft-purple);
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease-out;
}

/* Canonical fadeIn — з lessons.css, translateY(15px) */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

.resource-section h2 {
    color: #ff6347;
    font-size: clamp(1.5rem, 4.5vw, 2rem);
    margin-bottom: 18px;
    border-bottom: 2px dashed #ff6347;
    padding-bottom: 8px;
}

.resource-section h3 {
    color: #00796b;
    font-size: clamp(1.2rem, 3.8vw, 1.6rem);
    margin-top: 25px;
    margin-bottom: 12px;
}

.resource-section p,
.resource-section li {
    font-size: clamp(0.95rem, 2.8vw, 1.1rem);
    margin-bottom: 12px;
}

.resource-section ul {
    list-style-position: outside;
    list-style-type: '🐌';
    padding-left: 30px;
}

.resource-section ul li {
    padding-left: 8px;
}


/* === Resource items === */
/* Семантика: нейтральна картка ресурсу, не педагогічний callout.
   Тому тут використовуються shared card/token values, а не tips/why-important palette. */

.resource-item {
    background-color: var(--color-surface-card);
    border: 1px solid var(--color-border-soft-blue);
    padding: 18px 20px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.resource-item h4 {
    color: #4b0082;
    font-size: clamp(1.1rem, 3.2vw, 1.3rem);
    margin-bottom: 10px;
}

/* resource-link: використовує .btn.btn-success з global.css.
   HTML: <a href="..." class="btn btn-success resource-link">Завантажити</a> */
.resource-item .resource-link {
    margin-top: 10px;
}


/* === Coming soon badge === */

.coming-soon {
    font-style: italic;
    color: #78909c;
    font-size: 0.95rem;
    background-color: #f0f4f8;
    padding: 5px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}


/* === Bottom navigation ===
   Кнопки: <a class="btn btn-success"> і <a class="btn btn-primary"> з global.css.
   .main-btn / .editor-btn тут не визначаються — це порушення guide. */

.nav-buttons-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-top: 35px;
    margin-bottom: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}


/* === Responsive === */

@media (max-width: 768px) {
    .resource-section {
        padding: 15px;
    }

    .resource-section h2 {
        font-size: clamp(1.4rem, 5vw, 1.8rem);
    }

    .resource-section h3 {
        font-size: clamp(1.2rem, 4vw, 1.4rem);
    }

    .resource-item h4 {
        font-size: clamp(1.1rem, 3.5vw, 1.3rem);
    }

    .resource-item .resource-link {
        display: block;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .nav-buttons-footer {
        flex-direction: column;
    }

    .nav-buttons-footer .btn {
        width: 90%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .nav-buttons-footer .btn:not(:last-child) {
        margin-bottom: 10px;
    }
}
