/* Main page specific styles */

/* Hero section */
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.1), rgba(255, 217, 61, 0.1));
    border-radius: 30px;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 10s ease-in-out infinite;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInDown 1s ease-out;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #cccccc;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: slideInUp 1s ease-out 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff6b6b;
    margin-bottom: 0.5rem;
}

.hero-stat-label {
    color: #cccccc;
    font-size: 0.9rem;
}

/* Search section */
.search-section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin: 3rem 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 300px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-btn {
    padding: 15px 30px;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d);
    border: none;
    border-radius: 15px;
    color: #ffffff;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.4);
}

.filters-section {
    margin-top: 2rem;
}

.filters-toggle {
    display: none; /* Скрываем кнопку переключения на десктопе */
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 12px 20px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.filters-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.filters-toggle i:last-child {
    transition: transform 0.3s ease;
}

.filters-toggle.active i:last-child {
    transform: rotate(180deg);
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    max-height: none; /* Убираем ограничение высоты на десктопе */
    overflow: visible; /* Убираем скрытие на десктопе */
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1; /* Делаем видимыми по умолчанию на десктопе */
}

.filters.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.filters.show {
    max-height: 500px;
    opacity: 1;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    color: #cccccc;
    font-size: 0.9rem;
    font-weight: 500;
}

.filter-select, .filter-input {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.filter-select:focus, .filter-input:focus {
    outline: none;
    border-color: #ff6b6b;
}

.filter-select option {
    background: #1a1a1a;
    color: #ffffff;
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Programs grid */
.programs-section {
    margin: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(45deg, #ff6b6b, #ffd93d, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Loading and empty states */
.loading {
    text-align: center;
    padding: 4rem;
    color: #cccccc;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.no-programs {
    text-align: center;
    padding: 4rem;
    color: #cccccc;
}

.no-programs i {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.no-programs h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #ffffff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95), rgba(40, 40, 40, 0.95));
    backdrop-filter: blur(10px);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideInDown 0.3s ease-out;
}

.modal-header {
    background: linear-gradient(45deg, rgba(255, 107, 107, 0.1), rgba(255, 217, 61, 0.1));
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #cccccc;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #ff6b6b;
}

#modalBody {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ff6b6b;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.detail-content {
    color: #cccccc;
    line-height: 1.6;
}

.detail-content p {
    margin-bottom: 0.5rem;
}

.detail-content strong {
    color: #ffffff;
}

.detail-content a {
    color: #ff6b6b;
    text-decoration: none;
}

.detail-content a:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
        margin: 1rem 0;
        border-radius: 20px;
    }

    .hero-title {
        font-size: 2.2rem;
        line-height: 1.1;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        padding: 0 10px;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }

    .hero-stat-number {
        font-size: 2rem;
    }

    .hero-stat-label {
        font-size: 0.85rem;
    }

    /* Search section mobile optimization */
    .search-section {
        padding: 1rem;
        margin: 1.5rem 0;
        border-radius: 15px;
    }

    .search-container {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .search-input {
        min-width: auto;
        width: 100%;
        padding: 14px 18px;
        font-size: 16px;
        border-radius: 12px;
    }

    .search-btn {
        width: 100%;
        padding: 14px 18px;
        font-size: 1rem;
        border-radius: 12px;
        justify-content: center;
    }

    .search-btn.clear-btn {
        margin-top: 0;
    }

    /* Filters mobile optimization */
    .filters-toggle {
        display: flex;
        width: 100%;
        padding: 14px 18px;
        font-size: 1rem;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .filters {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
        border-radius: 12px;
    }

    .filters.collapsed {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding: 0 1rem;
    }

    .filters.show {
        max-height: 600px;
        opacity: 1;
        padding: 1rem;
    }

    .filter-group {
        margin-bottom: 0.5rem;
    }

    .filter-select, .filter-input {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
        width: 100%;
    }

    /* Programs section */
    .programs-section {
        margin: 2rem 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
        padding: 0 10px;
    }

    .programs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Loading */
    .loading {
        padding: 2rem 1rem;
    }

    .loading p {
        font-size: 0.9rem;
    }

    /* No programs */
    .no-programs {
        padding: 2rem 1rem;
        text-align: center;
    }

    .no-programs h3 {
        font-size: 1.2rem;
    }

    .no-programs p {
        font-size: 0.9rem;
    }

    /* Pagination */
    .pagination {
        margin-top: 2rem;
        gap: 0.5rem;
        padding: 0 1rem;
    }

    .pagination .btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-width: 40px;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 95vh;
        border-radius: 15px;
    }

    .modal-header {
        padding: 1rem;
        border-radius: 15px 15px 0 0;
    }

    .modal-title {
        font-size: 1.3rem;
    }

    .close-btn {
        font-size: 1.5rem;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #modalBody {
        padding: 1rem;
    }

    .detail-section {
        margin-bottom: 1.5rem;
    }

    .detail-title {
        font-size: 1.1rem;
    }

    .detail-content {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .hero-section {
        padding: 1.5rem 0.75rem;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .search-section {
        padding: 0.75rem;
    }

    .programs-grid {
        gap: 1rem;
    }
}

/* Landscape orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 1.5rem 1rem;
    }

    .hero-stats {
        flex-direction: row;
        gap: 2rem;
    }

    .modal-content {
        max-height: 85vh;
    }
} 