/* =========================================================
   THE METHODIST CHURCH SOUTH ASIA PAKISTAN®
   Simple responsive stylesheet
   ========================================================= */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #243447;
    background: #fff;
    line-height: 1.7;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

/* HEADER */
.site-header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.logo strong {
    display: block;
    color: #12385b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    line-height: 1.2;
}

.logo small {
    display: block;
    color: #7a1f35;
    font-size: 13px;
    margin-top: 2px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.main-nav a {
    color: #173b5e;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 0;
}

.main-nav a:hover {
    color: #b48718;
}

.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: #173b5e;
    margin: 5px 0;
}

/* HERO */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    background: #09223a url("../assets/images/church-hero.jpg") center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(7, 26, 43, .96) 0%,
        rgba(7, 26, 43, .90) 43%,
        rgba(7, 26, 43, .48) 70%,
        rgba(7, 26, 43, .15) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 650px;
    display: grid;
    grid-template-columns: 56% 44%;
    align-items: center;
}

.hero-text {
    padding: 55px 20px 65px 0;
    color: #fff;
}

.eyebrow,
.section-kicker {
    color: #c89a25;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero h1 {
    margin: 12px 0 24px;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(44px, 5vw, 68px);
    line-height: 1.02;
}

.hero h1 span {
    color: #f0c34d;
}

.hero-description {
    max-width: 610px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    color: rgba(255,255,255,.94);
}

.hero-divider {
    width: 70px;
    height: 4px;
    background: #d1a32a;
    margin: 22px 0 16px;
}

.hero-scripture {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-style: italic;
}

.hero-reference {
    color: #f0c34d;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    margin: 4px 0 20px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 3px;
    font-weight: 700;
    transition: .2s ease;
}

.btn-primary {
    background: #b48718;
    color: #fff;
}

.btn-primary:hover {
    background: #936f12;
}

.btn-secondary {
    border: 1px solid #fff;
    color: #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #173b5e;
}

/* SECTIONS */
.section {
    padding: 38px 0;
}

.section-light {
    background: #f6f8fa;
}

.section-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 22px;
}

.section-heading h2,
.content-block h2,
.cta-box h2 {
    margin: 8px 0 16px;
    color: #12385b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(31px, 4vw, 44px);
    line-height: 1.2;
}

.section-heading p:last-child {
    color: #5c6875;
    margin: 0;
}

.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.content-block p {
    color: #4e5b68;
    margin: 0 0 12px;
}

.image-block {
    width: 100%;
}

.image-block img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center center;
    border-radius: 5px;
    box-shadow: 0 12px 35px rgba(0,0,0,.10);
}

/* WELCOME — balanced landscape image */
.welcome .image-block {
    max-width: 520px;
    justify-self: end;
}

.welcome .image-block img {
    height: 360px;
}

/* FAITH IN ACTION — balanced landscape image */
.faith-action .image-block {
    max-width: 520px;
    justify-self: end;
}

.faith-action .image-block img {
    height: 360px;
}

/* BISHOP MESSAGE — balanced portrait on the right */
.bishop-section {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
    gap: 42px;
    align-items: center;
}

.bishop-section .content-block {
    order: 1;
}

.bishop-section .image-block {
    order: 2;
    width: 100%;
    max-width: 390px;
    justify-self: end;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 5px;
}

.bishop-section .image-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.three-column {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.card {
    background: #fff;
    padding: 10px 22px 16px;
    border: 1px solid #e4e8ec;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(20,40,60,.06);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 7px;
    color: #b48718;
}

.card h3 {
    color: #12385b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
    margin: 0 0 7px;
}

.card p {
    color: #596674;
    margin: 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 4px;
    background: #eee;
}

.gallery-item img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    object-position: center center;
    transition: transform .25s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.center-button {
    text-align: center;
    margin-top: 30px;
}

.cta-box {
    background: #fff;
    border: 1px solid #e4e8ec;
    padding: 55px 30px;
    text-align: center;
    box-shadow: 0 8px 24px rgba(20,40,60,.06);
}

.cta-box p:not(.section-kicker) {
    max-width: 700px;
    margin: 0 auto 25px;
    color: #596674;
}

/* FOOTER */
.site-footer {
    background: #09223a;
    color: #d9e2eb;
    padding: 55px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 45px;
}

.footer-brand {
    display: flex;
    gap: 15px;
}

.footer-brand img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.site-footer h3 {
    color: #fff;
    margin: 0 0 13px;
    font-family: Georgia, "Times New Roman", serif;
}

.site-footer p {
    margin: 0;
    max-width: 420px;
}

.site-footer a {
    display: block;
    margin: 5px 0;
    color: #d9e2eb;
}

.site-footer a:hover {
    color: #f0c34d;
}

.footer-bottom {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,.15);
    text-align: center;
    font-size: 13px;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #b48718;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 900;
}

.hero-photo-mobile {
    display: none;
}

