
/* ==========================================================================
   TEMPERWORKS — CLASS CATALOG
   Template: template-parts/catalog.php
   SQL-driven class catalog presentation.

   IMPORTANT:
   This stylesheet is scoped exclusively to:
       .tw-class-list

   The SQL database remains the source of truth.
   ========================================================================== */


/* ==========================================================================
   ROOT
   ========================================================================== */

.tw-class-list {

    --tw-catalog-bg: #0b0d10;
    --tw-catalog-panel: #11151a;
    --tw-catalog-panel-2: #151a20;

    --tw-catalog-text: #e8edf2;
    --tw-catalog-heading: #ffffff;
    --tw-catalog-muted: #9ca7b1;
    --tw-catalog-subtle: #7f8a95;

    --tw-catalog-accent: #6ecbff;
    --tw-catalog-accent-soft: rgba(110, 203, 255, 0.08);

    --tw-catalog-gold: var(--accent-gold, #d6b25e);
    --tw-catalog-gold-soft: rgba(214, 178, 94, 0.08);
    --tw-catalog-gold-border: rgba(214, 178, 94, 0.42);
    --tw-catalog-gold-strong: rgba(214, 178, 94, 0.70);

    --tw-catalog-success: #6ee0ad;

    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;

    background: var(--tw-catalog-bg);
    color: var(--tw-catalog-text);

    box-sizing: border-box;
    overflow: visible;
    isolation: isolate;
}


/* ==========================================================================
   UNIVERSAL BOX MODEL
   ========================================================================== */

.tw-class-list *,
.tw-class-list *::before,
.tw-class-list *::after {
    box-sizing: border-box;
}


/* ==========================================================================
   TYPOGRAPHY PROTECTION
   ========================================================================== */

.tw-class-list h1,
.tw-class-list h2,
.tw-class-list h3,
.tw-class-list h4,
.tw-class-list h5,
.tw-class-list h6,
.tw-class-list p,
.tw-class-list span,
.tw-class-list div,
.tw-class-list article,
.tw-class-list section,
.tw-class-list header,
.tw-class-list footer {
    font-family: inherit;
}


/* ==========================================================================
   PROGRAM
   ========================================================================== */

.tw-class-list-program {

    position: relative;

    width: 100%;

    margin: 0;
    padding: 85px 0 95px;

    background:
        linear-gradient(
            180deg,
            #11151a 0%,
            #0b0d10 100%
        );

    color: #e8edf2;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.07);
}

.tw-class-list-program + .tw-class-list-program {
    padding-top: 95px;
}


/* ==========================================================================
   PROGRAM HEADER
   ========================================================================== */

.tw-class-list-program-header {

    position: relative;

    width: min(1200px, calc(100% - 40px));

    margin: 0 auto 55px;
    padding: 0;

    color: #e8edf2;
}

.tw-class-list-program-heading {

    max-width: 900px;

    margin: 0;
    padding: 0;
}


/* ==========================================================================
   PROGRAM TITLE
   ========================================================================== */

/*
 * Original:
 *     clamp(2.4rem, 5vw, 4.25rem)
 *
 * Reduced by approximately 40%.
 */

.tw-class-list-program-title {

    margin: 0 !important;
    padding: 0;

    color: #ffffff !important;

    font-size:
        clamp(
            1.44rem,
            3vw,
            2.55rem
        );

    line-height: 1.08;

    font-weight: 800;

    letter-spacing: -0.03em;
}


/* ==========================================================================
   PROGRAM DESCRIPTION
   ========================================================================== */

.tw-class-list-program-description {

    max-width: 820px;

    margin: 20px 0 0;
    padding: 0;

    color: #9ca7b1 !important;

    font-size: 1.05rem;
    line-height: 1.75;
}

.tw-class-list-program-description p {

    margin: 0 0 14px !important;
    padding: 0;

    color: #9ca7b1 !important;
}

.tw-class-list-program-description p:last-child {
    margin-bottom: 0 !important;
}


/* ==========================================================================
   PROGRAM ACCENT
   ========================================================================== */

.tw-class-list-program-header::after {

    display: block;

    width: 100%;
    max-width: 900px;
    height: 2px;

    margin-top: 28px;

    background:
        linear-gradient(
            90deg,
            var(--tw-catalog-gold) 0%,
            rgba(214, 178, 94, 0.25) 55%,
            transparent 100%
        );

    content: "";
}


/* ==========================================================================
   PROGRAM SECTIONS
   ========================================================================== */

.tw-class-list-sections {

    width: min(1200px, calc(100% - 40px));

    margin: 0 auto;
    padding: 0;
}


/* ==========================================================================
   SECTION
   ========================================================================== */

.tw-class-list-section {

    width: 100%;

    margin: 0 0 65px;
    padding: 0;

    background: transparent;
    color: #e8edf2;
}

.tw-class-list-section:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   SECTION HEADER
   ========================================================================== */

.tw-class-list-section-header {

    width: 100%;

    margin: 0 0 28px;
    padding: 0;

    color: #e8edf2;
}

.tw-class-list-section-heading {

    display: flex;

    align-items: baseline;

    gap: 14px;

    margin: 0 0 10px;
    padding: 0;
}


/* ==========================================================================
   SECTION CODE
   ========================================================================== */

.tw-class-list-section-code {

    flex: 0 0 auto;

    margin: 0;
    padding: 0;

    color: var(--tw-catalog-gold) !important;

    font-size: 0.68rem;
    line-height: 1;

    font-weight: 900;

    letter-spacing: 0.13em;

    text-transform: uppercase;
}


/* ==========================================================================
   SECTION TITLE
   ========================================================================== */

.tw-class-list-section-title {

    margin: 0 !important;
    padding: 0;

    color: #ffffff !important;

    font-size:
        clamp(
            1.55rem,
            3vw,
            2.25rem
        );

    line-height: 1.15;

    font-weight: 800;

    letter-spacing: -0.02em;
}


/* ==========================================================================
   SECTION DESCRIPTION
   ========================================================================== */

.tw-class-list-section-description {

    max-width: 800px;

    margin: 0;
    padding: 0;

    color: #808b96 !important;

    font-size: 0.92rem;
    line-height: 1.7;
}

.tw-class-list-section-description p {

    margin: 0 0 10px !important;
    padding: 0;

    color: #808b96 !important;
}

.tw-class-list-section-description p:last-child {
    margin-bottom: 0 !important;
}


/* ==========================================================================
   CLASS GRID
   ========================================================================== */

.tw-class-list-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;

    width: 100%;

    margin: 0;
    padding: 0;
}


