/* ----------------------------------------------------------------
   Advantages portal — portal-specific styles only.
   Shared components live in ClubConnect.API.CMS/wwwroot/css/main.css.
   ---------------------------------------------------------------- */

body {
    padding-top: 0;
    overflow: visible;
}

/* ----------------------------------------------------------------
   Page section (white full-width section wrapping a .container)
   ---------------------------------------------------------------- */
.page-section {
    background: var(--color-white);
    padding: 3rem 0;
    /* The shared .footer (main.css) pulls its mountain backdrop up over the
       preceding content (a 100px decal below 1250px; a -32rem negative margin
       at >=1250px). Reserve enough bottom space here so the mountain rises into
       empty space below the content instead of overlapping it. Override in this
       portal CSS, never main.css. */
    padding-bottom: 8rem;
}

@media (min-width: 1250px) {
    .page-section {
        padding-bottom: 17rem;
    }
}

/* ----------------------------------------------------------------
   Page title
   ---------------------------------------------------------------- */
.page-title {
    color: var(--color-midnight);
    letter-spacing: -0.15em;
    margin-bottom: 1rem;
}

/* ----------------------------------------------------------------
   Page hero banner
   ---------------------------------------------------------------- */
.page-hero {
    background: linear-gradient(color-mix(in srgb, var(--color-midnight) 55%, transparent), color-mix(in srgb, var(--color-midnight) 55%, transparent)), url("../Assets/img/header_image.png") center / cover no-repeat;
    padding: 7rem 1.5rem;
    text-align: center;
}

    .page-hero h1 {
        color: var(--color-white);
        font-family: var(--font-heading);
        margin: 0;
    }

/* ----------------------------------------------------------------
   GPT ad slot container
   ---------------------------------------------------------------- */
.div-gpt-ad {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 24px 0;
}

/* ----------------------------------------------------------------
   Search bar spacing — give the content below more breathing room
   ---------------------------------------------------------------- */
.page-section .search-bar {
    margin-bottom: 2.5rem;
}

/* ----------------------------------------------------------------
   CMCA discount badge
   Darkened protea so white text passes WCAG AA at small sizes
   ---------------------------------------------------------------- */
.offer-badge {
    display: inline-block;
    align-self: flex-start;
    background: var(--color-ochre-050);
    color: color-mix(in srgb, var(--color-ochre-600) 75%, black);
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius-lg);
}

/* ----------------------------------------------------------------
   Advantage card (featured grid on homepage, inside .card-grid)
   ---------------------------------------------------------------- */
.advantage-card {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 1px solid var(--color-gray-100);
    border-radius: var(--radius-lg);
    transition: border-color 0.15s;
}

    .advantage-card:hover {
        border-color: var(--color-ocean-700);
    }

.advantage-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    border-start-start-radius: var(--radius-lg);
    border-start-end-radius: var(--radius-lg);
    overflow: hidden;
}

    .advantage-card__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.advantage-card__state {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--color-midnight);
    color: var(--color-white);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

.advantage-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
    flex: 1;
}

.advantage-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-midnight);
    margin: 0;
}

.advantage-card__meta {
    font-size: 0.875rem;
    color: var(--color-gray-900);
    margin: 0;
}

.advantage-card__link {
    font-size: 0.875rem;
    color: var(--color-ocean-700);
    word-break: break-all;
}

.advantage-card__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
    padding-top: 1rem;
}

/* ----------------------------------------------------------------
   Advantage list (search / category results)
   ---------------------------------------------------------------- */
.advantage-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.advantage-row {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    border: 1px solid var(--color-gray-100);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-white);
}

.advantage-row__image {
    height: 100%;
}

    .advantage-row__image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

.advantage-row__content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem 1.25rem 0;
}

@media (max-width: 700px) {
    .advantage-row {
        grid-template-columns: 1fr;
    }

    .advantage-row__image {
        aspect-ratio: 4 / 3;
        height: auto;
    }

    .advantage-row__content {
        padding: 0 1.25rem 1.25rem;
    }
}

.advantage-row__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-midnight);
    margin: 0;
}

.advantage-row__meta {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-gray-900);
}

