/* TorahMates page */

.torahmates main {
    color: #1f2937;
    font-family: 'Open Sans', sans-serif;
    font-size: 17px;
    line-height: 28px;
    padding-bottom: 96px;
}

.torahmates main p {
    margin: 0 0 20px;
}

.torahmates .tm-heading {
    font-family: 'Sofia Sans', 'Sofia Rough W05 Black Two', 'century gothic', sans-serif;
    font-weight: 900;
    font-size: 41.6px;
    line-height: 47.84px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #333;
    margin: 0 0 20px;
}

.torahmates .tm-eyebrow {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 23.1px;
    letter-spacing: 2.24px;
    text-transform: uppercase;
    color: #005f4c;
    margin: 0 0 16px;
}

.torahmates .tm-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 15px;
    line-height: 24.75px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: 2px solid #004537;
    border-radius: 2px;
    color: #004537;
    padding: 17.5px 28px 18.25px;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.torahmates .tm-btn:hover,
.torahmates .tm-btn:focus {
    background: #004537;
    color: white;
    text-decoration: none;
}

.torahmates .tm-btn:hover img,
.torahmates .tm-btn:focus img {
    filter: brightness(0) invert(1);
}

.torahmates .tm-section {
    max-width: 1240px;
    margin: 96px auto 0;
    padding: 0 16px;
    box-sizing: content-box;
}

/* Hero */

.torahmates .tm-hero {
    position: relative;
    overflow: hidden;
    background: #eaf5f1;
    padding: 96px 16px 112px;
}

.torahmates .tm-hero-content {
    position: relative;
    z-index: 1;
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 23.9px;
    text-align: center;
}

.torahmates .tm-hero .tm-eyebrow {
    font-size: 15px;
    line-height: 24.75px;
    letter-spacing: 2.4px;
    margin: 0;
}

.torahmates .tm-hero h1 {
    font-family: 'Sofia Sans', 'Sofia Rough W05 Black Two', 'century gothic', sans-serif;
    font-weight: 900;
    font-size: 60px;
    line-height: 66px;
    letter-spacing: 2px;
    color: #333;
    margin: 0;
}

.torahmates .tm-hero-text {
    max-width: 544px;
    font-size: 20px;
    line-height: 33px;
    color: #374151;
    margin: 0 !important;
}

.torahmates .tm-hero .tm-btn {
    margin-top: 8px;
}

.torahmates .tm-polaroids {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 32px;
    margin-top: 56px;
}

.torahmates .tm-polaroid {
    position: relative;
    background: white;
    padding: 10px 10px 0;
    filter: drop-shadow(0 10px 12px rgba(0, 69, 55, 0.18));
    transform: rotate(var(--tm-rotate));
}

.torahmates .tm-polaroid-photo {
    position: relative;
    overflow: hidden;
}

.torahmates .tm-polaroid-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.torahmates .tm-polaroid-caption {
    font-family: 'Caveat', cursive;
    font-size: 22px;
    line-height: 36.3px;
    color: #374151;
    text-align: center;
    padding: 5.5px 0 9.8px;
    margin: 0 !important;
}

.torahmates .tm-tape {
    position: absolute;
    top: -12px;
    width: 72px;
    height: 24px;
    background: rgba(255, 236, 170, 0.85);
}

.torahmates .tm-tape-blue {
    top: -10px;
    background: rgba(190, 225, 240, 0.85);
}

.torahmates .tm-polaroid-1 { --tm-rotate: -7deg; width: 210px; }
.torahmates .tm-polaroid-1 .tm-polaroid-photo { height: 150px; }
.torahmates .tm-polaroid-1 .tm-polaroid-photo img { object-position: 40% center; }
.torahmates .tm-polaroid-1 .tm-tape { left: 50%; transform: translateX(-50%) rotate(3deg); }

