/*
 Theme Name: Masterscity
 Author: Nikolay Sergeev
 Description: Тема для Masters City, интегрированная с плагинами master-commerce, master-robokassa-gateway и master-yookassa-gateway.
 Version: 1.0.1
 Text Domain: masterscity
 Note: Dashicons are loaded via wp-includes/css/dashicons.min.css
*/

/* CSS Variables for Themes */
:root {
    --bg-color: #ffffff;
    --text-color: #333333;
    --primary-color: #007bff;
    --primary-hover-color: #0056b3;
    --header-bg: #f8f9fa;
    --sidebar-bg: #f4f4f4;
    --sidebar-text: #333333;
    --border-color: #cccccc;
    --card-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #1e1e1e;
    --text-color: #ffffff;
    --primary-color: #40c4ff;
    --primary-hover-color: #0288d1;
    --header-bg: #2c2c2c;
    --sidebar-bg: #333333;
    --sidebar-text: #ffffff;
    --border-color: #444444;
    --card-bg: #2c2c2c;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    margin: 0;
    transition: background 0.3s, color 0.3s;
}

/* Header Styles */
.site-header {
    display: flex;
    align-items: center;
    background: var(--header-bg);
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    box-sizing: border-box;
}

body.admin-bar .site-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

.header-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    margin-right: 15px;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s;
}

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

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

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

.logo img {
    height: 40px;
    margin-right: 10px;
}

.site-title {
    font-size: 20px;
    font-weight: bold;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    margin-left: auto;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    flex-wrap: nowrap;
}

.nav-menu li {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 100px;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 5px;
    transition: background 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dashicons for Menu Items */
.nav-menu li.menu-item .dashicons {
    font-family: 'dashicons' !important;
    font-size: 18px !important;
    margin-right: 5px !important;
    color: var(--text-color) !important;
    transition: color 0.3s !important;
    speak: none !important;
    display: inline-block !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.nav-menu li.menu-item:before {
    content: none !important;
}

.nav-menu li a:hover,
.nav-menu li a:hover .dashicons {
    color: #ffffff !important;
    background: var(--primary-color) !important;
}

.login-button {
    padding: 6px 12px;
    background: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    border-radius: 5px;
}

.user-profile {
    position: relative;
}

.user-avatar img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.user-card {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 200px;
    z-index: 100;
}

.user-profile:hover .user-card {
    display: block;
}

.user-card-avatar img {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
}

.user-card h3 {
    margin: 0;
    font-size: 16px;
}

.user-status {
    margin: 5px 0;
    color: var(--primary-color);
}

.logout {
    color: var(--primary-color);
    text-decoration: none;
}

.language-switcher select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    color: var(--text-color);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

.theme-toggle .dashicons {
    color: var(--text-color);
}

.cart {
    position: relative;
}

.cart a {
    text-decoration: none;
    font-size: 18px;
}

.cart .dashicons {
    color: var(--text-color);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.notifications {
    position: relative;
}

.notification-bell {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    position: relative;
}

.notification-bell .dashicons {
    color: var(--text-color);
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: #ffffff;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
}

.notification-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 40px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 200px;
    z-index: 100;
}

.notifications:hover .notification-dropdown {
    display: block;
}

.notification-dropdown p {
    margin: 0;
}

.notification-item {
    padding: 5px 0;
    border-bottom: 1px solid var(--border-color);
}

.notification-item:last-child {
    border-bottom: none;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100% - 60px);
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: width 0.3s, left 0.3s;
    z-index: 999;
}

body.admin-bar .sidebar {
    top: 92px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .sidebar {
        top: 106px;
    }
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.hidden {
    left: -250px;
}

.sidebar.active {
    left: 0;
}

.sidebar-content {
    padding: 20px;
}

.sidebar-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--sidebar-text);
    margin-bottom: 20px;
    display: block;
}

.sidebar.collapsed .sidebar-toggle .dashicons {
    transform: rotate(180deg);
}

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

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    color: var(--sidebar-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 5px;
}

