:root {
    --primary-blue: #4a76a8;
    --dark-blue: #2c4a6f;
    --bg-light: #edf2f8;
    --card-bg: #ffffff;
    --text-main: #333333;
    --accent-red: #c0392b;
    --accent-green: #48a999;
    --border-color: #d1d9e0;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background-color: var(--bg-light);
    color: var(--text-main);
    padding-bottom: 20px;
}

/* ==========================================
   HEADER
   ========================================== */
header {
    background-color: var(--primary-blue);
    color: white;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
}

header h1 {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

header p {
    font-size: 14px;
    opacity: 0.9;
}

/* ==========================================
   NAVIGATION
   ========================================== */
nav {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    position: relative;
    width: 100%;
    z-index: 100;
}

.menu-links {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.menu-links::-webkit-scrollbar {
    display: none;
}

.nav-tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    color: var(--dark-blue);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.nav-tab-btn:hover, 
.nav-tab-btn.active {
    background-color: var(--bg-light);
}

.sport-drop-container {
    position: relative;
}

.sport-drop-btn {
    display: block;
    padding: 15px 20px;
    color: var(--dark-blue);
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.sport-drop-btn:hover {
    background-color: var(--bg-light);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container {
    position: relative;
}

.search-input {
    padding: 6px 35px 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    width: 160px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary-blue);
}

.auth-btn {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.auth-btn:hover {
    opacity: 0.9;
}

.sport-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    padding: 15px;
    border-radius: 0 0 4px 4px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    z-index: 1000;
    min-width: 230px;
}

.sport-dropdown.show {
    display: grid;
}

.sport-dropdown label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

/* ==========================================
   КАТАЛОГ И ФИЛЬТРЫ
   ========================================== */
.main-page-layout {
    max-width: 1300px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
    padding: 0 15px;
}

.filters-sidebar {
    width: 23%;
    background: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.filters-sidebar h3 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #000000;
    font-weight: bold;
}

.filter-section {
    margin-bottom: 20px;
}

.filter-section h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #000000;
}

.filter-section label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
}

.btn-filter-apply {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: opacity 0.2s;
}

.btn-filter-apply:hover {
    opacity: 0.9;
}

.catalog-right {
    width: 77%;
}

.catalog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 15px;
    color: var(--text-main);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.vertical-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-banner {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-color: #dddddd;
    flex-shrink: 0;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-tag {
    font-size: 11px;
    font-weight: bold;
    color: #555555;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 12px;
    line-height: 1.3;
}

.info-block {
    margin-bottom: 10px;
    font-size: 13.5px;
    color: var(--text-main);
}

.info-block span {
    display: block;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: bold;
    color: #000000;
    margin-bottom: 2px;
}

.info-block p { 
    color: #444444; 
}

.info-block ul {
    list-style: none;
    padding-left: 0;
}

.info-block ul li::before {
    content: "• ";
    color: #000000;
}

.status-line {
    margin-top: auto;
    font-weight: bold;
    font-size: 13px;
    padding: 5px 0;
    margin-bottom: 10px;
}

.status-ok { color: #27ae60; }
.status-alert { color: #e67e22; }
.status-error { color: var(--accent-red); }

.card-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.btn-card {
    padding: 8px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    text-align: center;
    transition: opacity 0.2s;
}

.btn-card:hover:not(.btn-card-disabled) {
    opacity: 0.9;
}

.btn-card-more { 
    background: var(--bg-light); 
    color: var(--primary-blue); 
    border: 1px solid var(--border-color); 
}

.btn-card-reg { 
    background: var(--accent-green); 
    color: white; 
}

.btn-card-disabled { 
    background: #e74c3c; 
    color: white; 
    cursor: not-allowed; 
}

/* ==========================================
   ЛИЧНЫЙ КАБИНЕТ И РАСПИСАНИЕ
   ========================================== */
.lk-layout,
#trainer-lk-content {
    max-width: 1200px;
    margin: 20px auto;
    display: flex;
    gap: 20px;
    padding: 0 10px;
    width: 100%;
}

.parent-lk-wrapper {
    width: 100%;
    display: flex;
    gap: 20px;
}

.lk-sidebar-children {
    width: 250px;
    flex-shrink: 0;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lk-left,
.lk-right { 
    flex: 1 1 0%; 
    min-width: 0;
    background: var(--card-bg); 
    border-radius: 8px; 
    padding: 20px; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); 
}

.lk-title {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 8px;
    margin-bottom: 15px;
    color: var(--dark-blue);
}

.child-item-card {
    transition: all 0.2s ease-in-out;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #ffffff;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
}

.child-item-card:hover {
    border-color: var(--primary-blue);
    background-color: #f8fbff;
}

.child-item-card.active-child-card {
    border: 2px solid var(--primary-blue) !important;
    background-color: #eef6ff !important;
    box-shadow: 0 4px 10px rgba(74, 118, 168, 0.2);
    transform: translateY(-1px);
}

.date-card {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    padding: 16px 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.date-card .day-name {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.date-card .day-number {
    font-size: 38px;
    font-weight: bold;
    line-height: 1.1;
    margin: 4px 0;
}

.date-card .month-year {
    font-size: 14px;
    font-weight: 500;
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.schedule-day-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f4f7fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    transition: background-color 0.2s;
}

.schedule-day-item:hover {
    background-color: #e9eff6;
}

.day-badge {
    width: 42px;
    height: 42px;
    background-color: var(--primary-blue);
    color: white;
    font-weight: bold;
    font-size: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.schedule-day-item.free .day-badge {
    background-color: #a0aec0;
}

.day-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.day-info .event-title {
    font-weight: bold;
    font-size: 14px;
    color: var(--text-main);
}

.day-info .event-time {
    font-size: 13px;
    color: #666666;
}

.day-info .free-text {
    font-size: 14px;
    color: #718096;
    font-style: italic;
}

.lk-event-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-blue);
    border-radius: 6px;
    padding: 14px;
    margin-top: 15px;
}

.lk-time-badge {
    background: var(--primary-blue);
    color: white;
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 8px;
}

.lk-event-card h4 {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #000000;
}

.lk-event-card p {
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
}

.lk-card { 
    display: flex; 
    border: 1px solid var(--border-color); 
    border-radius: 8px; 
    overflow: hidden; 
    background: var(--card-bg); 
}

.lk-card-img { 
    width: 130px; 
    background-size: cover; 
    background-position: center; 
}

.lk-card-info { 
    padding: 12px; 
    flex: 1; 
}

.accordion-group {
    width: 100%;
}

.accordion-btn {
    width: 100%;
    padding: 12px 18px;
    background-color: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--dark-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.accordion-btn:hover {
    background-color: #e9ecef;
    border-color: #cccccc;
}

.accordion-btn.active {
    background-color: #e7f1ff;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.accordion-icon {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.accordion-btn.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    padding-top: 10px;
    display: none;
}

.accordion-content.show,
.accordion-btn.active + .accordion-content {
    display: block;
}

/* ==========================================
   МОДАЛЬНЫЕ ОКНА
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal-box-clean {
    background: var(--card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
    position: relative;
}

.modal-box-clean h2 {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: bold;
    text-transform: uppercase;
}

.clean-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 15px;
}

.clean-group label {
    font-size: 13px;
    font-weight: bold;
    color: var(--text-main);
    margin-bottom: 5px;
}

.clean-group input, 
.clean-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #fcfcfc;
    transition: border-color 0.2s;
}

.clean-group input:focus, 
.clean-group select:focus {
    border-color: var(--primary-blue);
}

.clean-actions {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-modal-blue {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: opacity 0.2s;
}

.btn-modal-blue:hover {
    opacity: 0.9;
}

.btn-modal-outline {
    background-color: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
    padding: 11px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    transition: background-color 0.2s;
}

.btn-modal-outline:hover {
    background-color: var(--bg-light);
}

.btn-modal-google {
    background-color: var(--card-bg);
    color: #757575;
    border: 1px solid var(--border-color);
    padding: 11px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: background-color 0.2s;
}

.btn-modal-google:hover {
    background-color: #f7f9fa;
}

.btn-clean-cancel {
    background-color: #b0bec5;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.2s;
}

.btn-clean-cancel:hover {
    opacity: 0.9;
}

.modal-link {
    display: block;
    margin-top: 12px;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.modal-link:hover {
    text-decoration: underline;
}

.divider-text {
    margin: 10px 0;
    font-size: 13px;
    color: #888888;
    position: relative;
}

/* ==========================================
   МОДАЛЬНОЕ ОКНО СОЗДАНИЯ ГРУППЫ
   ========================================== */
#createGroupModal .modal-box-clean {
    max-width: 520px;
    padding: 28px;
    text-align: left;
}

#createGroupModal h2 {
    font-size: 20px;
    color: var(--dark-blue);
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 10px;
}

.group-schedule-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.group-day-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 10px;
    background: var(--card-bg);
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s, background-color 0.2s;
}

.group-day-row:has(.grp-day-cb:checked) {
    border-color: var(--primary-blue);
    background-color: #f0f7ff;
}

.group-day-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
    min-width: 130px;
}

.group-day-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-blue);
    cursor: pointer;
}

