/* глобальні стилі */
* {
    box-sizing: border-box;
}

/* Загальні стилі для всіх елементів */
html, body {
    font-family: Arial, sans-serif;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    color: #333;
}

/* Загальні стилі для header */
header {
    background-color: #fff;
    padding: 0;
    margin: 0 auto;
    width: 90%;
    max-width: 1200px;
    text-align: left;
    position: relative;
    align-items: center; /* Центруємо по вертикалі */
}

header img {
    width: auto;
    height: auto;
}



header > nav {
    background-color: #dedcdc;
    padding: 5px 10px; /* Зменшено padding */
    margin: 0;
    width: fit-content;
    margin-left: auto;
    border-radius: 4px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

nav ul {
    list-style-type: none;
    margin: 0; /* Видаляємо зайвий margin */
    padding: 0; /* Видаляємо зайвий padding */
    display: flex; /* Використовуємо flex для вирівнювання елементів */
    justify-content: flex-end; /* Вирівнюємо посилання справа */
}

nav ul li {
    margin: 0 10px; /* Нормалізуємо відстань між елементами меню */
}

nav ul li a {
    color: #000;
    text-decoration: none;
    font-size: 16px;
    font-weight: normal;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* Стилі для основного контенту */
main {
    flex: 1;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;

    background-image: url(img/homeconspect.jpg) ; 
    background-size: 40%;
    background-position: bottom right;
    background-repeat: no-repeat;
}


section h2 {
    font-size: 24px;
    color: #436fb6;
    margin-bottom: 10px;
}

section p {
    font-size: 20px;
    line-height: 1.6;
}

.button {
    display: inline-block;
    background-color: #c2d7f2;
    
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
}

.button a {
    color: #333;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 16px;
    display: block;
}

.button:hover {
    background-color: #a6c2e7;
}

/* Стилі для футера */
footer {
    background-color: #fff;
    color: #c2c0c0;
    text-align: center;
    padding: 10px;
    width: 100%;
    margin-top: auto;
}




/* Макет для трьох колонок */
.catalog-layout {
    display: grid;
    grid-template-columns: 1fr 2.5fr 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Ліва колонка */
.sidebar-left {
    padding: 10px;
    border-radius: 10px;
    border: solid 1px #dedcdc;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 8px;
}

.category-list li a {
    text-decoration: none;
    color: #003366;
}

.category-list li a:hover {
    text-decoration: underline;
}

/* Центр */
.content {
    padding: 10px;
    border-radius: 6px;
}

/* Права колонка (AdSense) */
.sidebar-right {
    padding: 10px;
    text-align: center;
    border-radius: 6px;
}

.adsense-box {
    padding: 18px;
}


.breadcrumbs {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}
.breadcrumbs a {
    color: #337ab7;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}



/* Список класів в рядок */
.class-list {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px; /* Відстань між елементами */
}

/* Квадратики або прямокутники */
.class-list li {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px 10px;
    min-width: 80px;
    text-align: center;
    transition: background-color 0.2s ease;
}

.class-list li:hover {
    background-color: #e1eaff;
}

/* Посилання всередині квадратика */
.class-list li a {
    display: block;
    color: #003366;
    text-decoration: none;
    
    font-size: 14px;
}

.class-list li a:hover {
    text-decoration: underline;
}

.class-list li a.active {
    font-weight: bold;
}




.material-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.material-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #fff;
    transition: background-color 0.2s;
}

.material-item:hover {
    background-color: #f9f9f9;
}

.material-title {
    font-size: 1rem;
    color: #0073e6;
    text-decoration: none;
    display: inline-block;
    width: 100%;
}

.material-title:hover {
    text-decoration: underline;
}


.material-random-list {
    list-style: none;
}

.material-page {
    background: #fff;
    padding: 2rem;
    margin-top: 1rem;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.materialpage-title {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}

.btn-download {
    text-decoration: none;
    color: #333;
    font-size: 0.95em;
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    border: 1px solid #ddd;
    padding: 0.4em 0.7em;
    border-radius: 5px;
    background: #f9f9f9;
    transition: background 0.2s;
}

.btn-download:hover {
    background: #f1f1f1;
}


.class-random-list {
    display: inline-block;
    margin-left: 1.5rem;
    padding: 2px 6px;
    font-size: 0.8rem;
    background: #f0f0f0;
    color: #555;
    border-radius: 4px;
    text-decoration: none;
}
.class-random-list:hover {
    background: #e0e0e0;
    color: #333;
}



.subject-random-list {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 2px 6px;
    font-size: 0.8rem;
    background: #d8ebff;
    color: #004080;
    border-radius: 4px;
    text-decoration: none;
}
.subject-random-list:hover {
    background: #c0defa;
    color: #002b66;
}

/* Форма зворотного зв’язку */
.feedback-form {
    background-color: #fdfdfd;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.feedback-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.feedback-form input[type="text"],
.feedback-form input[type="email"],
.feedback-form textarea,
.feedback-form input[type="file"] {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 15px;
    border: 1px solid #bbb;
    border-radius: 6px;
    font-size: 14px;
}

.feedback-form button[type="submit"] {
    background-color: #c2d7f2;
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

.feedback-form button[type="submit"]:hover {
    background-color: #a6c2e7;
}


.intro-text {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px 25px;
    background: #f9f9fb;
    border: 1px solid #e0e0e5;
    border-radius: 12px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    text-align: justify;
    transition: all 0.3s ease;
}

.intro-text:hover {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