/* ==========================================================================
   CLASS CARD
   ========================================================================== */

.tw-class-list-card {

    position: relative;

    display: flex;

    width: 100%;
    min-width: 0;
    min-height: 330px;

    margin: 0;
    padding: 0;

    background: transparent !important;

    color: #e8edf2;

    border: 0;

    overflow: visible;
}


/* ==========================================================================
   CARD INNER
   ========================================================================== */

.tw-class-list-card-inner {

    position: relative;

    display: flex;

    flex-direction: column;

    width: 100%;
    min-height: 330px;

    margin: 0;
    padding: 0;

    overflow: hidden;

    /*
     * GOLD CARD OUTLINE
     */
    border:
        1px solid var(--tw-catalog-gold-border);

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.018)
        ) !important;

    color: #e8edf2;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.14);

    transition:
        transform 220ms ease,
        border-color 220ms ease,
        box-shadow 220ms ease,
        background 220ms ease;
}


/* ==========================================================================
   CARD DECORATIVE GLOW
   ========================================================================== */

.tw-class-list-card-inner::before {

    position: absolute;

    z-index: 0;

    width: 150px;
    height: 150px;

    top: -75px;
    right: -65px;

    margin: 0;
    padding: 0;

    border-radius: 50%;

    background:
        rgba(214, 178, 94, 0.055);

    content: "";

    pointer-events: none;

    transition:
        transform 300ms ease,
        background 300ms ease;
}


/* ==========================================================================
   CARD HOVER
   ========================================================================== */

.tw-class-list-card:hover .tw-class-list-card-inner {

    transform: translateY(-6px);

    border-color:
        var(--tw-catalog-gold-strong);

    background:
        linear-gradient(
            145deg,
            rgba(214, 178, 94, 0.085),
            rgba(255, 255, 255, 0.025)
        ) !important;

    box-shadow:
        0 20px 48px rgba(0, 0, 0, 0.30),
        0 0 20px rgba(214, 178, 94, 0.08);
}

