/* Homepage Specific Styles */
.ckm-section {
    padding: 4rem 0;
    width: 100%;
}

.ckm-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--ckm-charcoal);
}

.ckm-card h3 {
    margin-bottom: 0.5rem;
}

/* Cards inside a grid are spaced by the grid gap, not their own margin */
.ckm-cards > .ckm-card {
    margin-bottom: 0;
}

.ckm-hero {
    min-height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--ckm-white);
    background-size: cover;
    background-position: center 90%;
    padding-top: 100px;
    padding-bottom: 100px;
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.ckm-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Darker behind the text so the wall signage in the photo doesn't compete with the headline */
    background: radial-gradient(ellipse 75% 70% at 50% 50%, rgba(0, 0, 0, 0.68) 0%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.36) 100%);
}

.ckm-hero-content {
    position: relative;
    top: 70px; /* sits below the wall signage in the photo */
    z-index: 1;
    max-width: 800px;
    padding: 2rem;
}

.ckm-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--ckm-white);
}

.hero-welcome {
    font-size: 1.6rem;
    margin-bottom: 0.2rem;
    color: var(--ckm-white);
    opacity: 0.95;
    font-weight: 400;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.ckm-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.get-started .ckm-cards {
    grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
    justify-content: center;
}

.what-is-krav {
    background-color: var(--ckm-offwhite);
}

.krav-difference {
    background-color: var(--ckm-white);
}

.get-started {
    background-color: var(--ckm-offwhite);
}

.ckm-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
    padding: 0 2rem;
    display: block !important;
}

/* Ensure sections don't inherit Astra's flex properties */
.ckm-section {
    display: block !important;
}

/* Remove the duplicate .ast-container styles as they're now defined above */

/* Member Portal Link Styling */
.member-portal-link {
    margin-top: 1.2rem;
}
.member-portal-link a {
    color: var(--ckm-white);
    opacity: 0.8;
    text-decoration: underline;
    font-size: 1rem;
    transition: opacity 0.2s;
}
.member-portal-link a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ckm-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ckm-hero-content {
        top: 110px; /* headline lands on the blue wall padding, below the signage */
    }

    .ckm-hero::before {
        background: radial-gradient(ellipse 90% 60% at 50% 55%, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.6) 60%, rgba(0, 0, 0, 0.42) 100%);
    }

    .ckm-hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .ckm-section {
        padding: 2rem 0;
    }

    .ckm-cards {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        align-content: start;
        gap: 1.25rem;
    }

    .ckm-card {
        padding: 1.5rem;
    }

    .ckm-section h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .ast-container {
        padding: 0 1rem;
    }
}

/* Accessibility */
.ckm-button:focus {
    outline: 2px solid var(--ckm-blue);
    outline-offset: 2px;
}

/* ---- Full-width bands ---- */
/* Sections break out of Astra's 1200px column like the hero does, so colors run edge to edge */
body.page-template-homepage #page {
    overflow-x: clip;
}

.page-template-homepage .ckm-section,
.page-template-homepage .ckm-promos-homepage_hero {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.page-template-homepage .ckm-promos-homepage_hero {
    margin-top: 0;
    margin-bottom: 0;
}

.page-template-homepage .ckm-promos-homepage_hero .ckm-promo {
    border-radius: 0;
    padding: 1.5rem max(1.5rem, calc((100vw - 1128px) / 2));
}

/* Members app band */
.ckm-members {
    background: linear-gradient(180deg, var(--ckm-blue) 0%, var(--ckm-dark-blue) 100%);
    color: var(--ckm-white);
    text-align: center;
}

.ckm-members-icon {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 2.25rem;
    opacity: 0.9;
}

.ckm-members h2 {
    margin-bottom: 0.75rem;
    color: var(--ckm-white);
}

.ckm-members p {
    max-width: 640px;
    margin: 0 auto 1.75rem;
    color: rgba(255, 255, 255, 0.92);
}

.ckm-members-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.ckm-members .ckm-button {
    background: var(--ckm-white);
    color: var(--ckm-blue);
}

.ckm-members .ckm-button:hover {
    background: var(--ckm-offwhite);
}

.ckm-members .ckm-button-outline {
    background: transparent;
    color: var(--ckm-white);
    border: 2px solid var(--ckm-white);
}

.ckm-members .ckm-button-outline:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* "Where Can I Start?" cards: buttons line up along the bottom */
.get-started .ckm-event-card {
    display: flex;
    flex-direction: column;
}

.get-started .ckm-event-card p {
    margin-bottom: 1rem;
}

.get-started .ckm-event-card .ckm-button {
    align-self: flex-start;
    margin-top: auto;
}
