:root {
    --sc-teal: #006D6D;
    --sc-cell-bg: #EAEAEA;
    --sc-time-bg: #666666;
    --sc-border: #CCCCCC;
    --accent: #006D6D;
    --clay-base: #fffdfa;
    --clay-shadow: rgba(160, 140, 120, 0.15);
    --white: #ffffff;
    --transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #000;
    position: relative;
}

a {
    text-decoration: none;
}

.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    height: 6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 3.75rem;
    background-color: #000;
    color: #666666;
    z-index: 2000;
}

.navbar h3 {
    margin-left: 2rem;
    color: #FFF;
}

.logo {
    width: 8rem
}

.close-icon {
    display: none;
}

#nav-toggle.active .hamburger-icon {
    display: none;
}

#nav-toggle.active .close-icon {
    display: block;
}

#nav-toggle {
    display: none;
}

button {
    border: none;
}

.navbar nav a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 1.875rem;
    font-size: 0.9rem;
    letter-spacing: 0.0625rem;
    transition: color 0.3s ease;
}

.navbar nav a:hover {
    color: aqua;
}

.navbar nav a.highlighted1 {
    text-decoration: underline;
    text-underline-offset: 0.3125rem;
}

main {
    width: 100%;
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
}

.bg-main {
    background-image: url(../assets/img/sc-gym-background.jpg);
}

.bg-classes {
    background-image: url(../assets/img/sc-classes-background.jpg);
}

.bg-join {
    background-image: url(../assets/img/sc-join-background.jpg);
}

.calendar-container {
    margin-top: 8rem;
    width: 100%;
    overflow-x: auto;
    padding: 3.75rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.calendar-container::-webkit-scrollbar {
    height: 0.5rem;
    color: transparent;
}

.calendar-container::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 0.625rem;
}

.calendar-grid {
    display: flex;
    gap: 0.75rem;
    width: max-content;
    margin: 0 auto;
}

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

.time-col {
    width: 7.25rem;
    cursor: pointer;
}

.day-col {
    width: 11.25rem;
}

.cell,
.header-cell {
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.625rem;
}

.header-cell {
    background-color: var(--sc-teal);
    color: #FFF;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 0.125rem;
}

.img-cell {
    margin-block: 1rem;
}

#time-cell {
    margin-block: 1rem;
    transition: transform 0.2s ease;
}

#time-cell:hover {
    filter: brightness(1.2);
}

.cell {
    background-color: var(--sc-cell-bg);
    border: 0.0625rem solid var(--sc-border);
    color: #333;
    font-size: 1rem;
}

.time-col .cell {
    background-color: var(--sc-time-bg);
    color: #FFF;
    border: none;
    font-weight: bold;
}

.class-label {
    font-weight: 600;
}

.popup-overlay {
    position: fixed;
    bottom: 3rem;
    right: 1.25rem;
    z-index: 1000;
    pointer-events: none;
}

.popup-content {
    display: flex;
    align-items: flex-end;
    gap: 0.625rem;
    pointer-events: auto;
}

.speech-bubble {
    position: relative;
    background-color: var(--sc-teal);
    color: #FFF;
    padding: 1.25rem;
    width: 16.25rem;
    border-radius: 1rem;
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.2);
    margin-bottom: 1.25rem;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    right: -0.625rem;
    bottom: 1.25rem;
    border-top: 0.625rem solid transparent;
    border-bottom: 0.625rem solid transparent;
    border-left: 0.625rem solid var(--sc-teal);
}

.speech-bubble p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

#close-popup {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #FFF;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: bold;
    cursor: pointer;
    float: right;
    font-size: 0.7rem;
    transition: background-color 0.3s;
}

#close-popup:hover {
    background: rgba(255, 255, 255, 0.4);
}

.intro-img {
    width: 11rem;
    height: 11rem;
    object-fit: cover;
    border-radius: 50%;
    border: 0.1875rem solid var(--sc-teal);
    box-shadow: 0 0.25rem 0.9375rem rgba(0, 0, 0, 0.3);
}

main.splash-page {
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.splash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    width: 40rem;
    max-width: 85%;
}

.splash-logo {
    width: 100%;
}

.splash-logo img {
    width: 100%;
    height: auto;
    display: block;
}

.button {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background-color: var(--sc-teal);
    color: var(--white);
    text-decoration: none;
    border-radius: 0.25rem;
    font-weight: bold;
}

.timestamp {
    display: block;
    margin-bottom: 1rem;
}

footer {
    position: absolute;
    width: 100%;
    height: 10rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.25rem 3.75rem;
    background-color: #000;
    color: #ffffff;
    z-index: 2000;
}

.page-title {
    margin-top: 1rem;
    padding: 6.25rem 1.25rem 5rem;
    text-align: center;
    color: var(--white);
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.8rem;
    margin-bottom: 0.9375rem;
    letter-spacing: 0.125rem;
    font-weight: 700;
}

.subtitle {
    font-style: italic;
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    opacity: 0.8;
    letter-spacing: 0.0625rem;
    color: aqua;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 0.9375rem;
    margin: 0rem 0 3.125rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.875rem;
    border: 0.0625rem solid var(--white);
    background: transparent;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.09375rem;
    font-size: 0.8rem;
    color: var(--white);
    transition: var(--transition);
    border-radius: 0.125rem;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--accent);
    color: var(--white);
    box-shadow: 0 0.25rem 0.625rem var(--clay-shadow);
}

.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(21.25rem, 1fr));
    gap: 2.5rem;
    max-width: 75rem;
    margin: 0 auto 6.25rem;
    padding: 0 1.25rem;
}