.tw-class-list-card:hover .tw-class-list-card-inner::before {

    transform: scale(1.8);

    background:
        rgba(214, 178, 94, 0.085);
}


/* ==========================================================================
   CARD HEADER
   ========================================================================== */

.tw-class-list-card-header {

    position: relative;

    z-index: 1;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    width: 100%;
    min-height: 72px;

    margin: 0;
    padding: 15px 18px;

    background:
        rgba(255, 255, 255, 0.025) !important;

    color: #e8edf2;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.06);
}


/* ==========================================================================
   CARD NUMBER
   ========================================================================== */

.tw-class-list-card-number {

    display: flex;

    width: 42px;
    height: 42px;

    flex: 0 0 42px;

    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    border:
        1px solid rgba(214, 178, 94, 0.38);

    border-radius: 12px;

    background:
        rgba(214, 178, 94, 0.07) !important;

    color:
        var(--tw-catalog-gold) !important;

    font-size: 0.78rem;

    line-height: 1;

    font-weight: 900;

    letter-spacing: 0.02em;
}


/* ==========================================================================
   STATUS
   ========================================================================== */

.tw-class-list-card-status {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 27px;

    margin: 0;
    padding: 6px 10px;

    border:
        1px solid rgba(255, 255, 255, 0.09);

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.035) !important;

    color: #77828d !important;

    font-size: 0.59rem;

    line-height: 1;

    font-weight: 900;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    white-space: nowrap;
}


/* ==========================================================================
   PUBLISHED / ACTIVE STATUS
   ========================================================================== */

.tw-class-list-card-status.published,
.tw-class-list-card-status.active {

    border-color:
        rgba(61, 220, 151, 0.24);

    background:
        rgba(61, 220, 151, 0.07) !important;

    color:
        #6ee0ad !important;
}


/* ==========================================================================
   DRAFT / INACTIVE STATUS
   ========================================================================== */

.tw-class-list-card-status.draft,
.tw-class-list-card-status.inactive {
    color: #858f99 !important;
}


/* ==========================================================================
   CARD CONTENT
   ========================================================================== */

.tw-class-list-card-content {

    position: relative;

    z-index: 1;

    display: flex;

    flex-direction: column;

    flex: 1;

    width: 100%;

    margin: 0;

    padding: 23px 20px 20px;

    background: transparent;

    color: #e8edf2;
}


/* ==========================================================================
   CLASS CODE
   ========================================================================== */

.tw-class-list-card-code {

    margin: 0 0 10px;
    padding: 0;

    color: #697580 !important;

    font-size: 0.64rem;

    line-height: 1.2;

    font-weight: 800;

    letter-spacing: 0.10em;

    text-transform: uppercase;
}


/* ==========================================================================
   CLASS TITLE
   ========================================================================== */

.tw-class-list-card-title {

    margin: 0 0 13px !important;
    padding: 0;

    color: #ffffff !important;

    font-size: 1.25rem;

    line-height: 1.25;

    font-weight: 800;

    letter-spacing: -0.015em;
}


/* ==========================================================================
   CLASS TITLE LINK
   ========================================================================== */

.tw-class-list-card-title a {

    display: inline;

    margin: 0;
    padding: 0;

    color: #ffffff !important;

    text-decoration: none !important;

    box-shadow: none !important;

    transition:
        color 180ms ease;
}

.tw-class-list-card-title a:visited {

    color: #ffffff !important;

    text-decoration: none !important;
}

.tw-class-list-card-title a:hover {

    color: var(--tw-catalog-gold) !important;

    text-decoration: none !important;

    box-shadow: none !important;
}

.tw-class-list-card-title a:active {
    color: var(--tw-catalog-gold) !important;
}


/* ==========================================================================
   CLASS DESCRIPTION
   ========================================================================== */

.tw-class-list-card-description {

    margin: 0;
    padding: 0;

    color: #8f9aa5 !important;

    font-size: 0.88rem;

    line-height: 1.65;
}

.tw-class-list-card-description p {

    margin: 0 0 10px !important;
    padding: 0;

    color: #8f9aa5 !important;
}

.tw-class-list-card-description p:last-child {
    margin-bottom: 0 !important;
}


