/**
 * GPS home page sections (Elementor widgets GPS Section Heading, GPS Seminar
 * Promo, GPS Upcoming Courses, GPS Sponsors). Same language as /courses/
 * (gps-catalog.css, whose course card rules also apply inside .gps-home),
 * the course page and the seminar page. Loaded only where these widgets render.
 */

.gps-home {
    --gps-navy: #193463;
    --gps-navy-deep: #13254d;
    --gps-blue: #0B52AC;
    --gps-gold: #DDC89D;
    --gps-gold-ink: #8a6d38; /* 4.5:1+ on white and #f5f7fb (WCAG AA) */
    --gps-ink: #1b2436;
    --gps-muted: #5b6880;
    --gps-line: #dde3ec;
    --gps-field: #f7f9fc;
    --gps-ok: #1d7a4e;
    --gps-font: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
    font-family: var(--gps-font);
    color: var(--gps-ink);
    min-width: 0;
}

.gps-home *,
.gps-home *::before,
.gps-home *::after {
    box-sizing: border-box;
}

.gps-home a:focus-visible {
    outline: 3px solid rgba(11, 82, 172, .45);
    outline-offset: 2px;
}

/* ---------- section header ---------- */
.gps-home .gps-home-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px 24px;
    margin: 0 0 24px;
}

.gps-home .gps-home-head__text {
    min-width: 0;
}

.gps-home .gps-home-head--center {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gps-home .gps-home-eyebrow {
    margin: 0 0 8px;
    font-family: var(--gps-font);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gps-gold-ink);
}

.gps-home .gps-home-eyebrow--dark {
    color: var(--gps-gold);
}

.gps-home .gps-home-title {
    margin: 0;
    font-family: var(--gps-font);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0;
    color: var(--gps-navy-deep);
    text-wrap: balance;
    overflow-wrap: break-word;
}

.gps-home .gps-home-link {
    font-family: var(--gps-font);
    font-size: 14px;
    font-weight: 700;
    color: var(--gps-blue);
    text-decoration: none;
    white-space: nowrap;
}

.gps-home .gps-home-link:hover {
    color: var(--gps-navy);
    text-decoration: underline;
}

/* ---------- upcoming courses ---------- */
.gps-home .gps-home-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.gps-home .gps-home-fill {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border-radius: 14px;
}

/* Same 170px band as a course card's image, so the row reads as one set */
.gps-home .gps-home-fill__media {
    position: relative;
    flex: none;
    height: 170px;
    background: var(--gps-navy-deep);
}

.gps-home .gps-home-fill__media--past {
    /* One photo, framed like a course card cover */
    background-color: var(--gps-navy-deep);
    background-size: cover;
    background-position: center;
}

.gps-home .gps-home-fill__media--past::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(19, 37, 77, .15) 0%, rgba(19, 37, 77, .55) 100%);
}

.gps-home .gps-home-fill__media--ce {
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(120% 120% at 100% 0%, #234a8c 0%, var(--gps-navy-deep) 60%);
}

.gps-home .gps-home-fill__logo {
    display: block;
    width: auto;
    max-width: 62%;
    max-height: 92px;
    height: auto;
}

.gps-home .gps-home-fill__badge {
    position: absolute;
    left: 14px;
    top: 14px;
    z-index: 1;
    padding: 4px 9px;
    border-radius: 4px;
    background: var(--gps-navy-deep);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.gps-home .gps-home-fill__badge--gold {
    left: auto;
    right: 14px;
    background: #f3e7c6;
    color: #6f5822;
}

.gps-home .gps-home-fill__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 20px 22px 22px;
}

.gps-home .gps-home-fill__list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gps-home .gps-home-fill__list li + li {
    border-top: 1px solid var(--gps-line);
}

.gps-home .gps-home-fill__list a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    text-decoration: none;
}

.gps-home .gps-home-fill__list strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    color: var(--gps-navy-deep);
}

.gps-home .gps-home-fill__list span {
    font-size: 12px;
    color: var(--gps-muted);
}

.gps-home .gps-home-fill__list a:hover strong {
    color: var(--gps-blue);
}

.gps-home .gps-home-fill .gps-home-eyebrow {
    margin: 0;
}

.gps-home .gps-home-fill--more,
.gps-home .gps-home-fill--ce {
    background: #fff;
    box-shadow: 0 1px 0 var(--gps-line), 0 14px 30px -22px rgba(18, 38, 74, .55);
}

.gps-home .gps-home-fill__title {
    margin: 0;
    font-family: var(--gps-font);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--gps-navy-deep);
    overflow-wrap: break-word;
}

.gps-home .gps-home-fill__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gps-muted);
}

.gps-home .gps-home-fill__link {
    margin-top: auto;
    padding-top: 6px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gps-blue);
    text-decoration: none;
}

.gps-home .gps-home-fill__link:hover {
    color: var(--gps-navy);
    text-decoration: underline;
}

/* ---------- seminar promo ---------- */
.gps-home .gps-home-sem__card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
    padding: 44px 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--gps-navy-deep) 0%, var(--gps-navy) 100%);
    box-shadow: 0 24px 48px -32px rgba(18, 38, 74, .8);
    color: #fff;
}

.gps-home .gps-home-sem__card--solo {
    grid-template-columns: minmax(0, 1fr);
}

.gps-home .gps-home-sem__title {
    margin: 0;
    font-family: var(--gps-font);
    font-size: 30px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    text-wrap: balance;
}

.gps-home .gps-home-sem__text {
    max-width: 52ch;
    margin: 14px 0 0;
    font-size: 16px;
    line-height: 1.6;
    color: #d6deec;
}