/* TABLET */
@media (max-width: 900px) {
    .main-nav {
        gap: 14px;
    }

    .hero {
        min-height: 590px;
        background-image: url("../assets/images/church-hero-tablet.jpg");
        background-position: center center;
        background-size: cover;
    }

    .hero-content {
        min-height: 590px;
        grid-template-columns: 58% 42%;
    }

    .hero h1 {
        font-size: 49px;
    }

    .bishop-section {
        grid-template-columns: minmax(0, 1.2fr) minmax(250px, .8fr);
        gap: 35px;
    }

    .bishop-section .image-block {
        max-width: 330px;
    }

    .three-column {
        gap: 18px;
    }
}

/* MOBILE */
@media (max-width: 760px) {
    /* Compact header with the same horizontal navigation style as desktop */
    .header-inner {
        min-height: 58px;
        flex-wrap: wrap;
        gap: 0;
    }

    .logo {
        min-height: 58px;
        flex: 1 1 auto;
        gap: 8px;
    }

    .logo img {
        width: 42px;
        height: 42px;
    }

    .logo strong {
        font-size: 16px;
        line-height: 1.15;
    }

    .logo small {
        font-size: 10px;
        margin-top: 1px;
    }

    .menu-toggle {
        display: none;
    }

    .main-nav {
        display: flex;
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        gap: 0;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        justify-content: flex-start;
        background: #fff;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #dfe4e8;
        padding: 0 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .main-nav::-webkit-scrollbar {
        display: none;
    }

    .main-nav a,
    .main-nav a:last-child {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        padding: 9px 12px;
        border: 0;
        color: #173b5e;
        font-size: 12px;
        font-weight: 700;
    }

    .main-nav a:hover {
        color: #b48718;
    }

    /*
       MOBILE HERO
       The photograph is the actual hero background. There is no separate
       blue block and no second image below the text. The dedicated mobile
       artwork is portrait-oriented so the Bishop remains visible on phones.
    */
    .hero {
        min-height: 610px;
        background-color: #09223a;
        background-image: url("../assets/images/church-hero-mobile.png");
        background-position: center top;
        background-size: cover;
        background-repeat: no-repeat;
    }

    .hero-overlay {
        display: block;
        background: linear-gradient(
            180deg,
            rgba(7, 26, 43, .42) 0%,
            rgba(7, 26, 43, .48) 48%,
            rgba(7, 26, 43, .58) 100%
        );
    }

    .hero-content {
        display: block;
        min-height: 610px;
        width: 100%;
        padding: 0;
    }

    .hero-text {
        width: 100%;
        padding: 48px 5% 42px;
        text-align: center;
        position: relative;
        z-index: 2;
    }

    .hero .eyebrow {
        font-size: 11px;
        letter-spacing: 1.7px;
    }

    .hero h1 {
        font-size: clamp(37px, 10vw, 46px);
        line-height: 1.02;
        margin: 10px 0 22px;
    }

    .hero-description {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
        font-size: 15px;
        line-height: 1.55;
        text-shadow: 0 1px 3px rgba(0,0,0,.45);
    }

    .hero-divider {
        margin: 18px auto 14px;
    }

    .hero-scripture {
        font-size: 15px;
        text-shadow: 0 1px 3px rgba(0,0,0,.5);
    }

    .hero-reference {
        margin-bottom: 19px;
    }

    .hero-buttons {
        justify-content: center;
        gap: 10px;
    }

    .btn {
        padding: 11px 16px;
        font-size: 14px;
    }

    .section {
        padding: 36px 0;
    }

    .section-heading {
        margin-bottom: 24px;
    }

    .section-heading h2,
    .content-block h2,
    .cta-box h2 {
        margin: 5px 0 10px;
    }

    .content-block p {
        margin-bottom: 12px;
    }

    .two-column,
    .three-column,
    .gallery-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        margin-bottom: 18px;
    }

    .two-column {
        gap: 24px;
    }

    .welcome .content-block {
        order: 1;
    }

    .welcome .image-block {
        order: 2;
    }

    .faith-action .content-block {
        order: 1;
    }

    .faith-action .image-block {
        order: 2;
    }

    /* Standard content images: smaller, balanced mobile presentation */
    .image-block img {
        height: 300px;
    }

    .welcome .image-block,
    .faith-action .image-block {
        max-width: 100%;
        justify-self: stretch;
    }

    .welcome .image-block img,
    .faith-action .image-block img {
        height: 300px;
    }

    /* Bishop Message: message first, compact portrait after it */
    .bishop-section {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .bishop-section .content-block {
        order: 1;
    }

    .bishop-section .image-block {
        order: 2;
        width: 100%;
        max-width: 360px;
        margin: 0 auto;
        aspect-ratio: 4 / 5;
    }

    .bishop-section .image-block img {
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .gallery-item img {
        height: 240px;
    }

    .footer-grid {
        gap: 30px;
    }
}

@media (max-width: 390px) {
    .main-nav a,
    .main-nav a:last-child {
        padding-left: 10px;
        padding-right: 10px;
        font-size: 11px;
    }

    .hero {
        min-height: 590px;
    }

    .hero-content {
        min-height: 590px;
    }

    .hero-text {
        padding-top: 40px;
        padding-bottom: 34px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero-description {
        font-size: 14px;
    }

    .hero-buttons .btn {
        padding: 10px 13px;
        font-size: 13px;
    }
}
