:root {
    --primary: #1b2945;
    --secondary: #603f86;
    --accent: #f4b223;
    --light: #f7f8fc;
    --text: #5f6b7a;
    --heading: #1b2945;
}

body {
    overflow-x: hidden;
}

.page-text {
    color: #4b5563;
}

/* HERO */
.kelm-page-title-wrap {
    position: relative;
    background-size: cover;
    background-position: center;
}

.kelm-page-title-overlay {
    background: linear-gradient(
        to bottom,
        rgba(8, 15, 28, 0.45),
        rgba(8, 15, 28, 0.7)
    );
}

.kelm-page-title-content {
    position: relative;
    z-index: 2;
}

.apply-hero {
    background-size: cover;
    background-position: center;
}

.apply-hero-content {
    padding-top: 505px;
    padding-bottom: 70px;
}

.apply-caption {
    font-size: 21px;
    font-weight: 400;
    color: #ffffff;
    margin-bottom: 12px;
}

.apply-title {
    font-size: 58px;
    font-weight: 700;
    color: #ffffff;
}

/* SECTION */
.apply-section {
    padding: 90px 20px;
    background: #1b2945;
}

.section-heading {
    text-align: center;
    margin-bottom: 60px;
}

.section-heading h2 {
    font-size: 48px;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.section-heading p {
    color: rgba(255, 255, 255, 0.78);
    max-width: 720px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.8;
}

/* CARDS */
.apply-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch;
}

.apply-card {
    background: #ffffff;
    border-radius: 26px;
    padding: 45px 32px;
    text-align: center;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.12);
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.apply-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.18);
}

.apply-card::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
}

.apply-card-icon {
    width: 95px;
    height: 95px;
    margin: 0 auto 28px;
    border-radius: 50%;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.apply-card-icon img {
    width: 44px;
    height: auto;
}

.apply-card h3 {
    font-size: 24px;
    line-height: 1.35;
    color: var(--heading);
    margin-bottom: 18px;
    font-weight: 700;
}

.apply-card p {
    font-size: 16px;
    line-height: 1.9;
    color: var(--text);
    margin-bottom: 28px;
}

.apply-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #ffffff !important;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.apply-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* INFO SECTION */
.info-section {
    padding: 100px 20px;
    background: #ffffff;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
}

.info-card {
    background: #ffffff;
    border-radius: 26px;
    padding: 50px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    height: 100%;
}

.info-card h3 {
    color: var(--heading);
    font-size: 30px;
    margin-bottom: 25px;
    font-weight: 700;
}

.info-card p {
    color: var(--text);
    line-height: 1.9;
    font-size: 16px;
}

.requirements-list {
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
}

.requirements-list li {
    position: relative;
    padding-left: 32px;
    margin-bottom: 22px;
    color: var(--text);
    line-height: 1.8;
}

.requirements-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-size: 28px;
    line-height: 1;
}

/* TABLE */
.apply-table-wrap {
    overflow-x: auto;
    margin-top: 25px;
    max-width: 100%;
}

.apply-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0px;
}

.apply-table th {
    background: var(--primary);
    color: #ffffff;
    padding: 18px;
    text-align: left;
    font-weight: 600;
}

.apply-table td {
    padding: 18px;
    border-bottom: 1px solid #e5e7eb;
    color: var(--text);
}

.apply-table tr:nth-child(even) {
    background: #fafafa;
}

.address-box {
    margin-top: 30px;
    background: var(--light);
    padding: 28px;
    border-radius: 20px;
    border-left: 5px solid var(--accent);
}

.address-box strong {
    display: block;
    color: var(--heading);
    margin-bottom: 10px;
    font-size: 18px;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .apply-grid,
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* TABLET FIX */
@media (max-width: 900px) {
    .apply-hero-content {
        padding-top: 260px;
        padding-bottom: 60px;
    }

    .apply-title {
        font-size: 44px;
    }

    .section-heading h2 {
        font-size: 38px;
    }

    .info-card {
        padding: 35px 28px;
    }
}

/* MOBILE FIX */
@media (max-width: 767px) {

    /* GRID STACK */
    .apply-grid,
    .info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* HERO */
    .apply-hero-content {
        padding-top: 180px !important;
        padding-bottom: 50px;
    }

    .apply-title {
        font-size: 30px !important;
        line-height: 1.2;
    }

    .apply-caption {
        font-size: 16px;
    }

    /* TEXT */
    .section-heading h2 {
        font-size: 28px;
    }

    .section-heading p {
        font-size: 15px;
        line-height: 1.6;
    }

    /* CARDS */
    .apply-card {
        padding: 28px 20px;
    }

    .apply-card h3 {
        font-size: 20px;
    }

    .apply-card p {
        font-size: 14px;
    }

    .apply-btn {
        width: 100%;
        padding: 12px 20px;
    }

    /* INFO CARDS */
    .info-card {
        padding: 25px 20px;
    }

    .info-card h3 {
        font-size: 22px;
    }

    /* TABLE */
    .apply-table {
        font-size: 14px;
    }

    .address-box {
        padding: 20px;
    }

    /* 🔥 MOBILE REORDER FIX (KEY CHANGE) */
    .info-grid {
        display: flex;
        flex-direction: column;
    }

    /* Admission Process first */
    .info-card:nth-child(1) {
        order: 1;
    }

    /* Application Timeline second */
    .info-card:nth-child(2) {
        order: 2;
    }
}

/* SMALL PHONES */
@media (max-width: 420px) {
    .apply-title {
        font-size: 26px !important;
    }

    .apply-hero-content {
        padding-top: 140px !important;
    }
}