/*==============================================
   KIMST home page sections
   Mission / Vision / Quality Education ("pillars")
   plus the shared scroll-reveal helper.
===============================================*/

.kh-pillars {
    --kh-green: #108543;
    --kh-green-700: #0b6a34;
    --kh-green-900: #073d20;
    --kh-green-50: #eef7f1;
    --kh-red: #d02010;
    --kh-ink: #14231a;
    --kh-muted: #5b6b61;
    --kh-line: #e3eae5;
    --kh-ease: cubic-bezier(.22, 1, .36, 1);

    position: relative;
    overflow: hidden;
    padding: 88px 0 84px;
    font-family: var(--kh-font-ui);
    /* Solid tint (same as the notices section): fading to white here made it blend into the white About section below */
    background: #f3f7f4;
}

/* Soft decorative glows */
.kh-pillars::before,
.kh-pillars::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.kh-pillars::before {
    top: -220px;
    right: -160px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(16, 133, 67, .14), transparent 68%);
}

.kh-pillars::after {
    top: -260px;
    left: -200px;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(208, 32, 16, .06), transparent 68%);
}

.kh-pillars .container {
    position: relative;
    z-index: 1;
}

/* Justified paragraphs (home About text). Hyphenation keeps the word gaps even in narrow columns. */
.kh-justify p {
    text-align: justify;
    text-justify: inter-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/*---------- Home page vertical spacing (one place to tune it) ----------
   Space above and below each home section. Scoped to body.is-home, so inner pages and the About / Careers pages
   (which share the .about-style1-area class) are untouched. The values here beat the per-section files. */
body.is-home {
    --kh-sec-y: 56px;
    --kh-gap-y: 36px;   /* gap between a section's heading block and its content */
}

body.is-home .kh-pillars,
body.is-home .kh-about,
body.is-home .kh-updates,
body.is-home .kh-why,
body.is-home .kh-courses,
body.is-home .kh-testi {
    padding-top: var(--kh-sec-y);
    padding-bottom: var(--kh-sec-y);
}

body.is-home .kh-why__intro {
    margin-bottom: var(--kh-gap-y);
}

body.is-home .kh-why__enquiry {
    margin-top: var(--kh-gap-y);
}

body.is-home .kh-courses__head {
    margin-bottom: var(--kh-gap-y);
}

body.is-home .kh-courses__foot {
    margin-top: 40px;
}

body.is-home .kh-hero__slide {
    padding-top: 40px;
    padding-bottom: 40px;
}

@media (max-width: 991.98px) {
    body.is-home {
        --kh-sec-y: 44px;
        --kh-gap-y: 28px;
    }

    body.is-home .kh-hero__slide {
        padding-top: 28px;
        padding-bottom: 32px;
    }

    body.is-home .kh-courses__foot {
        margin-top: 32px;
    }
}

@media (max-width: 575.98px) {
    body.is-home {
        --kh-sec-y: 36px;
        --kh-gap-y: 24px;
    }

    body.is-home .kh-hero__slide {
        padding-top: 22px;
        padding-bottom: 28px;
    }

    body.is-home .kh-courses__foot {
        margin-top: 28px;
    }
}

/*---------- Heading ----------*/

.kh-pillars__head {
    max-width: 720px;
    margin: 0 auto 56px;
    text-align: center;
}

.kh-pillars .kh-pillars__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--kh-red);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.kh-pillars__eyebrow::before,
.kh-pillars__eyebrow::after {
    content: "";
    width: 28px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: .55;
}