.advantage-row__desc {
    font-size: 0.9375rem;
    color: var(--color-gray-900);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.advantage-row__actions {
    margin-top: auto;
    padding-top: 0.5rem;
}

/* ----------------------------------------------------------------
   Rich-text description (Froala output, Advantage detail page)
   The global Preflight reset in main.css zeroes all <p> margins, so
   Froala paragraphs collapse together. Restore paragraph spacing to
   match the previous portal (Bootstrap default 1rem bottom margin).
   ---------------------------------------------------------------- */
.fr-view p {
    margin-bottom: 1rem;
}

/* ----------------------------------------------------------------
   ShareThis social share buttons (end of .detail-layout article)
   Third-party widget — add breathing room above so it doesn't crowd
   the photo gallery that precedes it.
   ---------------------------------------------------------------- */
.sharethis-inline-share-buttons {
    margin-top: 2rem;
}

/* ----------------------------------------------------------------
   Advantage detail page — info aside (inside main.css .detail-layout)
   Mirrors the Market detail sidebar: open layout (no card), h4 midnight
   headings, and 2px divider rules between sections.
   ---------------------------------------------------------------- */
.detail-panel {
    min-width: 0;
}

/* Sidebar headings — match Market's .market-detail__sidebar-heading.
   The shared .sidebar-label is intentionally small/grey, so bump only the
   differing properties for the detail aside. */
.detail-panel .sidebar-label {
    font-size: var(--text-h4);
    color: var(--color-midnight);
    letter-spacing: 0.05em;
}

.detail-map {
    width: 100%;
    height: 220px;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    background: var(--color-gray-100);
}

.detail-section + .detail-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--color-gray-100);
}

.detail-contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.9375rem;
    color: var(--color-gray-900);
}

    .detail-contact-list a {
        color: var(--color-ocean-700);
        word-break: break-all;
    }

/* ----------------------------------------------------------------
   Narrow centred form (Submit pages)
   ---------------------------------------------------------------- */
.form-narrow {
    max-width: 720px;
    margin-inline: auto;
}

.form-section-title {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-midnight);
    text-transform: uppercase;
    margin: 1.5rem 0 0.25rem;
}

/* ----------------------------------------------------------------
   Dropzone upload hint (SubmitPhotos)
   ---------------------------------------------------------------- */
.dropzone-hint {
    text-align: center;
    color: var(--color-gray-800);
    font-size: 0.9375rem;
    padding-top: 3rem;
}

/* ----------------------------------------------------------------
   Full-screen processing loader (SubmitPhotos)
   ---------------------------------------------------------------- */
@keyframes cc-rotation {
    0% {
        transform: rotate(0);
    }

    to {
        transform: rotate(359deg);
    }
}

.loader {
    color: var(--color-white);
    position: fixed;
    box-sizing: border-box;
    left: -9999px;
    top: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: 999999;
}

    .loader:after, .loader:before {
        box-sizing: border-box;
        display: none;
    }

    .loader.is-active {
        background-color: rgba(0, 0, 0, .85);
        width: 100%;
        height: 100%;
        left: 0;
        top: 0;
    }

        .loader.is-active:after, .loader.is-active:before {
            display: block;
        }

    .loader[data-text]:before {
        position: fixed;
        left: 0;
        top: 50%;
        color: currentColor;
        font-family: var(--font-body);
        text-align: center;
        width: 100%;
        font-size: 14px;
    }

    .loader[data-text=""]:before {
        content: "Loading";
    }

    .loader[data-text]:not([data-text=""]):before {
        content: attr(data-text);
    }

.loader-default[data-text]:before {
    top: calc(50% - 63px);
}

.loader-default:after {
    content: "";
    position: fixed;
    width: 48px;
    height: 48px;
    border: 8px solid var(--color-white);
    border-left-color: transparent;
    border-radius: 50%;
    top: calc(50% - 24px);
    left: calc(50% - 24px);
    animation: cc-rotation 1s linear infinite;
}

.loader-default[data-half]:after {
    border-right-color: transparent;
}

/* ----------------------------------------------------------------
   Standalone error page
   ---------------------------------------------------------------- */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    padding: 2rem;
}

.error-page__panel {
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.error-page__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-protea);
    margin-bottom: 0.5rem;
}

.error-page__subtitle {
    color: var(--color-midnight-faded);
    margin-bottom: 1.25rem;
}

.error-page__text {
    color: var(--color-gray-800);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