/* ==========================================================================
   CARD META
   ========================================================================== */

.tw-class-list-card-meta {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    width: 100%;

    margin: auto 0 0;
    padding: 20px 0 0;

    background: transparent;

    color: #dce2e7;
}


/* ==========================================================================
   META ITEM
   ========================================================================== */

.tw-class-list-card-meta-item {

    display: flex;

    flex-direction: column;

    min-width: 0;

    margin: 0;
    padding: 0;

    gap: 5px;

    background: transparent;
}


/* ==========================================================================
   META LABEL
   ========================================================================== */

.tw-class-list-card-meta-label {

    margin: 0;
    padding: 0;

    color: #65717c !important;

    font-size: 0.61rem;

    line-height: 1.2;

    font-weight: 900;

    letter-spacing: 0.09em;

    text-transform: uppercase;
}


/* ==========================================================================
   META VALUE
   ========================================================================== */

.tw-class-list-card-meta-value {

    margin: 0;
    padding: 0;

    color: #dce2e7 !important;

    font-size: 0.76rem;

    line-height: 1.35;

    font-weight: 700;
}


/* ==========================================================================
   CARD FOOTER
   ========================================================================== */

.tw-class-list-card-footer {

    position: relative;

    z-index: 1;

    display: flex;

    align-items: center;

    justify-content: flex-end;

    width: 100%;

    min-height: 62px;

    margin: 0;

    padding: 12px 18px;

    background:
        rgba(5, 7, 10, 0.38) !important;

    color: #e8edf2;

    border-top:
        1px solid rgba(255, 255, 255, 0.06);
}


/* ==========================================================================
   CARD ACTION
   ========================================================================== */

.tw-class-list-card-action {

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    min-height: 35px;

    margin: 0;
    padding: 8px 13px;

    border:
        1px solid rgba(214, 178, 94, 0.38);

    border-radius: 999px;

    background:
        rgba(214, 178, 94, 0.045) !important;

    color:
        var(--tw-catalog-gold) !important;

    font-size: 0.68rem;

    line-height: 1;

    font-weight: 900;

    letter-spacing: 0.06em;

    text-decoration: none !important;

    box-shadow: none !important;

    white-space: nowrap;

    transition:
        background 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.tw-class-list-card-action:visited {

    color:
        var(--tw-catalog-gold) !important;

    text-decoration: none !important;
}

.tw-class-list-card-action:hover {

    background:
        rgba(214, 178, 94, 0.13) !important;

    border-color:
        var(--tw-catalog-gold-strong);

    color:
        #ffffff !important;

    transform: translateX(3px);

    text-decoration: none !important;

    box-shadow: none !important;
}

.tw-class-list-card-action:active {
    color: #ffffff !important;
}


/* ==========================================================================
   ACTION ARROW
   ========================================================================== */

.tw-class-list-card-arrow {

    display: inline-block;

    margin: 0;
    padding: 0;

    color:
        var(--tw-catalog-gold) !important;

    font-size: 1rem;

    line-height: 1;

    transition:
        transform 180ms ease;
}

.tw-class-list-card-action:hover .tw-class-list-card-arrow {
    transform: translateX(3px);
}


/* ==========================================================================
   EMPTY PROGRAM
   ========================================================================== */

.tw-class-list-empty {

    width: 100%;

    margin: 0;
    padding: 120px 20px;

    background: #0b0d10;

    color: #e8edf2;
}

.tw-class-list-empty-inner {

    width: min(720px, 100%);

    margin: 0 auto;
    padding: 55px 45px;

    border:
        1px solid rgba(255, 255, 255, 0.08);

    border-radius: 28px;

    background:
        rgba(255, 255, 255, 0.025);

    color: #e8edf2;

    text-align: center;
}

.tw-class-list-empty-eyebrow {

    display: inline-block;

    margin: 0 0 15px;
    padding: 0;

    color:
        var(--tw-catalog-gold) !important;

    font-size: 0.68rem;

    line-height: 1.2;

    font-weight: 900;

    letter-spacing: 0.15em;

    text-transform: uppercase;
}

.tw-class-list-empty-inner h2 {

    margin: 0 0 15px !important;
    padding: 0;

    color: #ffffff !important;

    font-size: 2.1rem;

    line-height: 1.15;

    font-weight: 800;
}

.tw-class-list-empty-inner p {

    margin: 0 !important;
    padding: 0;

    color: #8d98a3 !important;

    font-size: 0.95rem;

    line-height: 1.7;
}


/* ==========================================================================
   EMPTY SECTION
   ========================================================================== */

.tw-class-list-empty-section,
.tw-class-list-no-classes {

    width: 100%;

    margin: 0;
    padding: 35px;

    border:
        1px solid rgba(255, 255, 255, 0.07);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.025);

    color: #e8edf2;

    text-align: center;
}

