/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Шапка */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: #3180ce;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
}

.nav-list a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-list a:hover {
    color: #e67e22;
}

/* Мобильное меню */
.menu-icon {
    display: none;
    font-size: 30px;
    cursor: pointer;
    padding: 10px 20px;
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 200;
    color: #333;
}

#menu-toggle:checked ~ .header .nav {
    display: block;
}

@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }
    .header {
        position: relative;
    }
    .nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 99;
    }
    .nav-list {
        flex-direction: column;
        padding: 20px;
        gap: 10px;
    }
    .nav-list li {
        border-bottom: 1px solid #eee;
        padding: 8px 0;
    }
    #menu-toggle:checked ~ .header .nav {
        display: block;
    }
}

/* Hero секция */
.hero {
    background: linear-gradient(135deg, #3180ce20, #e67e2220);
    padding: 60px 20px;
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.hero-photo {
    flex: 0 0 200px;
}

.hero-photo img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    transform: rotate(-3deg);
    transition: transform 0.3s ease, box-shadow 0.3s;
    cursor: pointer;
}

.hero-photo.right img {
    transform: rotate(3deg);
}

.hero-photo img:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
}

.hero-text {
    flex: 1 1 auto;
    text-align: center;
    min-width: 300px;
}

.hero h1 {
    font-size: 3rem;
    color: #3180ce;
    margin-bottom: 10px;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #e67e22;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 30px;
    color: #555;
}

.btn {
    display: inline-block;
    background-color: #3180ce;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.btn:hover {
    background-color: #1f5a9e;
    transform: scale(1.05);
}

/* Секции */
.section {
    padding: 60px 20px;
}

.bg-light {
    background-color: #f0f0f0;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: #3180ce;
    position: relative;
}

.section-subtitle {
    text-align: center;
    font-size: 1.5rem;
    color: #e67e22;
}

.section-subtitle::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: #e67e22;
    margin: 15px auto 0;
    margin-bottom: 40px;
}

/* Блок О классе */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.about-text h3 {
    margin: 20px 0 10px;
    color: #3180ce;
}

.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px 15px;
}

.students-grid span {
    padding: 5px 8px;
    background-color: #f5f7fa;
    border-radius: 20px;
    text-align: center;
    font-size: 0.95rem;
    transition: transform 0.2s ease, background-color 0.2s, color 0.2s;
    display: inline-block;
    cursor: default;
}

.students-grid span:hover {
    transform: scale(1.05);
    background-color: #e67e22;
    color: white;
}

.about-photos {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.about-photos img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s;
    cursor: pointer;
}

.about-photos img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Отличники */
.students-excellent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px 20px;
    margin-top: 30px;
}

.student-card {
    text-align: center;
    transition: transform 0.3s ease;
}

.student-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.student-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.student-name {
    font-size: 1.1rem;
    font-weight: 500;
    color: #3180ce;
    transition: color 0.3s ease, transform 0.3s ease, background-color 0.3s;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
}

.student-card:hover .student-photo {
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.student-card:hover .student-photo img {
    transform: scale(1.1);
}

.student-card:hover .student-name {
    color: #e67e22;
    background-color: #fef5e7;
    transform: scale(1.05);
}

/* Достижения */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.achievement-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.achievement-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

.achievement-img:hover {
    opacity: 0.9;
}

.achievement-caption {
    padding: 15px;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
    background: white;
}

/* Галерея */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.gallery-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    padding-bottom: 15px;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.gallery-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gallery-img:hover {
    opacity: 0.9;
}

.gallery-caption {
    padding: 10px 15px 5px;
    text-align: center;
    font-size: 0.95rem;
    color: #555;
}

.qr-img {
    display: block;
    width: 80px;
    height: 80px;
    margin: 10px auto 0;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 10px;
    padding: 5px;
    background: #f5f5f5;
}

.qr-img:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Расписание (лёгкое оформление) */
.table-wrapper {
    overflow-x: auto;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    background: white;
    padding: 5px;
}

.schedule-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
    background: white;
    border-radius: 20px;
}

.schedule-table th {
    padding: 15px 10px;
    background-color: #f8f9fa;
    color: #3180ce;
    font-weight: 600;
    font-size: 1rem;
    border-bottom: 2px solid #e67e22;
}

.schedule-table td {
    padding: 12px 10px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: background-color 0.2s;
}

.schedule-table tr:hover td {
    background-color: #fef5e7;
}

/* Подвал */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 30px 20px;
}

.footer-container p {
    margin: 5px 0;
    font-size: 0.9rem;
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    overflow: auto;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 80%;
    margin: 5% auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(255,255,255,0.2);
}

#caption {
    text-align: center;
    color: white;
    padding: 10px 0;
    font-size: 1.2rem;
}

.close {
    position: absolute;
    top: 30px;
    right: 50px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #e67e22;
}

/* Адаптация */
@media (max-width: 992px) {
    .students-excellent-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .achievements-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-container {
        flex-direction: column;
    }
    .hero-photo {
        flex-basis: auto;
        max-width: 300px;
    }
    .hero-photo img {
        transform: rotate(0);
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .about-photos {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    .about-photos img {
        width: calc(50% - 10px);
        max-width: 250px;
    }
    .students-excellent-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .achievements-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .close {
        top: 20px;
        right: 30px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .students-excellent-grid {
        grid-template-columns: 1fr;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
}
/* Стили для блока "Последние новости" */
.news-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.news-section h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #333;
}

.news-slider {
    position: relative;
    overflow: hidden;
}

.news-slides {
    display: flex;
    transition: transform 0.5s ease;
}

.news-slide {
    min-width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: none;
}

.news-slide.active {
    opacity: 1;
    display: block;
}

.news-table {
    width: 100%;
    border-collapse: collapse;
    border: none;
    background: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
}

.news-table td {
    border: none;
    padding: 20px;
    vertical-align: middle;
}

.news-text {
    width: 60%;
}

.news-photo {
    width: 40%;
    text-align: center;
}

.news-photo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.news-date {
    color: #888;
    font-size: 14px;
    margin-bottom: 8px;
}

.news-title {
    font-weight: bold;
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.news-desc {
    color: #555;
    line-height: 1.5;
}

.news-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: #3180ce;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 10
    transition: background 0.3s;
}

.news-arrow:hover {
    background: #2566a8;
}

/* Адаптивность для мобильных */
@media (max-width: 600px) {
    .news-table td {
        display: block;
        width: 100%;
    }
    .news-photo {
        margin-top: 15px;
    }
    .news-arrow {
        right: 5px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}