/* ===== ОБЩИЕ СТИЛИ ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

/* ===== ШАПКА САЙТА ===== */
.top-header {
    background: linear-gradient(135deg, #0d4f2b 0%, #1a7a42 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 15px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.logo:hover {
    opacity: 0.9;
}

/* ===== ВЫПАДАЮЩЕЕ МЕНЮ ===== */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.dropdown-btn:hover {
    background: rgba(255,255,255,0.25);
}

.dropdown-btn .arrow {
    font-size: 0.7em;
    transition: transform 0.2s;
}

.dropdown:hover .dropdown-btn .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 300px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 1001;
    margin-top: 5px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    font-size: 0.95em;
}

.dropdown-content a:first-child {
    border-radius: 12px 12px 0 0;
}

.dropdown-content a:last-child {
    border-bottom: none;
    border-radius: 0 0 12px 12px;
}

.dropdown-content a:hover {
    background: #f8f9fa;
    color: #1a7a42;
}

.dd-icon {
    font-size: 1.2em;
}

/* ===== ПОДВАЛ САЙТА ===== */
.site-footer {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #0d4f2b 0%, #1a7a42 100%);
    color: rgba(255,255,255,0.9);
    font-size: 0.95em;
}

.site-footer p {
    margin: 5px 0;
}