.sidebar-menu a:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.sidebar-menu .current-menu-item > a {
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.sidebar-menu .current-menu-item > a .dashicons {
    color: var(--primary-color);
}

.sidebar-menu .current-menu-item > a:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.sidebar-menu .current-menu-item > a:hover .dashicons {
    color: #ffffff;
}

.sidebar-menu .dashicons {
    margin-right: 10px;
    font-size: 20px !important;
    font-family: 'dashicons' !important;
    color: var(--sidebar-text);
    transition: color 0.3s;
    speak: none;
    display: inline-block;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.sidebar-menu a:hover .dashicons {
    color: #ffffff;
}

.sidebar.collapsed .sidebar-menu a {
    justify-content: center;
    padding: 10px;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-menu .menu-text {
    display: none;
}

.sidebar.collapsed .sidebar-menu .dashicons {
    margin-right: 0 !important;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 20px;
    transition: margin-left 0.3s;
}

body.admin-bar .main-content {
    padding-top: 52px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .main-content {
        padding-top: 66px;
    }
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px;
}

.sidebar.hidden ~ .main-content {
    margin-left: 0;
}

/* Archive Pages */
.archive-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Author Page Styles */
.author-archive .page-header {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.author-header {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    background: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
}

.author-avatar img {
    border-radius: 50%;
    border: 3px solid #ddd;
}

.author-info {
    flex: 1;
}

.author-info h1.page-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 2rem;
    color: #333;
}

.author-name {
    color: #0073aa;
}

.author-description {
    margin-bottom: 20px;
    font-size: 1.1em;
    line-height: 1.6;
    color: #666;
}

.author-meta p {
    margin: 8px 0;
    font-size: 1em;
}

.author-meta strong {
    color: #333;
}

.author-posts h2 {
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
    color: #333;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.no-results {
    text-align: center;
    padding: 50px 20px;
}

.no-results h2 {
    color: #666;
    margin-bottom: 15px;
}

.no-results p {
    color: #999;
    font-size: 1.1em;
}

@media (max-width: 768px) {
    .author-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .author-info h1.page-title {
        font-size: 1.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Course Card Styles */
.course-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.course-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.course-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-thumbnail {
    position: relative;
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.course-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
}

.course-status.status-past {
    background: #6c757d;
}

.course-status.status-future {
    background: #28a745;
}

.course-status.status-ongoing {
    background: #ffc107;
    color: #212529;
}

.course-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title {
    margin: 0 0 15px 0;
    font-size: 1.4em;
}

.course-title a {
    color: #333;
    text-decoration: none;
}

.course-title a:hover {
    color: #0073aa;
}

.course-description {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.5;
}

.course-trainers {
    margin-bottom: 15px;
    font-size: 0.9em;
}

.trainer-name {
    display: inline-block;
    margin-right: 10px;
}

.trainer-name a {
    color: #0073aa;
    text-decoration: none;
}

.trainer-name a:hover {
    text-decoration: underline;
}

.course-program-preview {
    margin-bottom: 20px;
    font-size: 0.9em;
}

.course-program-preview ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.course-program-preview li {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

.course-program-preview li:last-child {
    border-bottom: none;
}

.program-date {
    font-weight: bold;
    display: block;
}

.program-time {
    color: #666;
    font-size: 0.9em;
}

.program-event {
    display: block;
    margin-top: 3px;
}

.more-events {
    font-style: italic;
    color: #999;
}

.course-footer {
    margin-top: auto;
    padding-top: 15px;
}

.course-link {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
}

.course-link:hover {
    background: #005a87;
}

/* Consultation Card Styles */
.consultation-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.consultation-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.consultation-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.consultation-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.consultation-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.consultation-title {
    margin: 0 0 15px 0;
    font-size: 1.4em;
}

.consultation-title a {
    color: #333;
    text-decoration: none;
}

.consultation-title a:hover {
    color: #0073aa;
}

.consultation-excerpt {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.consultation-link {
    display: inline-block;
    padding: 8px 16px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: auto;
}

.consultation-link:hover {
    background: #218838;
}

/* Club Card Styles */
.club-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.club-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.club-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.club-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.club-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.club-title {
    margin: 0 0 15px 0;
    font-size: 1.4em;
}

.club-title a {
    color: #333;
    text-decoration: none;
}

.club-title a:hover {
    color: #0073aa;
}

.club-excerpt {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.club-link {
    display: inline-block;
    padding: 8px 16px;
    background: #6f42c1;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: auto;
}

.club-link:hover {
    background: #5a32a3;
}

/* Training Card Styles */
.training-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.training-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.training-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.training-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.training-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.training-title {
    margin: 0 0 15px 0;
    font-size: 1.4em;
}

.training-title a {
    color: #333;
    text-decoration: none;
}

.training-title a:hover {
    color: #0073aa;
}

.training-excerpt {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.training-link {
    display: inline-block;
    padding: 8px 16px;
    background: #fd7e14;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: auto;
}

.training-link:hover {
    background: #e06b0d;
}

/* Practice Card Styles */
.practice-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.practice-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.practice-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.practice-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.practice-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.practice-title {
    margin: 0 0 15px 0;
    font-size: 1.4em;
}

.practice-title a {
    color: #333;
    text-decoration: none;
}

.practice-title a:hover {
    color: #0073aa;
}

.practice-excerpt {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.practice-link {
    display: inline-block;
    padding: 8px 16px;
    background: #20c997;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: auto;
}

.practice-link:hover {
    background: #1baa80;
}

.category-blocks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.category-block {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    background: var(--card-bg);
    transition: box-shadow 0.3s;
    text-align: center;
}

.category-block:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.category-block h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.category-block h2 a {
    color: var(--primary-color);
    text-decoration: none;
}

.category-block h2 a:hover {
    text-decoration: underline;
}

.category-block p {
    margin: 0 0 10px;
    color: var(--text-color);
    min-height: 60px;
}

.course-count {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
}

/* New course page styles */
.course-categories-section {
    margin-bottom: 30px;
}

.course-categories-section h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.category-card {
    display: block;
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    transition: all 0.3s ease;
    padding: 20px;
    text-align: center;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.category-card.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
    transform: translateY(-5px);
}

.category-content h3 {
    margin: 0 0 10px;
    color: var(--primary-color);
    font-size: 18px;
}

.category-description {
    margin: 0 0 15px;
    color: var(--text-color);
    font-size: 14px;
    min-height: 40px;
}

.course-count {
    display: inline-block;
    background: var(--primary-color);
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
}

.course-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tab.active,
.filter-tab:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.search-trainer-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    justify-content: flex-end;
}

.search-container {
    flex: 1;
    max-width: 300px;
}

.search-form {
    display: flex;
}

.search-form input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    background: var(--bg-color);
    color: var(--text-color);
}

.search-form button {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.trainer-filter {
    margin-bottom: 0;
}

.trainer-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.trainer-form label {
    color: var(--text-color);
    font-weight: bold;
    white-space: nowrap;
}

.trainer-form select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    min-width: 120px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0;
}

.card, .course-card, .club-card, .consultation-card, .practice-card, .training-card {
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 8px;
    background: var(--card-bg);
    transition: box-shadow 0.3s;
}

.card:hover, .course-card:hover, .club-card:hover, .consultation-card:hover, .practice-card:hover, .training-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.card h2, .course-card h2, .club-card h2, .consultation-card h2, .practice-card h2, .training-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.card h2 a, .course-card h2 a, .club-card h2 a, .consultation-card h2 a, .practice-card h2 a, .training-card h2 a {
    color: var(--primary-color);
    text-decoration: none;
}

.card h2 a:hover, .course-card h2 a:hover, .club-card h2 a:hover, .consultation-card h2 a:hover, .practice-card h2 a:hover, .training-card h2 a:hover {
    text-decoration: underline;
}

.card p, .course-card p, .club-card p, .consultation-card p, .practice-card p, .training-card p {
    margin: 0 0 10px;
    color: var(--text-color);
}

.price {
    font-weight: bold;
    color: var(--primary-color);
}

.trainer-info {
    font-size: 14px;
    color: var(--text-color);
    margin: 5px 0;
}

.trainer-info strong {
    color: var(--primary-color);
}

/* Forms */
.payment-form, .donation-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.payment-gateway-select, .donation-amount, .donation-message {
    padding: 8px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
    transition: border-color 0.3s;
}

.payment-gateway-select:hover, .donation-amount:hover, .donation-message:hover {
    border-color: var(--primary-color);
}

.pay-course-button, .add-to-cart-button, .donate-button {
    background: var(--primary-color);
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.pay-course-button:hover, .add-to-cart-button:hover, .donate-button:hover {
    background: var(--primary-hover-color);
}

#consultation-form, #training-form, #donation-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
}

#consultation-form input, #training-form input, #donation-form input, #donation-form textarea, #training-form select {
    padding: 8px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.modal-content h2 {
    margin: 0 0 10px;
    font-size: 20px;
    color: var(--text-color);
}

.modal-content p {
    margin: 0 0 15px;
    color: var(--text-color);
}

.modal-content button {
    background: var(--primary-color);
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.modal-content button:hover {
    background: var(--primary-hover-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .site-header {
        flex-wrap: wrap;
        padding: 10px;
    }

    .hamburger {
        display: flex; /* Показываем гамбургер-меню только на мобильных */
    }

    .sidebar {
        left: -250px;
    }

    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .site-title {
        font-size: 16px;
    }

    .header-right {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nav-menu {
        flex-wrap: wrap;
        gap: 5px;
    }

    .nav-menu li {
        max-width: 80px;
    }

    .nav-menu a {
        font-size: 12px;
        padding: 3px 5px;
    }

    .nav-menu .dashicons {
        font-size: 16px !important;
        margin-right: 4px !important;
    }

    .category-blocks {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cards {
        grid-template-columns: 1fr;
        padding: 0;
    }

    .payment-form, .donation-form {
        flex-direction: column;
        align-items: stretch;
    }

    .payment-gateway-select, .donation-amount, .donation-message {
        width: 100%;
    }

    #consultation-form, #training-form, #donation-form {
        max-width: 100%;
        padding: 0 10px;
    }
    
    /* Responsive adjustments for course filters */
    .course-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-trainer-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-form input {
        border-radius: 4px;
    }
    
    .search-form button {
        border-radius: 4px;
        margin-top: 10px;
    }
    
    .trainer-form {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .trainer-form label {
        white-space: normal;
    }
    
    .program-table {
        font-size: 14px;
    }
    
    .program-table th,
    .program-table td {
        padding: 8px 10px;
    }
    
    .program-table th:first-child,
    .program-table td:first-child {
        width: 30%;
    }
    
    .program-table th:nth-child(2),
    .program-table td:nth-child(2) {
        width: 25%;
    }
    
    .program-table th:nth-child(3),
    .program-table td:nth-child(3) {
        width: 45%;
    }
}

.course-program {
    margin: 30px 0;
}

.course-program h2 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.program-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

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

.program-table th {
    background: var(--header-bg);
    font-weight: bold;
    color: var(--text-color);
}

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

.program-table tr:hover {
    background: rgba(0, 123, 255, 0.05);
}

/* Footer Styles */
.site-footer {
    background: var(--header-bg);
    border-top: 1px solid var(--border-color);
    padding: 40px 20px 20px;
    margin-top: 40px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.footer-widget-area {
    padding: 0 15px;
}

.footer-widget {
    margin-bottom: 20px;
}

.footer-widget-title {
    color: var(--text-color);
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.footer-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-widget ul li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.footer-widget ul li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.footer-widget a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-widget a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 14px;
}

.footer-bottom p {
    margin: 0;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 576px) {
    .site-footer {
        padding: 30px 15px 15px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-widget-area {
        padding: 0;
    }
    
    .footer-widget-title {
        font-size: 16px;
    }
}
