/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f9f9f9;
    color: #444;
    scroll-behavior: smooth;
    padding-top: 120px;     /* высота шапки + небольшой запас */
     /* background: red; */  /* Красный фон для проверки */ 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
header {
    background-color: #0000cc;
    color: #fff;
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 3px solid #808080;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    body {
        padding-top: 160px; /* побольше для мобильных */
    }
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

header p {
    font-style: italic;
    font-size: 0.9rem;
    opacity: 0.9;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 20px;
}

nav a:hover {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
}

/* Основные секции */
section {
    background: #fff;
    margin: 30px 0;
    padding: 30px 20px;
    border: 2px solid #808080;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.03);
    transition: box-shadow 0.3s ease;
}

section:hover {
    box-shadow: 0 15px 30px rgba(0,0,204,0.05);
}

h2 {
    color: #0000cc;
    margin-bottom: 20px;
    border-bottom: 3px solid #808080;
    padding-bottom: 10px;
    font-size: 2rem;
    font-weight: 500;
}

h3 {
    color: #0000cc;
    margin: 20px 0 10px;
    font-weight: 500;
}

/* Карточки */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    border: 2px solid #808080;
    border-radius: 18px;
    padding: 20px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 25px rgba(0,0,204,0.1);
    border-color: #0000cc;
}

.card h4 {
    color: #0000cc;
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 500;
}

.card p {
    font-size: 0.95rem;
    color: #555;
}

/* Таблицы */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 5px 10px rgba(0,0,0,0.03);
}

th, td {
    border: 1px solid #808080;
    padding: 14px 12px;
    text-align: left;
}

th {
    background-color: #0000cc;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.3px;
}

tr:nth-child(even) {
    background-color: #f8f8f8;
}

/* Галерея */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.gallery-item {
    border: 2px solid #808080;
    border-radius: 18px;
    height: 160px;
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    padding: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 10px rgba(0,0,0,0.02);
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: #0000cc;
    background-color: #f0f0f0;
}

/* FAQ */
.faq-item {
    margin-bottom: 20px;
    border-bottom: 1px dashed #aaa;
    padding-bottom: 18px;
}

.faq-question {
    font-weight: 600;
    color: #0000cc;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s;
}

.faq-question:hover {
    color: #000099;
}

.faq-answer {
    margin-top: 10px;
    padding-left: 25px;
    color: #555;
}

/* Кнопки */
.btn {
    display: inline-block;
    background-color: #0000cc;
    color: #fff;
    padding: 12px 28px;
    text-decoration: none;
    border: 2px solid #808080;
    border-radius: 40px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 5px 10px rgba(0,0,204,0.2);
    letter-spacing: 0.3px;
}

.btn:hover {
    background-color: #000099;
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0,0,204,0.25);
    border-color: #666;
}

/* Футер */
footer {
    background-color: #0000cc;
    color: #fff;
    text-align: center;
    padding: 25px 0;
    margin-top: 50px;
    border-top: 3px solid #808080;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.05);
}

footer a {
    color: #fff;
    text-decoration: underline;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.8;
}

/* Адаптивность */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        justify-content: center;
        margin-top: 15px;
    }

    h2 {
        font-size: 1.8rem;
    }
}