/* GENERAL STYLES */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.btn-main {
    background-color: #8FAFE0;
    border-color: #8FAFE0;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    transition: background-color 0.3s ease;
}

.btn-main:hover {
    background-color: #7999c7;
    border-color: #7999c7;
    color: white;
}

/* HEADER */
.header-main-section {
    background-image: url('../index_files/product_main.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    color: white;
}

.header-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-content .personal-account {
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
}

.header-content h1 {
    font-size: 2.2rem;
    font-weight: 700;
}

.social-link-card {
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 0.2);
    border-radius: 10px;
    padding: 1rem 0.5rem;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    width: 140px;
    aspect-ratio: 1 / 1;
    flex-shrink: 0;
}

.social-link-card:hover {
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
}

.social-link-card span {
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.legal-note {
    font-size: 0.7rem;
    opacity: 0.6;
}

.header-right-block {
    background-color: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.important-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.view-course-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.view-course-section .image-small {
    width: 160px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
}

/* PROGRAM OVERVIEW NAV */
.program-overview-nav {
    margin-bottom: 2.5rem;
}

.nav-item-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.nav-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.nav-item-card img {
    width: 45px;
    height: 45px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-item-card span {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* WORKOUTS */
.week-block {
    margin-bottom: 2.5rem;
}

.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.week-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.nav-buttons .nav-button {
    background-color: #e9ecef;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #555;
    margin-left: 0.5rem;
    transition: background-color 0.2s ease;
}

.nav-buttons .nav-button:hover {
    background-color: #ced4da;
}

.workout-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.workout-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-date {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.75rem;
    padding: 0 1rem;
    padding-top: 1rem;
}

.video-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    position: relative;
    display: block;
    background-color: #ddd;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-size: 24px;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.video-thumbnail:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(0, 0, 0, 0.7);
}

.workout-card .card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.workout-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    flex-grow: 1;
}

.workout-card .card-text {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 1rem;
}

.workout-card .card-duration {
    font-size: 0.8rem;
    color: #888;
    font-weight: 600;
}

/* FOOTER */
.footer-section {
    background-color: #2c3e50;
    color: #bdc3c7;
    padding: 3rem 0;
    font-size: 0.9rem;
}

.footer-bottom-text {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 991.98px) {
    .header-main-section {
        min-height: 350px;
    }
    .header-content h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 575.98px) {
    .social-link-card span {
        font-size: 0.7rem;
    }
    .header-content h1 {
        font-size: 1.5rem;
    }
}

/* Убираем отступ у заголовка в карточке, если нет card-text */
.workout-card .card-body .card-title {
    margin-bottom: 0;
}

/* Стили для блока одного дня с несколькими видео */
.day-workout-block {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #dee2e6;
}

.day-workout-block .card-date {
    font-weight: 500;
    font-size: 0.9rem;
    color: #6c757d;
    padding: 0;
    margin-bottom: 0.75rem;
}

.workout-videos-container {
    display: flex;
    gap: 0.75rem;
    flex-grow: 1;
}

.workout-videos-container .workout-card {
    flex: 1;
    min-width: 0;
    box-shadow: none;
    border: 1px solid #e9ecef;
}

.workout-videos-container .workout-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.workout-videos-container .workout-card .card-date {
    display: none;
}

/* Стили для горизонтальной прокрутки блоков с тренировками */
.week-scroll-container {
    overflow-x: auto;
    padding-bottom: 1rem;
}

.week-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.week-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.week-scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.week-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.week-scroll-container .row {
    flex-wrap: nowrap;
    width: max-content;
}

.day-col-single,
.day-col-double {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.day-col-single {
    width: 300px;
}

.day-col-double {
    width: 600px;
}

.day-workout-block--highlighted {
    background-color: #e0e7ff;
    border-color: #c7d2fe;
}

/* --- СТИЛИ ДЛЯ "ЛИПКОГО" ФУТЕРА --- */
html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Основной контейнер страницы заставляет занимать все доступное пространство */
.container {
    flex-grow: 1;
}

.info-card {
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}
.section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 1rem;
    text-transform: uppercase;
}
.lecture-card {
    display: flex;
    align-items: center;
    background-color: #f0f0f0;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
}
.lecture-card .lecture-content {
    flex-grow: 1;
}
.lecture-card .lecture-tag {
    font-size: 0.8rem;
    font-weight: 600;
}
.lecture-card img {
    width: 180px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-left: 1.5rem;
}
.workout-card .video-thumbnail .number-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 2;
}