﻿/* Header: center logo + text as one group */
.header-section.header-split {
    display: flex;
    align-items: center;
    justify-content: center; /* ✅ centers the whole group */
    gap: 12px;
    background: #add8e6;
    border-radius: 18px;
    padding: 14px 16px;
    padding-right: 150px;
    margin: 12px 12px 20px;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

/* Logo */
.church-logo {
    flex: 0 0 150px;
    width: 150px;
    height: 150px;
    border-radius: 16px;
    background-image: url('/images/church-bg.jpeg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border: 3px solid rgba(255,255,255,.65);
    box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

/* Text panel: keep it only as wide as needed */
.header-text {
    display: inline-block; /* ✅ prevents taking full row */
    width: auto;
    max-width: 950px;
    text-align: center; /* ✅ like original headings */
    line-height: 1.2;
    background: rgba(255,255,255,.55);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 14px;
    padding: 10px 14px;
}

    /* Headings */
    .header-text h1 {
        font-size: 32px;
        font-weight: 900;
        margin: 0 0 6px;
    }

    .header-text h5 {
        font-size: 18px;
        margin: 0 0 8px;
    }

    .header-text h2 {
        font-size: 30px;
        font-weight: 800;
        margin: 0 0 6px;
    }

    .header-text h4 {
        font-size: 22px;
        font-weight: 700;
        margin: 0;
    }
/* ===== Responsive header layout ===== */
.header-section.header-split {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 12px;
    flex-wrap: nowrap;
}

.church-logo {
    flex: 0 0 auto;
    width: 86px;
    height: 86px;
    /* if you use a background image, ensure it scales */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.header-text {
    flex: 1 1 auto;
    min-width: 0;
}

    /* Prevent long lines from overflowing */
    .header-text h1,
    .header-text h2,
    .header-text h4,
    .header-text h5 {
        margin: 0;
        word-break: break-word;
    }

    /* Nice spacing between lines */
    .header-text h1 {
        margin-bottom: 6px;
    }

    .header-text h5 {
        margin-bottom: 10px;
    }

    .header-text h2 {
        margin-bottom: 6px;
    }

    .header-text h4 {
        margin-bottom: 0;
    }


/* Mobile: stack and center */
@media (max-width: 935px) {
    .header-section.header-split {
        flex-direction: column;
        gap: 10px;
    }

    .church-logo {
        width: 130px;
        height: 130px;
        flex: 0 0 auto;
    }

    .header-text {
        display: block;
        width: 100%;
        max-width: 100%;
        text-align: center;
    }

        .header-text h1 {
            font-size: 19px;
        }

        .header-text h5 {
            font-size: 12px;
        }

        .header-text h2 {
            font-size: 18px;
            font-weight: 300;
        }

        .header-text h4 {
            font-size: 15px;
        }
}
/* ===== Mobile tweaks ===== */
@media (max-width: 768px) {
    .header-section.header-split {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 14px 10px;
        gap: 10px;
    }

    .church-logo {
        width: 64px;
        height: 64px;
    }

    /* Scale down text for small screens */
    .header-text h1 {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .header-text h5 {
        font-size: 0.85rem;
        line-height: 1.35;
    }

    .header-text h2 {
        font-size: 1.0rem;
        line-height: 1.25;
    }

    .header-text h4 {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    /* Give content comfortable edges */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Extra-small phones */
@media (max-width: 420px) {
    .header-text h1 {
        font-size: 0.98rem;
    }

    .header-text h5 {
        font-size: 0.8rem;
    }

    .header-text h2 {
        font-size: 0.95rem;
    }

    .header-text h4 {
        font-size: 0.9rem;
    }
}