/* ===== ГЛАВНАЯ СТРАНИЦА ===== */
.main-page {
    background: linear-gradient(135deg, #0d4f2b 0%, #1a7a42 50%, #0d4f2b 100%);
    min-height: calc(100vh - 60px);
    padding: 30px;
}

.main-page .header-section {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.main-page .header-section h1 {
    font-size: 2.8em;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    margin-bottom: 10px;
}

.main-page .header-section p {
    font-size: 1.2em;
    opacity: 0.9;
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.stat {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 15px 35px;
    border-radius: 50px;
    color: white;
    text-align: center;
}

.stat-num {
    font-size: 2em;
    font-weight: bold;
}

.stat-label {
    font-size: 0.95em;
    opacity: 0.85;
}

/* ===== СЕТКА КАРТОЧЕК 5x4 ===== */
.grid-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.35);
}

.card-image {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
}

.card-content {
    padding: 15px;
    text-align: center;
}

.card-number {
    display: inline-block;
    background: #1a7a42;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    line-height: 30px;
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.card-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
}

.card-exercises {
    font-size: 0.8em;
    color: #666;
}

/* Цвета карточек */
.card:nth-child(1) .card-image { background: linear-gradient(135deg, #FF6B6B, #FF8E53); }
.card:nth-child(2) .card-image { background: linear-gradient(135deg, #4ECDC4, #44A08D); }
.card:nth-child(3) .card-image { background: linear-gradient(135deg, #667eea, #764ba2); }
.card:nth-child(4) .card-image { background: linear-gradient(135deg, #f093fb, #f5576c); }
.card:nth-child(5) .card-image { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.card:nth-child(6) .card-image { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.card:nth-child(7) .card-image { background: linear-gradient(135deg, #fa709a, #fee140); }
.card:nth-child(8) .card-image { background: linear-gradient(135deg, #a8edea, #fed6e3); }
.card:nth-child(9) .card-image { background: linear-gradient(135deg, #d299c2, #fef9d7); }
.card:nth-child(10) .card-image { background: linear-gradient(135deg, #89f7fe, #66a6ff); }
.card:nth-child(11) .card-image { background: linear-gradient(135deg, #cd9cf2, #f6f3ff); }
.card:nth-child(12) .card-image { background: linear-gradient(135deg, #fddb92, #d1fdff); }
.card:nth-child(13) .card-image { background: linear-gradient(135deg, #a1c4fd, #c2e9fb); }
.card:nth-child(14) .card-image { background: linear-gradient(135deg, #f6d365, #fda085); }
.card:nth-child(15) .card-image { background: linear-gradient(135deg, #96fbc4, #f9f586); }
.card:nth-child(16) .card-image { background: linear-gradient(135deg, #ff9a9e, #fecfef); }
.card:nth-child(17) .card-image { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.card:nth-child(18) .card-image { background: linear-gradient(135deg, #ffecd2, #fcb69f); }
.card:nth-child(19) .card-image { background: linear-gradient(135deg, #84fab0, #8fd3f4); }
.card:nth-child(20) .card-image { background: linear-gradient(135deg, #b8c6db, #f5f7fa); }

/* ===== СТРАНИЦА УПРАЖНЕНИЯ ===== */
.main-container {
    display: flex;
    min-height: calc(100vh - 120px);
}

.sidebar {
    width: 300px;
    background: white;
    box-shadow: 3px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 25px 20px;
    text-align: center;
    color: white;
}

.sidebar-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.sidebar-title {
    font-size: 1.1em;
    font-weight: 600;
}

.sidebar-subtitle {
    font-size: 0.85em;
    opacity: 0.9;
    margin-top: 5px;
}

.menu-list {
    padding: 10px 0;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #444;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
    font-size: 0.9em;
}

.menu-item:hover {
    background: #f8f9fa;
    color: #1a7a42;
}

.menu-item.active {
    border-left-color: currentColor;
    color: #1a7a42;
    font-weight: 600;
    background: linear-gradient(90deg, rgba(26,122,66,0.1), transparent);
}

.menu-num {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-right: 10px;
    min-width: 36px;
    text-align: center;
}

.menu-item.active .menu-num {
    background: #1a7a42;
    color: white;
}

.menu-text {
    line-height: 1.3;
}

.menu-toggle {
    display: none;
}

.content {
    flex: 1;
    padding: 30px;
    max-width: 900px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.9em;
    color: #666;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #1a7a42;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.exercise-header {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    border-top: 4px solid #1a7a42;
}

.exercise-number {
    display: inline-block;
    background: #1a7a42;
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 12px;
}

.exercise-title {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
}

.exercise-section {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 0.95em;
}

.exercise-section-icon {
    font-size: 1.2em;
}

.content-placeholder {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.placeholder-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
    opacity: 0.5;
}

.placeholder-text {
    color: #888;
    font-size: 1.1em;
    margin-bottom: 8px;
}

.placeholder-hint {
    color: #aaa;
    font-size: 0.9em;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
    gap: 15px;
}

.nav-btn {
    flex: 1;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: #444;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.nav-btn:hover {
    border-color: #1a7a42;
    color: #1a7a42;
}

.nav-btn.next {
    justify-content: flex-end;
    text-align: right;
}

.nav-btn-label {
    font-size: 0.8em;
    color: #888;
}

.nav-btn-title {
    font-weight: 600;
    font-size: 0.9em;
}

/* ===== МОБИЛЬНАЯ АДАПТАЦИЯ ===== */

/* Планшеты */
@media (max-width: 1400px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .sidebar {
        width: 260px;
    }
}

/* Мобильные устройства */
@media (max-width: 900px) {
    .top-header {
        padding: 12px 15px;
    }
    
    .logo {
        font-size: 1.2em;
    }
    
    .dropdown-btn {
        padding: 8px 12px;
        font-size: 0.9em;
    }
    
    .dropdown-content {
        min-width: 260px;
        right: -10px;
    }
    
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .card-image {
        height: 80px;
        font-size: 2.5em;
    }
    
    .card-content {
        padding: 12px;
    }
    
    .card-title {
        font-size: 0.85em;
    }
    
    .main-page .header-section h1 {
        font-size: 2em;
    }
    
    .stats-bar {
        gap: 20px;
    }
    
    .stat {
        padding: 12px 25px;
    }
    
    .stat-num {
        font-size: 1.5em;
    }
    
    /* Страница упражнения на мобильных */
    .main-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: none;
        position: relative;
    }
    
    .sidebar-header {
        padding: 20px 15px;
    }
    
    .menu-list {
        display: none;
    }
    
    .sidebar.expanded .menu-list {
        display: block;
    }
    
    .menu-toggle {
        display: block;
        width: 100%;
        padding: 12px;
        background: #f8f9fa;
        border: none;
        cursor: pointer;
        font-size: 0.95em;
        color: #1a7a42;
    }
    
    .content {
        padding: 20px 15px;
    }
    
    .exercise-header {
        padding: 20px;
    }
    
    .exercise-title {
        font-size: 1.4em;
    }
    
    .nav-buttons {
        flex-direction: column;
    }
    
    .nav-btn.next {
        justify-content: flex-start;
        text-align: left;
    }
}

/* Маленькие телефоны */
@media (max-width: 480px) {
    .main-page {
        padding: 15px;
    }
    
    .grid-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card {
        display: flex;
        flex-direction: row;
        align-items: center;
    }
    
    .card-image {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
        font-size: 2em;
    }
    
    .card-content {
        text-align: left;
        flex: 1;
    }
    
    .card-number {
        width: 25px;
        height: 25px;
        line-height: 25px;
        font-size: 0.8em;
    }
    
    .main-page .header-section h1 {
        font-size: 1.6em;
    }
    
    .main-page .header-section p {
        font-size: 1em;
    }
    
    .stats-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .stat {
        padding: 10px 20px;
    }
    
    .dropdown-content {
        position: fixed;
        left: 10px;
        right: 10px;
        top: 60px;
        min-width: auto;
    }
    
    .breadcrumb {
        font-size: 0.8em;
    }
    
    .exercise-title {
        font-size: 1.2em;
    }
    
    .content-placeholder {
        padding: 25px 15px;
    }
}

/* iPhone SE и подобные */
@media (max-width: 375px) {
    .logo {
        font-size: 1em;
    }
    
    .dropdown-btn span:first-child {
        display: none;
    }
    
    .dropdown-btn .arrow {
        font-size: 1em;
    }
}

/* Ландшафтная ориентация на телефонах */
@media (max-height: 500px) and (orientation: landscape) {
    .dropdown-content {
        max-height: 50vh;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-icon {
        font-size: 2em;
    }
}

/* ===== СТИЛИ КОНТЕНТА УПРАЖНЕНИЙ ===== */
.exercise-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.exercise-content h2 {
    color: #1a5f2a;
    font-size: 1.6em;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid currentColor;
}

.exercise-content h2:first-child {
    margin-top: 0;
}

.exercise-content h3 {
    color: #333;
    font-size: 1.3em;
    margin: 25px 0 12px 0;
}

.exercise-content p {
    color: #444;
    line-height: 1.8;
    margin-bottom: 15px;
    text-align: justify;
}

.exercise-content ul, .exercise-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.exercise-content li {
    color: #444;
    line-height: 1.7;
    margin-bottom: 10px;
}

.exercise-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: #fafafa;
}

.exercise-content table th {
    background: linear-gradient(135deg, #1a5f2a, #2d8f4e);
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.exercise-content table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.exercise-content table tr:nth-child(even) {
    background: #f5f5f5;
}

.exercise-content table tr:hover {
    background: #e8f5e9;
}

/* Блоки этапов выполнения */
.stage-block {
    background: linear-gradient(135deg, #f8f9fa, #fff);
    border-left: 4px solid currentColor;
    padding: 20px;
    margin: 20px 0;
    border-radius: 0 10px 10px 0;
}

.stage-block h4 {
    color: inherit;
    font-size: 1.15em;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stage-number {
    background: currentColor;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: bold;
}

.stage-block p {
    margin: 0;
}

.time-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    margin-top: 10px;
}

/* Ключевые моменты */
.key-point {
    background: #fff3e0;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 10px 0;
    border-left: 4px solid #ff9800;
}

.key-point strong {
    color: #e65100;
}

/* Рекомендации */
.recommendation {
    background: #e8f5e9;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 10px 0;
    border-left: 4px solid #4caf50;
}

.recommendation strong {
    color: #2e7d32;
}

/* Модификации */
.modification {
    background: #f3e5f5;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 10px 0;
    border-left: 4px solid #9c27b0;
}

.modification strong {
    color: #7b1fa2;
}

/* Предупреждения */
.warning-block {
    background: #ffebee;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0;
    border-left: 4px solid #f44336;
}

.warning-block strong {
    color: #c62828;
}

/* Информационные блоки */
.info-box {
    background: #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.info-box h4 {
    color: #1565c0;
    margin: 0 0 10px 0;
}

/* Список оборудования */
.equipment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.equipment-item {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.95em;
}

/* Адаптивность для контента упражнений */
@media (max-width: 768px) {
    .exercise-content {
        padding: 20px 15px;
    }
    
    .exercise-content h2 {
        font-size: 1.4em;
    }
    
    .exercise-content table {
        font-size: 0.9em;
    }
    
    .exercise-content table th,
    .exercise-content table td {
        padding: 8px 10px;
    }
    
    .equipment-list {
        flex-direction: column;
    }
}