.torahmates .tm-polaroid-2 { --tm-rotate: 5deg; width: 190px; }
.torahmates .tm-polaroid-2 .tm-polaroid-photo { height: 130px; }
.torahmates .tm-polaroid-2 .tm-tape { left: 14px; width: 60px; height: 22px; transform: rotate(-12deg); }

.torahmates .tm-polaroid-3 { --tm-rotate: 6deg; width: 200px; }
.torahmates .tm-polaroid-3 .tm-polaroid-photo { height: 140px; }
.torahmates .tm-polaroid-3 .tm-tape { left: 50%; width: 68px; transform: translateX(-50%) rotate(-4deg); }

.torahmates .tm-polaroid-4 { --tm-rotate: -5deg; width: 185px; }
.torahmates .tm-polaroid-4 .tm-polaroid-photo { height: 125px; }
.torahmates .tm-polaroid-4 .tm-tape { right: 14px; width: 58px; height: 22px; transform: rotate(10deg); }

/* Meet your child's TorahMate */

.torahmates .tm-meet {
    display: flex;
    align-items: center;
    gap: 64px;
}

.torahmates .tm-meet-photo {
    position: relative;
    flex: 0 0 557px;
    max-width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px dashed #6fb3a2;
    border-radius: 50%;
}

.torahmates .tm-meet-photo img {
    position: absolute;
    width: 228.22%;
    height: 152.17%;
    left: -49.59%;
    top: -51.2%;
    max-width: none;
}

.torahmates .tm-meet-text {
    flex: 1 1 618px;
}

.torahmates .tm-features {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.torahmates .tm-feature {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    background: #eaf5f1;
    border-radius: 6px;
    padding: 18px;
    font-weight: 700;
    color: #004537;
}

.torahmates .tm-feature img {
    width: 26px;
    height: 26px;
}

/* Tip for parents */

.torahmates .tm-tip {
    max-width: 1240px;
    margin: 96px auto 0;
    display: flex;
    align-items: center;
    gap: 48px;
    background: #e6f3f8;
    border-radius: 12px;
    padding: 64px;
    box-sizing: content-box;
}

.torahmates .tm-tip .tm-eyebrow {
    color: #004537;
}

.torahmates .tm-tip .tm-heading {
    font-size: 36.8px;
    line-height: 42.32px;
    margin-bottom: 15px;
}

.torahmates .tm-tip-text {
    flex: 1 1 612px;
}

.torahmates .tm-tip-text p:last-child {
    margin-bottom: 0;
}

.torahmates .tm-schedule {
    flex: 0 1 580px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: white;
    border-radius: 8px;
    padding: 23px 24px 24px;
    filter: drop-shadow(0 8px 12px rgba(0, 69, 55, 0.08));
}

.torahmates .tm-schedule-title {
    font-weight: 700;
    color: #004537;
    margin: 0 !important;
}

.torahmates .tm-days {
    display: flex;
    gap: 6px;
}

.torahmates .tm-day {
    flex: 1 1 0;
    border: 0;
    border-radius: 4px;
    background: #eaf5f1;
    color: #4b5563;
    font-weight: 700;
    font-size: 14px;
    line-height: 23.1px;
    padding: 11.5px 0 11.59px;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.torahmates .tm-day:last-child {
    color: #6b7280;
}

.torahmates .tm-day:hover {
    background: #d5ebe3;
}

.torahmates .tm-day.active {
    background: #005f4c;
    color: white;
}

.torahmates .tm-routine {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    background: #eaf5f1;
    border-radius: 6px;
    padding: 14px 16px;
    font-weight: 600;
    color: #004537;
}

.torahmates .tm-routine img {
    flex: none;
    width: 22px;
    height: 22px;
}

/* ZoneBucks */

.torahmates .tm-zonebucks {
    display: flex;
    align-items: center;
    gap: 64px;
}

.torahmates .tm-zonebucks-text {
    flex: 1 1 618px;
}

.torahmates .tm-zonebucks-tagline {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 22.4px;
    line-height: 36.96px;
    color: #005f4c;
    margin: 0 !important;
}

.torahmates .tm-card-wrap {
    flex: 0 1 558px;
    display: flex;
    justify-content: center;
    padding: 25.67px 69px 25.67px 60.28px;
}

.torahmates .tm-card-stage {
    position: relative;
    width: 100%;
    max-width: 420px;
}

.torahmates .tm-card {
    aspect-ratio: 420 / 264.81;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #004537;
    border-radius: 18px;
    padding: 28px;
    filter: drop-shadow(0 24px 24px rgba(0, 69, 55, 0.28));
    transform: rotate(-4deg);
}

.torahmates .tm-card-top,
.torahmates .tm-card-bottom {
    display: flex;
    justify-content: space-between;
}

.torahmates .tm-card-top {
    align-items: center;
}

.torahmates .tm-card-bottom {
    align-items: flex-end;
    font-weight: 600;
    color: #cfe6df;
}

.torahmates .tm-card-name {
    font-family: 'Jost', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 39.6px;
    letter-spacing: 0.48px;
    color: white;
}

.torahmates .tm-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 44px;
    background: white;
    border-radius: 8px;
    padding: 4px;
}

.torahmates .tm-card-logo img {
    height: 100%;
}

.torahmates .tm-card-chip {
    width: 52px;
    height: 38px;
    background: #e9c46a;
    border-radius: 8px;
}

.torahmates .tm-card-number {
    letter-spacing: 2.04px;
}

.torahmates .tm-card-type {
    font-size: 13px;
    line-height: 21.45px;
}

.torahmates .tm-card-deco {
    position: absolute;
    max-width: none;
}

.torahmates .tm-card-deco-1 { right: -22px; top: -19.67px; }
.torahmates .tm-card-deco-2 { right: -44px; top: 20.33px; }
.torahmates .tm-card-deco-3 { left: -17.28px; bottom: -15.65px; }
.torahmates .tm-card-deco-4 { left: -39.3px; top: -25.7px; transform: rotate(-28.24deg); }
.torahmates .tm-card-deco-5 { right: -40px; bottom: -19.7px; transform: rotate(144.15deg); }

/* TorahMates in action */

.torahmates .tm-action .tm-heading {
    text-align: center;
    margin-bottom: 32px;
}

.torahmates .tm-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 220px;
    gap: 16px;
}