.kh-pillars h2.kh-pillars__title {
    margin: 16px 0 14px;
    color: var(--kh-ink);
    font-family: var(--kh-font-ui);
    font-size: clamp(28px, 3.4vw, 42px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
    text-wrap: balance;
}

.kh-pillars__title em {
    color: var(--kh-green);
    font-style: normal;
}

.kh-pillars p.kh-pillars__sub {
    margin: 0;
    color: var(--kh-muted);
    font-family: var(--kh-font-body);
    font-size: 17px;
    line-height: 1.7;
    text-wrap: balance;
}

/*---------- Cards ----------*/

.kh-pillars__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.kh-pillar {
    --accent: var(--kh-red);
    --accent-2: #e5483a;
    --glow: rgba(208, 32, 16, .3);
    --line: rgba(208, 32, 16, .35);

    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding: 42px 32px 32px;
    overflow: hidden;
    border: 1px solid var(--kh-line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(7, 61, 32, .04), 0 14px 34px rgba(7, 61, 32, .07);
    transition: transform .35s var(--kh-ease), box-shadow .35s ease, border-color .35s ease;
}

.kh-pillar--green {
    --accent: var(--kh-green);
    --accent-2: #2bb86b;
    --glow: rgba(16, 133, 67, .3);
    --line: rgba(16, 133, 67, .4);
}

.kh-pillar--ink {
    --accent: #1d2f25;
    --accent-2: #3d5e4c;
    --glow: rgba(20, 35, 26, .28);
    --line: rgba(20, 35, 26, .35);
}

/* Accent bar along the top */
.kh-pillar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

/* Glow that grows in from the corner on hover */
.kh-pillar::after {
    content: "";
    position: absolute;
    top: -120px;
    right: -120px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--glow), transparent 70%);
    opacity: 0;
    transform: scale(.6);
    transition: opacity .4s ease, transform .5s var(--kh-ease);
    pointer-events: none;
}

.kh-pillar:hover {
    transform: translateY(-8px);
    border-color: var(--line);
    box-shadow: 0 2px 4px rgba(7, 61, 32, .04), 0 30px 60px rgba(7, 61, 32, .16);
}

.kh-pillar:hover::after {
    opacity: .55;
    transform: scale(1);
}

.kh-pillar__num {
    position: absolute;
    top: 24px;
    right: 28px;
    color: transparent;
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.02em;
    -webkit-text-stroke: 1.5px rgba(20, 35, 26, .13);
    user-select: none;
}

.kh-pillar__icon {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 26px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    box-shadow: 0 14px 26px var(--glow);
    color: #fff;
    font-size: 30px;
    transition: transform .4s var(--kh-ease);
}

.kh-pillar__icon i {
    line-height: 1;
}

.kh-pillar:hover .kh-pillar__icon {
    transform: rotate(-6deg) scale(1.08);
}

.kh-pillars h3.kh-pillar__title {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    color: var(--kh-ink);
    font-family: var(--kh-font-ui);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.kh-pillars p.kh-pillar__text {
    position: relative;
    z-index: 1;
    margin: 0 0 26px;
    color: var(--kh-muted);
    font-family: var(--kh-font-body);
    font-size: 16px;
    line-height: 1.7;
}

.kh-pillars a.kh-pillar__link {
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    color: var(--accent);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.kh-pillar__link i {
    transition: transform .3s var(--kh-ease);
}

.kh-pillar:hover .kh-pillar__link i {
    transform: translateX(6px);
}

/* The whole card is the click target (the link isn't positioned, so this fills the card) */
.kh-pillar__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
}

.kh-pillars a.kh-pillar__link:focus-visible {
    outline: 2px solid var(--kh-green);
    outline-offset: 4px;
    border-radius: 6px;
}

/*---------- Scroll reveal (see reveal.js) ----------*/

.kh-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .8s var(--kh-ease);
    transition-delay: var(--d, 0ms);
}

.kh-reveal.is-in {
    opacity: 1;
    transform: none;
}

/*---------- Responsive ----------*/

@media (max-width: 991.98px) {
    .kh-pillars {
        padding: 64px 0 60px;
    }

    .kh-pillars__head {
        margin-bottom: 38px;
    }

    .kh-pillars__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        max-width: 640px;
        margin: 0 auto;
    }

    .kh-pillar {
        padding: 38px 26px 28px;
    }
}

@media (max-width: 575.98px) {
    .kh-pillars p.kh-pillars__sub {
        font-size: 16px;
    }

    .kh-pillar__num {
        font-size: 52px;
        right: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kh-pillar,
    .kh-pillar::after,
    .kh-pillar__icon,
    .kh-pillar__link i {
        transition: none;
    }

    .kh-pillar:hover {
        transform: none;
    }
}