.grp-day-time {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    width: 120px;
    text-align: center;
    background-color: var(--card-bg);
    transition: all 0.2s ease;
}

.grp-day-time:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(74, 118, 168, 0.15);
}

.grp-day-time:disabled {
    background-color: #edf2f7;
    color: #a0aec0;
    border-color: #e2e8f0;
    cursor: not-allowed;
    opacity: 0.7;
}

#createGroupModal .clean-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

#createGroupModal .clean-actions button {
    flex: 1;
    margin: 0;
}

/* ==========================================
   ФУТЕР
   ========================================== */
footer {
    width: 100%;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-links a {
    color: var(--dark-blue);
    text-decoration: none;
    font-size: 13px;
    cursor: pointer;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-phone {
    font-weight: bold;
    font-size: 14px;
    white-space: nowrap;
}

/* ==========================================
   АДАПТИВНАЯ ВЕРСТКА (RESPONSIVE DESIGN)
   ========================================== */
@media (max-width: 992px) {
    nav {
        flex-direction: column;
        padding: 10px 15px;
        gap: 10px;
        align-items: stretch;
    }
    
    .menu-links {
        width: 100%;
    }
    
    .nav-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-container {
        flex-grow: 1;
    }
    
    .search-input {
        width: 100%;
    }
    
    .main-page-layout {
        flex-direction: column;
    }
    
    .filters-sidebar, 
    .catalog-right {
        width: 100%;
    }
    
    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .lk-layout,
    .parent-lk-wrapper,
    #trainer-lk-content {
        flex-direction: column !important;
        gap: 15px;
    }
    
    .lk-sidebar-children,
    .lk-left,
    .lk-right,
    .parent-lk-wrapper .lk-left, 
    .parent-lk-wrapper .lk-right,
    #trainer-lk-content > div {
        width: 100% !important;
        max-width: 100% !important;
        flex: auto !important;
    }
}

@media (max-width: 680px) {
    header h1 {
        font-size: 18px;
    }
    
    header p {
        font-size: 12px;
    }
    
    .nav-tab-btn, 
    .sport-drop-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .catalog-grid {
        grid-template-columns: 1fr;
    }
    
    .catalog-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .modal-box-clean {
        width: 92%;
        padding: 18px;
        margin: 10px;
    }
    
    footer {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .lk-card {
        flex-direction: column;
    }
    
    .lk-card-img {
        width: 100%;
        height: 120px;
    }
    
    .group-day-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .grp-day-time {
        width: 100%;
    }
}