.torahmates .tm-gallery-item {
    position: relative;
    overflow: hidden;
    border: 2px dashed #6fb3a2;
    border-radius: 6px;
}

.torahmates .tm-gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

.torahmates .tm-gallery-1 { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.torahmates .tm-gallery-1 img { object-position: center 30%; }

.torahmates .tm-gallery-2 { grid-column: 3; grid-row: 1; }

.torahmates .tm-gallery-3 { grid-column: 4; grid-row: 1; }

.torahmates .tm-gallery-4 { grid-column: 3; grid-row: 2; }
.torahmates .tm-gallery-4 img { object-position: 55% 40%; }

.torahmates .tm-gallery-5 { grid-column: 4; grid-row: 2; }
.torahmates .tm-gallery-5 img { object-position: center 70%; }

/* TorahMates for parents */

.torahmates .tm-parents {
    max-width: 1240px;
    margin: 96px auto 0;
    display: flex;
    align-items: center;
    gap: 48px;
    background: #1c4e8a;
    border-radius: 12px;
    padding: 80px;
    box-sizing: content-box;
    color: #dce8f7;
}

.torahmates .tm-parents .tm-eyebrow {
    color: #b9d4f5;
    margin-bottom: 20px;
}

.torahmates .tm-parents .tm-heading {
    color: white;
}

.torahmates .tm-parents-text {
    flex: 1 1 696px;
}

.torahmates .tm-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.torahmates .tm-pills li {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    padding: 8px 14px;
    font-weight: 600;
    font-size: 15px;
    line-height: 24.75px;
    color: white;
}

.torahmates .tm-parents-cta {
    flex: 0 1 496px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    font-size: 15px;
    line-height: 24.75px;
}

.torahmates .tm-parents-cta p {
    margin: 0;
}

.torahmates .tm-btn-white {
    background: white;
    border-color: white;
    color: #1c4e8a;
    padding: 20px 30px;
}

.torahmates .tm-btn-white:hover,
.torahmates .tm-btn-white:focus {
    background: transparent;
    color: white;
}

.torahmates .tm-parents-cta a:not(.tm-btn) {
    color: white;
    text-decoration: underline;
}

/* Hero polaroids float beside the headline on wide screens */
@media (min-width: 1400px) {
    .torahmates .tm-polaroids {
        display: block;
        margin: 0;
    }

    .torahmates .tm-polaroid {
        position: absolute;
        transform: translate(-50%, -50%) rotate(var(--tm-rotate));
    }

    .torahmates .tm-polaroid-1 { left: calc(50% - 585px); top: 154px; }
    .torahmates .tm-polaroid-2 { left: calc(50% - 555px); top: 396px; }
    .torahmates .tm-polaroid-3 { left: calc(50% + 590px); top: 157px; }
    .torahmates .tm-polaroid-4 { left: calc(50% + 552px); top: 404px; }
}

@media (max-width: 1399px) {
    .torahmates .tm-tip,
    .torahmates .tm-parents {
        margin-left: 16px;
        margin-right: 16px;
    }
}

@media (max-width: 1199px) {
    .torahmates .tm-meet,
    .torahmates .tm-zonebucks,
    .torahmates .tm-tip,
    .torahmates .tm-parents {
        flex-direction: column;
        align-items: stretch;
    }

    .torahmates .tm-meet-photo {
        flex-basis: auto;
        width: 557px;
        align-self: center;
    }

    .torahmates .tm-tip-text,
    .torahmates .tm-schedule,
    .torahmates .tm-zonebucks-text,
    .torahmates .tm-card-wrap,
    .torahmates .tm-parents-text,
    .torahmates .tm-parents-cta {
        flex-basis: auto;
    }

    .torahmates .tm-zonebucks {
        gap: 48px;
    }
}

@media (max-width: 767px) {
    .torahmates main {
        padding-bottom: 64px;
    }

    .torahmates .tm-hero {
        padding: 64px 16px 72px;
    }

    .torahmates .tm-hero h1 {
        font-size: 36px;
        line-height: 40px;
    }

    .torahmates .tm-hero-text {
        font-size: 18px;
        line-height: 29px;
    }

    .torahmates .tm-heading {
        font-size: 30px;
        line-height: 35px;
    }

    .torahmates .tm-tip .tm-heading {
        font-size: 28px;
        line-height: 33px;
    }

    .torahmates .tm-section,
    .torahmates .tm-tip,
    .torahmates .tm-parents {
        margin-top: 64px;
    }

    .torahmates .tm-meet,
    .torahmates .tm-zonebucks {
        gap: 40px;
    }

    .torahmates .tm-features {
        flex-direction: column;
    }

    .torahmates .tm-tip {
        padding: 32px 20px;
    }

    .torahmates .tm-schedule {
        padding: 20px 16px;
    }

    .torahmates .tm-card-wrap {
        padding: 24px 40px;
    }

    .torahmates .tm-card {
        padding: 20px;
    }

    .torahmates .tm-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 160px;
        gap: 12px;
    }

    .torahmates .tm-gallery-1 { grid-column: 1 / span 2; grid-row: 1 / span 2; }
    .torahmates .tm-gallery-2 { grid-column: 1; grid-row: 3; }
    .torahmates .tm-gallery-3 { grid-column: 2; grid-row: 3; }
    .torahmates .tm-gallery-4 { grid-column: 1; grid-row: 4; }
    .torahmates .tm-gallery-5 { grid-column: 2; grid-row: 4; }

    .torahmates .tm-parents {
        padding: 40px 24px;
    }

    .torahmates .tm-btn-white {
        padding: 16px 20px;
        white-space: normal;
    }
}