.gps-home .gps-home-sem__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.gps-home .gps-home-btn {
    display: inline-block;
    padding: 13px 22px;
    border-radius: 8px;
    font-family: var(--gps-font);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.gps-home .gps-home-btn--gold {
    border: 2px solid var(--gps-gold);
    background: var(--gps-gold);
    color: var(--gps-navy-deep);
}

.gps-home .gps-home-btn--gold:hover,
.gps-home .gps-home-btn--gold:focus {
    border-color: #fff;
    background: #fff;
    color: var(--gps-navy-deep);
}

.gps-home .gps-home-btn--outline {
    border: 2px solid rgba(255, 255, 255, .55);
    background: transparent;
    color: #fff;
}

.gps-home .gps-home-btn--outline:hover,
.gps-home .gps-home-btn--outline:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.gps-home .gps-home-btn:focus-visible {
    outline: 3px solid rgba(221, 200, 157, .7);
}

.gps-home .gps-home-sem__side {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.gps-home .gps-home-sem__next {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 12px;
    background: rgba(255, 255, 255, .06);
}

.gps-home .gps-home-sem__label {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gps-gold);
}

.gps-home .gps-home-sem__session {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gps-home .gps-home-date {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 64px;
    border-radius: 10px;
    background: #fff;
    color: var(--gps-navy-deep);
    line-height: 1;
}

.gps-home .gps-home-date__mon {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gps-gold-ink);
}

.gps-home .gps-home-date__day {
    margin-top: 4px;
    font-size: 26px;
    font-weight: 800;
}

.gps-home .gps-home-sem__info {
    min-width: 0;
}

.gps-home .gps-home-sem__topic {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
    overflow-wrap: break-word;
}

.gps-home .gps-home-sem__meta {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #c3cde0;
}

.gps-home .gps-home-stats {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gps-home .gps-home-stats li {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    margin: 0;
    padding: 4px 16px;
    border-left: 1px solid rgba(255, 255, 255, .16);
}

.gps-home .gps-home-stats li:first-child {
    padding-left: 0;
    border-left: 0;
}

.gps-home .gps-home-stats strong {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.gps-home .gps-home-stats li:nth-child(3) strong {
    color: var(--gps-gold);
}

.gps-home .gps-home-stats strong .woocommerce-Price-amount,
.gps-home .gps-home-stats strong bdi {
    color: inherit;
    font: inherit;
}

.gps-home .gps-home-stats li > span {
    font-size: 12px;
    line-height: 1.35;
    color: #b9c4d8;
}

/* ---------- sponsors ---------- */
.gps-home .gps-home-logos {
    /* Centered whatever the number of sponsors (2 or 5 never leave a lopsided row) */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gps-home .gps-home-logos__item {
    flex: 0 1 calc((100% - 64px) / 5);
    min-width: 0;
    margin: 0;
}

.gps-home .gps-home-logos__link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    padding: 16px 20px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 0 var(--gps-line), 0 14px 30px -24px rgba(18, 38, 74, .45);
    text-decoration: none;
}

.gps-home .gps-home-logos__img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 64px;
    object-fit: contain;
    transition: filter .2s ease, opacity .2s ease;
}

/* White / light logos (sponsor option): same white card, logo darkened to
   match the others (gray in the grayscale row, near-black on hover / in color) */
.gps-home .gps-home-logos__link--dark .gps-home-logos__img {
    filter: brightness(0);
    opacity: .8;
}

.gps-home .gps-home-logos--gray .gps-home-logos__link--dark .gps-home-logos__img {
    filter: brightness(0);
    opacity: .45;
}

.gps-home .gps-home-logos--gray a.gps-home-logos__link--dark:hover .gps-home-logos__img,
.gps-home .gps-home-logos--gray a.gps-home-logos__link--dark:focus .gps-home-logos__img {
    filter: brightness(0);
    opacity: .85;
}

.gps-home .gps-home-logos__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--gps-navy);
    text-align: center;
    overflow-wrap: anywhere;
}

.gps-home .gps-home-logos--gray .gps-home-logos__img {
    filter: grayscale(1);
    opacity: .85;
}

.gps-home .gps-home-logos--gray a:hover .gps-home-logos__img,
.gps-home .gps-home-logos--gray a:focus .gps-home-logos__img {
    filter: none;
    opacity: 1;
}

.gps-home-empty {
    padding: 12px 16px;
    border: 1px dashed #c4cfe0;
    font-size: 13px;
    color: #5b6880;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
    .gps-home .gps-home-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gps-home .gps-home-sem__card { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 36px; }
    .gps-home .gps-home-logos__item { flex-basis: calc((100% - 32px) / 3); }
}

@media (max-width: 600px) {
    .gps-home .gps-home-title,
    .gps-home .gps-home-sem__title { font-size: 24px; }
    .gps-home .gps-home-head { margin-bottom: 18px; }
    .gps-home .gps-home-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .gps-home .gps-home-sem__card { padding: 28px 20px; border-radius: 14px; }
    .gps-home .gps-home-sem__btns .gps-home-btn { flex: 1 1 auto; max-width: 100%; white-space: normal; text-align: center; }
    .gps-home .gps-home-sem__next { padding: 16px; }
    .gps-home .gps-home-stats li { padding: 4px 10px; }
    .gps-home .gps-home-stats strong { font-size: 20px; }
    .gps-home .gps-home-logos { gap: 12px; }
    .gps-home .gps-home-logos__item { flex-basis: calc((100% - 12px) / 2); }
    .gps-home .gps-home-logos__link { height: 84px; padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .gps-home * { transition: none !important; }
}