.tw-class-list-empty-section p,
.tw-class-list-no-classes p {

    margin: 0 !important;
    padding: 0;

    color: #7f8a95 !important;

    font-size: 0.88rem;

    line-height: 1.6;
}


/* ==========================================================================
   GLOBAL CATALOG LINK PROTECTION
   ========================================================================== */

.tw-class-list a {

    color: inherit;

    text-decoration: none;

    box-shadow: none !important;
}

.tw-class-list a:visited {

    color: inherit;

    box-shadow: none !important;
}

.tw-class-list a:hover {
    box-shadow: none !important;
}


/* ==========================================================================
   GLOBAL CATALOG HEADING PROTECTION
   ========================================================================== */

.tw-class-list h1,
.tw-class-list h2,
.tw-class-list h3,
.tw-class-list h4,
.tw-class-list h5,
.tw-class-list h6 {

    margin-left: 0 !important;
    margin-right: 0 !important;

    padding-left: 0;
    padding-right: 0;
}


/* ==========================================================================
   PROGRAM / SECTION / CARD ELEMENT RESET
   ========================================================================== */

.tw-class-list .tw-class-list-program *,
.tw-class-list .tw-class-list-section *,
.tw-class-list .tw-class-list-card * {
    max-width: none;
}


/* ==========================================================================
   INTENTIONAL MAXIMUM WIDTHS
   ========================================================================== */

.tw-class-list .tw-class-list-program-heading {
    max-width: 900px;
}

.tw-class-list .tw-class-list-program-description {
    max-width: 820px;
}

.tw-class-list .tw-class-list-section-description {
    max-width: 800px;
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1050px) {

    .tw-class-list-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 700px) {

    .tw-class-list-program {
        padding: 65px 0 75px;
    }

    .tw-class-list-program + .tw-class-list-program {
        padding-top: 75px;
    }

    .tw-class-list-program-header,
    .tw-class-list-sections {
        width: calc(100% - 28px);
    }

    .tw-class-list-program-header {
        margin-bottom: 42px;
    }

    /*
     * Program title remains approximately 40% smaller
     * than the original mobile size.
     */
    .tw-class-list-program-title {
        font-size: 1.47rem;
    }

    .tw-class-list-program-description {
        font-size: 0.96rem;
    }

    .tw-class-list-section {
        margin-bottom: 50px;
    }

    .tw-class-list-section-heading {

        align-items: flex-start;

        flex-direction: column;

        gap: 7px;
    }

    .tw-class-list-section-title {
        font-size: 1.75rem;
    }

    .tw-class-list-grid {

        grid-template-columns: 1fr;

        gap: 16px;
    }

    .tw-class-list-card,
    .tw-class-list-card-inner {
        min-height: 0;
    }

    .tw-class-list-card-content {
        padding: 22px 18px 19px;
    }

    .tw-class-list-card-footer {
        padding: 12px 18px;
    }
}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 420px) {

    .tw-class-list-program-title {
        font-size: 1.29rem;
    }

    .tw-class-list-card-header {

        min-height: 66px;

        padding: 13px 15px;
    }

    .tw-class-list-card-number {

        width: 38px;
        height: 38px;

        flex-basis: 38px;

        border-radius: 10px;
    }

    .tw-class-list-card-title {
        font-size: 1.12rem;
    }

    .tw-class-list-card-meta {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.tw-class-list-card-title a:focus-visible,
.tw-class-list-card-action:focus-visible {

    outline:
        2px solid var(--tw-catalog-gold);

    outline-offset: 4px;

    border-radius: 5px;
}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .tw-class-list *,
    .tw-class-list *::before,
    .tw-class-list *::after {

        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;
    }
}

