/* 
 * Минималистичный дизайн для сайта Гимназии №2
 * Красные акценты, без градиентов и лишних эффектов
 */

:root {
    --primary-red: #c41e3a;
    --dark-red: #9a1829;
    --light-red: #dc143c;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --bg-white: #ffffff;
    --bg-light: #f8f8f8;
    --border-color: #e0e0e0;
    --border-radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica",
        "Arial", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
}
h2 {
    font-size: 1.5rem;
}
h3 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--dark-red);
}

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

/* Header */
.header {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-red);
    white-space: nowrap;
}

/* Menu Toggle Button */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.35rem;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-red);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
    color: var(--primary-red);
    border-bottom-color: var(--primary-red);
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background-color: var(--bg-white);
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.hero h1 {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--bg-light);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-meta {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.card-text {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
}

.btn-primary:hover {
    background-color: var(--dark-red);
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

.btn-outline:hover {
    background-color: var(--primary-red);
    color: white;
}

/* Footer */
.footer {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-red);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-gray);
    font-size: 0.875rem;
}

/* Search */
.search-box {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-red);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
}

.search-section {
    padding: 0.5rem 0;
}

.search-section h4 {
    padding: 0.5rem 1rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-gray);
    background: var(--bg-light);
}

.search-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
}

.search-item:hover {
    background: var(--bg-light);
}

.search-item strong {
    color: var(--primary-red);
}

.search-item span {
    color: var(--text-gray);
    font-size: 0.875rem;
}

.search-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-gray);
}

/* Tables */
.table {
    width: 100%;
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: var(--bg-light);
    font-weight: 600;
}

.table tr:last-child td {
    border-bottom: none;
}

/* Contact Cards */
.contact-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--bg-white);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.contact-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--bg-light);
}

.contact-info h3 {
    margin-bottom: 0.25rem;
}

.contact-position {
    color: var(--text-gray);
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        gap: 1rem;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    .logo {
        order: 1;
    }

    .search-box {
        order: 3;
        width: 100% !important;
    }

    .nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-white);
        z-index: 99;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding-top: 80px;
        overflow-y: auto;
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav ul {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }

    .nav li {
        border-bottom: 1px solid var(--border-color);
    }

    .nav a {
        display: block;
        padding: 1rem;
        border-bottom: none !important;
    }

    .nav a:hover,
    .nav a.active {
        background-color: var(--bg-light);
        color: var(--primary-red);
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .contact-card {
        flex-direction: column;
        text-align: center;
    }
}
