.fitness-schedule {
    position: relative;
}

.fitness-header {
    margin-bottom: 2rem;
}

.fitness-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.fitness-link-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.fitness-link-button:hover {
    background-color: #34495e;
    color: white;
}

.schedule-adjustments {
    border: 1px solid #e5e7eb;
    padding: 1rem;
    border-radius: 0.5rem;
}

.filter-container {
    margin-bottom: 2rem;
}

.filter-toggle {
    display: none;
    width: 90%;
    margin: 0 auto;
    padding: 0.75rem;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
}

.filters-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.filters-form select,
.filters-form button,
.filters-form a {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 1rem;
}

.filters-form button {
    background-color: #2c3e50;
    color: white;
    cursor: pointer;
}

.filters-form a {
    text-decoration: none;
}

.fitness-schedule h1 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.fitness-schedule .schedule-container {
    position: relative;
    padding: 0 2.5rem;
}

.fitness-schedule .schedule-slider {
    position: relative;
    overflow: hidden;
}

.fitness-schedule .schedule-grid {
    display: flex;
    gap: 1rem;
    transition: transform 0.3s ease-in-out;
    will-change: transform;
}

.fitness-schedule .schedule-day {
    flex: 0 0 calc((100% - 2rem) / 3);
    box-sizing: border-box;
    min-width: 0;
}

.fitness-schedule .schedule-day:not(:last-child) {
    border-right: 1px solid #e5e7eb;
    padding-right: 1rem;
}

.fitness-schedule .schedule-day h2 {
    margin: 0 0 0.85rem;
    font-size: 1.25rem;
    color: #1f2937;
    text-align: center;
}

.fitness-schedule .schedule-cards {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.fitness-schedule .schedule-card {
    position: relative;
    background-color: #f8fafc;
    border-top: 5px solid var(--card-accent-color, #7f8c8d);
    border-right: 1px solid var(--card-accent-color, #7f8c8d);
    border-bottom: 1px solid var(--card-accent-color, #7f8c8d);
    border-left: 1px solid var(--card-accent-color, #7f8c8d);
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
    padding: 0;
    margin-bottom: 0;
    text-align: left;
    cursor: pointer;
}

.fitness-schedule .schedule-card.past-class {
    background-color: #e5e7eb;
    color: #6b7280;
    border-color: #d1d5db !important;
}

.fitness-schedule .schedule-card.past-class .card-title {
    border-bottom-color: #d1d5db;
}

.fitness-schedule .schedule-card.past-class .card-title,
.fitness-schedule .schedule-card.past-class .card-text strong {
    color: #4b5563;
}

.fitness-schedule .schedule-card.past-class .card-instructor-photo img {
    filter: grayscale(100%);
    opacity: 0.7;
}

.fitness-schedule .schedule-card.past-class .card-text-instructor,
.fitness-schedule .schedule-card.past-class .card-text-location {
    display: none;
}

.fitness-schedule .schedule-card.canceled-class {
    opacity: 0.7;
}

.fitness-schedule .schedule-card.canceled-class .card-text-instructor,
.fitness-schedule .schedule-card.canceled-class .card-text-location {
    display: none;
}

.fitness-schedule .schedule-card.canceled-class .card-text {
    text-decoration: line-through;
}

.fitness-schedule .schedule-card.canceled-class .cancellation-reason {
    text-decoration: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .7;
    }
}

.new-flag {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #196f3d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.canceled-flag {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: #b91c1c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.new-class .canceled-flag {
    top: 2.2rem;
}

.cancellation-reason {
    font-style: italic;
    color: #b91c1c;
}

.fitness-schedule .schedule-card .card-title {
    border-bottom: 1px solid var(--card-accent-color, #d1d5db);
    padding: 0.5rem;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
}

.fitness-schedule .schedule-card .card-body {
    padding: 1rem;
}

.fitness-schedule .schedule-card .card-details {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.fitness-schedule .schedule-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex-grow: 1;
}

.fitness-schedule .schedule-card .card-instructor-photo {
    flex-shrink: 0;
}

.fitness-schedule .schedule-card .card-instructor-photo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.fitness-schedule .schedule-card .card-text {
    margin: 0;
    color: #374151;
    line-height: 1.5;
    font-size: 0.95rem;
}

.fitness-schedule .schedule-card .card-text strong {
    color: #111827;
}

.fitness-schedule .schedule-nav {
    position: fixed;
    top: 50vh;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    padding: 0.7rem 0.95rem;
    line-height: 1;
    cursor: pointer;
    z-index: 20;
}

.fitness-schedule .schedule-nav:disabled {
    opacity: 0.3;
    cursor: default;
}

.modal {
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 0.5rem;
    position: relative;
}

.modal-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-content .text-strikethrough {
    text-decoration: line-through;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-instructor-info {
    margin: 1rem 0;
}

.modal-instructor-info h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.modal-instructor-photo-bio {
    float: right;
    margin-left: 1rem;
    margin-bottom: 0.5rem;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

@media (max-width: 767px) {
    .fitness-schedule .schedule-day {
        flex-basis: 100%;
    }

    .fitness-links {
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }

    .filter-toggle {
        display: block;
    }

    .filters-form {
        display: none;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }

    .filters-form.active {
        display: flex;
    }

    .card-text-instructor,
    .card-text-location {
        display: none;
    }
}
