/* =========================================================
   GLOBAL / RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f8f6;
    color: #183128;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 94%;
    max-width: 1200px;
    margin: auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* =========================================================
   HEADER / NAVIGATION
   ========================================================= */

header {
    background: #fff;
    border-bottom: 1px solid #dce5e0;
}

.navbar {
    min-height: 76px;

    display: grid;

    /*
       Left logo | Navigation | Right logo
    */
    grid-template-columns: 180px 1fr 180px;

    align-items: center;

    column-gap: 20px;
}


/* =========================================================
   LEFT LOGO
   ========================================================= */

.header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    min-width: 0;
}

.header-left img {
    display: block;

    width: 150px;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   CENTER NAVIGATION
   ========================================================= */

.navbar nav {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 35px;

    font-weight: bold;
    font-size: 14px;

    min-width: 0;
}

.navbar nav a {
    color: #183128;

    text-decoration: none;

    white-space: nowrap;

    padding: 8px 5px;

    transition: color 0.2s ease;
}

.navbar nav a:hover {
    color: #15754e;
}


/* =========================================================
   RIGHT LOGO
   ========================================================= */

.header-right {
    display: flex;

    align-items: center;
    justify-content: flex-end;

    min-width: 0;
}

.header-right img {
    display: block;

    width: 150px;
    max-width: 100%;
    height: auto;
}


/* =========================================================
   HERO SECTION
   ========================================================= */

.hero {
    background: linear-gradient(135deg, #0d513b, #176d4d);
    color: #fff;
    padding: 70px 0;
}

.hero h1 {
    font-size: 52px;
    margin: 0 0 15px;
}

.hero em {
    color: #ffb65d;
    font-style: normal;
}

.hero p {
    font-size: 18px;
    max-width: 720px;
}

.btn {
    display: inline-block;
    background: #ef8b2c;
    color: #fff;
    padding: 12px 20px;
    border-radius: 7px;
    font-weight: bold;
}


/* =========================================================
   GENERAL SECTIONS
   ========================================================= */

section {
    padding: 58px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 32px;
}

.section-title h2 {
    color: #0d513b;
    font-size: 31px;
}

.section-title p {
    color: #66756e;
}


/* =========================================================
   CLASS CARDS
   ========================================================= */

.classes {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.class-card {
    background: #fff;
    border: 1px solid #dce5e0;
    border-radius: 14px;
    padding: 25px 16px;
    text-align: center;
    box-shadow: 0 5px 18px #0d513b0f;
    transition: 0.2s;
}

.class-card:hover {
    transform: translateY(-4px);
    border-color: #9bc4b3;
}

.class-number {
    width: 60px;
    height: 60px;
    margin: auto auto 13px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #e8f4ee;
    color: #0d513b;
    font-size: 23px;
    font-weight: 900;
}

.class-card h3 {
    color: #0d513b;
}

.class-card p {
    color: #66756e;
    font-size: 13px;
}


/* =========================================================
   PAGE HEADER
   ========================================================= */

.page-head {
    background: #eaf3ee;
    padding: 38px 0;
    border-bottom: 1px solid #dce5e0;
}

.breadcrumb {
    font-size: 13px;
    color: #66756e;
    margin-bottom: 8px;
}

.breadcrumb a {
    color: #15754e;
    font-weight: bold;
}

.page-head h1 {
    color: #0d513b;
    font-size: 36px;
    margin: 0;
}

.page-head p {
    color: #66756e;
}


/* =========================================================
   SUBJECT CARDS
   ========================================================= */

.subject-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.subject-card {
    background: #fff;
    border: 1px solid #dce5e0;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 20px #0d513b0b;
    transition: 0.2s;
}

.subject-card:hover {
    transform: translateY(-4px);
    border-color: #9bc4b3;
}

.subject-image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin: 0;
    padding: 0;
    object-position: top;
}

.subject-card-content {
    padding: 18px 25px 22px;
}

.subject-card h3 {
    color: #0d513b;
    margin: 0 0 5px;
    font-size: 20px;
}

.subject-card p {
    color: #66756e;
    font-size: 13px;
    margin: 0 0 14px;
}

.view {
    color: #15754e;
    font-size: 13px;
    font-weight: bold;
}


/* =========================================================
   BACK BUTTON
   ========================================================= */

.back-btn {
    display: inline-block;
    margin-bottom: 20px;
    color: #15754e;
    font-size: 13px;
    font-weight: bold;
}


/* =========================================================
   INFORMATION BOX
   ========================================================= */

.info {
    background: #fff;
    border: 1px solid #dce5e0;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 22px;
    color: #5d6c65;
}

.info strong {
    color: #0d513b;
}


/* =========================================================
   CHAPTER TABLE
   ========================================================= */

.table-wrap {
    background: #fff;
    border: 1px solid #dce5e0;
    border-radius: 15px;
    overflow: auto;
}

.chapter-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.chapter-table th {
    background: #0d513b;
    color: #fff;
    text-align: left;
    padding: 16px 18px;
    font-size: 13px;
}

.chapter-table td {
    padding: 17px 18px;
    border-bottom: 1px solid #dce5e0;
    font-size: 14px;
}

.chapter-title {
    font-weight: bold;
}

.chapter-no {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f5f2;
    color: #0d513b;
    font-weight: bold;
}

.read-btn {
    display: inline-block;
    background: #15754e;
    color: #fff;
    padding: 12px 20px;
    min-width: 140px;
    text-align: center;
    border-radius: 24px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
}

.coming {
    background: #f2f4f3;
    color: #75817c;
    padding: 9px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}


/* =========================================================
   QUIZ / ABOUT
   ========================================================= */

.quiz-card,
.about-box {
    max-width: 900px;
    margin: auto;
    background: #fff;
    border: 1px solid #dce5e0;
    border-radius: 15px;
    padding: 28px;
}

.option {
    border: 1px solid #dce5e0;
    border-radius: 9px;
    padding: 14px;
    margin: 10px 0;
    cursor: pointer;
}

.next {
    border: 0;
    background: #0d513b;
    color: #fff;
    padding: 12px 19px;
    border-radius: 7px;
    font-weight: bold;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {
    background: #103d2f;
    color: #d9e9e1;
    text-align: center;
    padding: 22px;
    font-size: 13px;
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 850px) {

    .classes {
        grid-template-columns: repeat(2, 1fr);
    }

    .subject-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    nav {
        gap: 12px;
        font-size: 12px;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 520px) {

    .subject-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 38px;
    }
}

/* =========================================================
   CONTACT PAGE
   ========================================================= */

.contact-page-head {
    background:
        linear-gradient(
            rgba(235, 245, 252, 0.94),
            rgba(235, 245, 252, 0.94)
        ),
        url("images/contact-bg.jpg") center center / cover no-repeat;

    padding: 45px 0 50px;
}

.contact-page-head .breadcrumb {
    margin-bottom: 22px;
    font-size: 15px;
    color: #53657d;
}

.contact-page-head .breadcrumb a {
    color: #174b7a;
    text-decoration: none;
}

.contact-page-head h1 {
    margin: 0 0 10px;
    font-family: "Times New Roman", serif;
    font-size: 52px;
    line-height: 1.1;
    color: #102f56;
}

.contact-page-head p {
    margin: 0;
    font-size: 20px;
    color: #43566f;
}


/* Main Contact Section */

.contact-section {
    padding: 38px 0 50px;
    background: #ffffff;
}


/* Three Card Grid */

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}


/* Contact Card */

.contact-card {
    position: relative;
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e1e8ee;
    border-radius: 12px;

    min-height: 570px;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.08);

    display: flex;
    flex-direction: column;
}


/* Office Header */

.office-header {
    text-align: center;

    padding: 28px 20px 24px;

    min-height: 210px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


/* Different Header Backgrounds */

.karachi-card .office-header {
    background: #e9f5fd;
}

.quetta-card .office-header {
    background: #fff7e8;
}

.lahore-card .office-header {
    background: #eaf8f0;
}


/* City Icon */

.city-icon {
    width: 105px;
    height: 105px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 48px;

    margin-bottom: 15px;
}

.karachi-card .city-icon {
    background: #2878b8;
}

.quetta-card .city-icon {
    background: #a77d32;
}

.lahore-card .city-icon {
    background: #249765;
}


/* Office Title */

.office-header h2 {
    margin: 0;

    font-family: "Times New Roman", serif;

    font-size: 25px;

    line-height: 1.2;

    color: #102f56;
}

.office-header p {
    margin: 7px 0 0;

    font-size: 15px;

    color: #526276;
}


/* Contact Details */

.contact-details {
    padding: 25px 24px 65px;

    flex: 1;
}


/* Individual Contact Row */

.contact-detail {
    display: flex;

    align-items: center;

    gap: 15px;

    margin-bottom: 25px;
}

.contact-detail:last-child {
    margin-bottom: 0;
}


/* Detail Icons */

.detail-icon {
    width: 50px;
    height: 50px;

    min-width: 50px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 22px;
}


/* Person */

.person-icon {
    background: #e3f0fb;
}


/* WhatsApp / Phone */

.whatsapp-icon {
    background: #dff5e8;
}


/* Email */

.email-icon {
    background: #ffe4e4;
}


/* Detail Text */

.contact-detail div:last-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-detail strong {
    font-size: 14px;

    color: #122f55;
}

.contact-detail span {
    font-size: 16px;

    color: #40546d;

    word-break: break-word;
}


/* Decorative Bottom Text */

.city-decoration {
    position: absolute;

    bottom: 0;
    left: 0;
    right: 0;

    height: 50px;

    display: flex;
    align-items: flex-end;
    justify-content: center;

    padding-bottom: 8px;

    font-family: "Times New Roman", serif;

    font-size: 28px;

    font-weight: bold;

    letter-spacing: 4px;

    opacity: 0.10;
}

.karachi-card .city-decoration {
    color: #2679b8;
}

.quetta-card .city-decoration {
    color: #a77d32;
}

.lahore-card .city-decoration {
    color: #269565;
}


/* =========================================================
   GENERAL CONTACT MESSAGE
   ========================================================= */

.contact-message {
    margin-top: 35px;

    padding: 30px 45px;

    border-radius: 14px;

    background: #edf7ff;

    display: flex;

    align-items: center;

    gap: 30px;
}

.message-icon {
    width: 80px;
    height: 80px;

    min-width: 80px;

    border-radius: 50%;

    background: #102f56;

    color: #ffffff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 35px;
}

.message-content h2 {
    margin: 0 0 10px;

    font-family: "Times New Roman", serif;

    font-size: 28px;

    color: #102f56;
}

.message-content p {
    margin: 0;

    max-width: 850px;

    font-size: 16px;

    line-height: 1.6;

    color: #50647c;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .contact-card:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
        width: 100%;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .contact-page-head {
        padding: 30px 0 35px;
    }

    .contact-page-head h1 {
        font-size: 40px;
    }

    .contact-page-head p {
        font-size: 17px;
    }


    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-card:last-child {
        grid-column: auto;
        max-width: none;
    }


    .contact-card {
        min-height: auto;
    }


    .contact-message {
        padding: 25px;

        flex-direction: column;

        text-align: center;
    }

}

.city-icon {
    width: 105px;
    height: 105px;
    margin-bottom: 15px;
}

.city-icon img {
    width: 100%;
    height: 100%;
    display: block;
}