.class-card {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.60), rgba(255, 255, 255, 0.60)),
        url(../assets/img/sc-clay-background.jpg);
    background-size: cover;
    background-position: center;
    padding: 3.125rem 2.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow:
        0.625rem 0.625rem 1.5625rem rgba(0, 0, 0, 0.1),
        inset 0.25rem 0.25rem 0.5rem rgba(255, 255, 255, 0.7),
        inset -0.25rem -0.25rem 0.75rem rgba(160, 140, 120, 0.2);
}

.class-card:hover {
    transform: translateY(-0.3125rem);
    box-shadow: 0.9375rem 0.9375rem 1.875rem rgba(0, 0, 0, 0.08);
}

.class-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15625rem;
    color: var(--accent);
    margin-bottom: 1.25rem;
    font-weight: 600;
    border-bottom: 0.0625rem solid #eee;
    padding-bottom: 0.625rem;
    display: inline-block;
}

.class-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.0625rem;
    font-weight: 700;
}

.schedule {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1.5625rem;
    color: #777;
    font-family: 'Montserrat', sans-serif;
}

.description {
    font-size: 1rem;
    color: #444;
    margin-bottom: 1.875rem;
    flex-grow: 1;
    font-weight: 300;
    opacity: 0.9;
}

.footer-note {
    font-style: italic;
    font-family: 'Playfair Display', serif;
    border-top: 0.0625rem solid rgba(160, 140, 120, 0.1);
    padding-top: 1.125rem;
    font-size: 0.95rem;
    color: var(--accent);
    letter-spacing: 0.03125rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none;
}

.admin-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #111;
    padding: 1.5rem;
    border-top: 0.125rem solid var(--sc-teal);
    z-index: 3000;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1.25rem;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.admin-bar.active {
    transform: translateY(0);
}

.admin-input {
    padding: 0.625rem;
    border-radius: 0.25rem;
    border: 0.0625rem solid var(--sc-border);
    width: 15.625rem;
}

.color-picker {
    display: flex;
    gap: 0.625rem;
}

.btn-swatch {
    width: 1.875rem;
    height: 1.875rem;
    border-radius: 50%;
    cursor: pointer;
    border: 0.125rem solid white;
}

.selected-cell {
    outline: 0.25rem solid #666666 !important;
    outline-offset: -0.25rem;
}

.save-btn {
    background: var(--sc-teal);
    color: white;
    padding: 0.625rem 1.25rem;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

.toggle-eye {
    background: none;
    margin-left: -2.1875rem;
    cursor: pointer;
    font-size: 1.2rem;
}

.cancel-link {
    background: none;
    color: grey;
    cursor: pointer;
    text-decoration: underline;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 0.9375rem;
}

.contact-container {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    max-width: 68.75rem;
    margin: 7.5rem auto 6.25rem;
    padding: 2rem 2rem;
    gap: 0;
}

.contact-image {
    flex: 0 0 40%;
    line-height: 0;
}

.contact-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 1rem 0 0 1rem;
    box-shadow: 0.625rem 0.625rem 1.5625rem rgba(0, 0, 0, 0.1);
}

.contact-card {
    flex: 1;
    border-radius: 0 1rem 1rem 0;
    margin: 0;
    min-height: auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 0.9375rem;
    border: 0.0625rem solid var(--sc-border);
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.25rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--sc-teal);
    background: var(--white);
}

@media screen and (max-width: 90rem) and (min-width: 64.0625rem) {
    .calendar-container {
        zoom: 0.8;
        transform: scale(0.8);
        transform-origin: top center;
    }
}

@media screen and (max-width: 64rem) {
    .navbar {
        padding: 1.25rem 2rem;
    }

    #nav-toggle {
        display: block;
        background: none;
        cursor: pointer;
        padding: 0;
    }

    #nav-toggle.active img {
        display: none;
    }

    #nav-toggle img {
        height: 100%;
        filter: invert(100%);
    }

    #primary-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        background-color: #fff;
        gap: 2rem;
        padding: 2rem;
        top: 6rem;
        left: 100%;
        height: 14rem;
        width: 100%;
        justify-content: center;
        align-items: center;
        transition: ease 500ms;
        z-index: 5000;

        p {
            color: #006D6D;
        }
    }

    #primary-nav a {
        color: var(--sc-teal);
        margin-left: 0;
        width: 6rem;
        text-align: right;
        transition: color 0.3s ease;
    }

    #primary-nav a:hover {
        color: #000;
    }

    #primary-nav.active {
        left: 0;
        display: flex;
    }

    .calendar-container {
        zoom: 0.8;
        transform: scale(0.8);
        transform-origin: top center;
    }

    .popup-overlay {
        right: 50%;
        transform: translateX(50%);
        bottom: 8rem;
    }

    .intro-img {
        width: 11rem;
        height: 11rem;
    }

    .speech-bubble {
        width: 20rem;
    }

    footer {
        font-size: 0.6rem;
    }

    h1 {
        font-size: 2.8rem;
    }

    .class-grid {
        grid-template-columns: 1fr;
        gap: 1.875rem;
        padding: 0 0.9375rem;
    }

    .class-card {
        padding: 2.5rem 1.875rem;
    }

    .admin-bar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
        height: auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .admin-input {
        width: 100%;
        max-width: 100%;
        font-size: 1rem;
    }

    .password-wrapper {
        width: 100%;
    }

    .admin-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 0.3125rem;
    }

    .save-btn {
        flex-grow: 1;
        margin-left: 0.625rem;
    }

    .status-text {
        margin: 0;
        text-align: center;
    }
}

@media screen and (max-width: 30rem) {
    .contact-container {
        flex-direction: column;
    }

    .contact-image {
        width: 100%;
    }

    .contact-image img {
        border-radius: 1rem 1rem 0 0;
    }

    .contact-card {
        border-radius: 0 0 1rem 1rem;
    }
}