@import url("https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap");

:root {
    --teal: #427f80;
    --teal-dark: #315f60;
    --gold: #806323;
    --cream: #ece3b6;
    --blue: #a9c9df;
    --ink: #3d3d3b;
    --paper: #fbfaf5;
    --white: #ffffff;
    --line: #ddd8c5;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "Lato", Arial, Helvetica, sans-serif; font-size: 17px; line-height: 1.65; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.container { width: min(1120px, 92%); margin: 0 auto; }
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-inner { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.logo { width: 245px; height: auto; }
.nav { display: flex; align-items: center; gap: 5px; }
.nav a { padding: 10px 12px; color: var(--ink); font-size: .94rem; font-weight: 700; border-radius: 4px; }
.nav a:hover, .nav a.active { background: var(--cream); color: var(--gold); text-decoration: none; }
.nav-toggle { display: none; border: 0; background: none; font-size: 28px; color: var(--teal); cursor: pointer; }
.hero { position: relative; min-height: 600px; display: grid; align-items: center; overflow: hidden; background: #dbe8ef; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 66%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(31,51,55,.67), rgba(31,51,55,.24) 55%, rgba(31,51,55,.04)); }
.hero-content { position: relative; z-index: 1; color: #fff; max-width: 760px; padding: 90px 0; }
.hero h1 { font-size: clamp(2.4rem,5vw,4.5rem); line-height: 1.08; margin: 0 0 22px; font-weight: 900; }
.hero p { font-size: 1.12rem; max-width: 650px; }
.section { padding: 72px 0; }
.section.alt { background: var(--cream); }
.section h2, .page-header h1 { color: var(--gold); font-weight: 900; line-height: 1.15; }
.section h2 { font-size: clamp(2rem,4vw,3rem); margin: 0 0 18px; }
.page-header { background: var(--blue); padding: 70px 0 62px; }
.page-header h1 { margin: 0; font-size: clamp(2.6rem,5vw,4rem); }
.page-header p { margin: 14px 0 0; font-size: 1.1rem; }
.prose { max-width: 850px; }
.prose h2 { color: var(--teal); font-size: 1.65rem; font-weight: 900; margin-top: 42px; }
.prose h2:first-child { margin-top: 0; }
.quote { max-width: 850px; margin: 20px auto; color: var(--teal); font-size: 1.55rem; font-weight: 700; }
.center { text-align: center; }
.grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.card { background: #fff; border: 1px solid var(--line); padding: 28px; }
.card h3 { margin-top: 0; color: var(--teal); font-size: 1.35rem; font-weight: 900; }
.card-image { width: 100%; aspect-ratio: 1/1; object-fit: cover; margin-bottom: 22px; }
.btn { display: inline-block; padding: 11px 21px; border-radius: 3px; background: var(--teal); color: #fff; font-weight: 700; }
.btn:hover { background: var(--teal-dark); color: #fff; text-decoration: none; }
.btn.gold { background: var(--gold); }
.team-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.team-card { overflow: hidden; background: #fff; border: 1px solid var(--line); }
.team-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.team-card-body { padding: 22px; }
.team-card h3 { margin: 0; color: var(--gold); font-size: 1.35rem; font-weight: 900; }
.team-card p { margin: 4px 0 0; }
.email-image { width: 330px; max-width: 100%; height: auto; margin: 8px 0 14px; }
.site-footer { background: var(--teal); color: #fff; padding: 50px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.site-footer h3 { color: var(--cream); margin-top: 0; font-weight: 900; }
.site-footer a { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.25); margin-top: 34px; padding-top: 17px; font-size: .86rem; }
@media (max-width:900px) { .nav { display:none; position:absolute; left:0; right:0; top:92px; background:#fff; border-bottom:1px solid var(--line); padding:12px 4% 28px; flex-direction:column; align-items:stretch; max-height:calc(100vh - 92px); max-height:calc(100dvh - 92px); overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; } .nav.open{display:flex;} .nav a{padding:13px;} .nav-toggle{display:block;} .grid,.team-grid{grid-template-columns:1fr 1fr;} .footer-grid{grid-template-columns:1fr 1fr;} }
@media (max-width:620px) { .logo{width:210px;} .hero{min-height:650px;} .hero-content{padding:65px 0;} .grid,.team-grid,.footer-grid{grid-template-columns:1fr;} .section{padding:55px 0;} }


/* Ministries hover/focus dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    padding: 8px 0;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
    z-index: 50;
}

.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    white-space: nowrap;
    border-radius: 0;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
    display: block;
}

@media (max-width: 900px) {
    .nav-dropdown {
        width: 100%;
    }

    .dropdown-menu {
        display: block;
        position: static;
        min-width: 0;
        padding: 0 0 0 18px;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .dropdown-menu a {
        padding: 10px 13px;
        font-weight: 400;
    }
}


/* Footer contact links */
.footer-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    gap: 30px;
    text-align: center;
}

.footer-contact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-contact-item h3 {
    margin: 8px 0 8px;
}

.footer-contact-item a {
    color: #ffffff;
}

.footer-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 2px solid var(--cream);
    border-radius: 50%;
    color: var(--cream);
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
}

.footer-email-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}

.footer-bottom {
    text-align: center;
}

@media (max-width: 900px) {
    .footer-contact-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 620px) {
    .footer-contact-grid {
        grid-template-columns: 1fr;
    }
}


.footer-icon-link {
    text-decoration: none;
}

.footer-email-link {
    display: inline-block;
    line-height: 0;
}

.footer-email-image {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
}


.footer-address-text {
    line-height: 1.6;
}


.church-online-buttons {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: nowrap;
    margin-top: 24px;
    margin-bottom: 40px;
}

@media (max-width: 760px) {
    .church-online-buttons {
        flex-wrap: wrap;
    }
}


/* Unified button colours across all pages */
.btn,
.button,
a.btn,
a.button,
button,
input[type="button"],
input[type="submit"] {
    background-color: #427f80 !important;
    border-color: #427f80 !important;
    color: #ffffff !important;
}

.btn:hover,
.btn:focus,
.button:hover,
.button:focus,
a.btn:hover,
a.btn:focus,
a.button:hover,
a.button:focus,
button:hover,
button:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus {
    background-color: #35696a !important;
    border-color: #35696a !important;
    color: #ffffff !important;
}


/* Staff profile pages */
.staff-profile-grid {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: 40px;
    align-items: start;
}

.staff-profile-photo img {
    width: 100%;
    height: auto;
    display: block;
}

.staff-profile-content h1 {
    margin-top: 0;
}

.staff-profile-content h2 {
    margin-top: 6px;
}

@media (max-width: 760px) {
    .staff-profile-grid {
        grid-template-columns: 1fr;
    }
}


/* About page partnership organisations */
.partnership-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
    margin-top: 24px;
}

.partnership-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
}

.partnership-card > a:first-child {
    display: flex;
    min-height: 150px;
    width: 100%;
    align-items: center;
    justify-content: center;
}

.partnership-logo {
    display: block;
    max-width: 220px;
    max-height: 140px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.partnership-logo-wide {
    background: #427f80;
    padding: 18px;
    box-sizing: border-box;
}

.partnership-card h3 {
    margin: 0;
}

@media (max-width: 760px) {
    .partnership-grid {
        grid-template-columns: 1fr;
    }
}


/* Staff email addresses displayed as GIF images */
.staff-email-gif {
    display: inline-block;
    width: auto;
    height: auto;
    vertical-align: middle;
}


/* Uploaded partnership logos */
.partnership-card .partnership-logo {
    width: 100%;
    max-width: 260px;
    height: 180px;
    max-height: 180px;
    object-fit: contain;
    background: transparent;
    padding: 0;
}

.partnerships-heading {
    margin-top: 72px;
}

/* About page: keep Who We Are text aligned with the section content. */
.who-we-are-text { margin-left: 0; margin-right: 0; }

/* Kids and Youth pages: keep main text flush with the normal content width. */
.no-indent-prose { max-width: none; margin-left: 0; margin-right: 0; }

/* Tapestry Kids ministry logo within the page content. */
.kids-ministry-logo {
    width: min(320px, 70vw);
    margin: 0 auto 32px;
}

.kids-ministry-logo img {
    display: block;
    width: 100%;
    height: auto;
}

/* Church Online: align heading and buttons with the full page container. */
.church-online-content { max-width: none; }
.church-online-buttons { margin-left: 0; margin-right: 0; }

/* Give page: match the About page content alignment. */
.give-content { }

/* About page: match section-title typography used on standard content pages. */
.about-content > h2 { color: var(--teal); font-size: 1.65rem; font-weight: 900; margin-top: 42px; margin-bottom: 18px; }
.about-content > h2:first-child { margin-top: 0; }

/* Home page */
.home-hero .hero-content {
    max-width: 780px;
}

.home-hero-tagline {
    max-width: 720px;
    margin: 0 0 22px;
    font-size: clamp(1.45rem, 2.7vw, 2.15rem) !important;
    line-height: 1.25;
    font-weight: 900;
}

.home-service-details {
    margin: 24px 0;
    font-size: 1.08rem;
    line-height: 1.7;
}

.home-section {
    max-width: 850px;
}

.home-section h2 {
    margin-bottom: 20px;
}

.home-section p:last-of-type {
    margin-bottom: 26px;
}

.home-lead {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--teal);
}

.home-join {
    background: var(--blue);
}

.home-join h2 {
    color: var(--gold);
}

.home-join p {
    margin: 12px auto;
}

.home-closing {
    margin-top: 24px !important;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--teal-dark);
}


/* Keep the homepage title left aligned */
.home-hero .hero-content > h1 {
    text-align: left;
}


/* Church Online laptop image */
.church-online-laptop { display:block; width:min(100%, 450px); height:auto; margin:24px 0 30px; border-radius:10px; }


.connect-feature {
    margin-bottom: 36px;
}

.connect-feature-image {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    border: 1px solid var(--line);
}


.plan-visit-image-section {
    padding-bottom: 0;
}


/* Photo banners for visitor and connect pages */
.photo-page-header {
    position: relative;
    min-height: 430px;
    padding: 0;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.photo-page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(25, 45, 48, .72), rgba(25, 45, 48, .36) 58%, rgba(25, 45, 48, .08));
}

.photo-page-header-content {
    position: relative;
    z-index: 1;
    padding-top: 90px;
    padding-bottom: 68px;
    color: #ffffff;
}

.photo-page-header .photo-page-header-content h1,
.photo-page-header .photo-page-header-content p {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,.36);
}

.photo-page-header .photo-page-header-content p {
    font-size: 1.15rem;
}

.plan-visit-banner {
    background-image: url("../images/connect-community.png");
    background-position: center 45%;
}

.youth-banner {
    background-image: url("../images/youth-hangout.png");
    background-position: center 30%;
}

.kids-banner {
    background-image: url("../images/kids-hangout.png");
    background-position: center 46%;
}

.connect-banner {
    background-image: url("../images/connect-seated-friends.png");
    background-position: center 30%;
}

.tapestry-connect-banner {
    background-image: url("../images/connect-friends.png");
    background-position: center 30%;
}

.church-online-banner {
    background-image: url("../images/church-online-laptop.jpg");
    background-position: center 48%;
}

.give-banner {
    background-image: url("../images/give-banner.jpg");
    background-position: center 50%;
}

.contact-banner {
    background-image: url("../images/contact-banner.png");
    background-position: center 44%;
}

.about-banner {
    background-image: url("../images/about-banner.jpg");
    background-position: center 50%;
}

@media (max-width: 620px) {
    .photo-page-header {
        min-height: 360px;
    }

    .photo-page-header-content {
        padding-top: 70px;
        padding-bottom: 52px;
    }
}


.vision-banner {
    background-image: url("../images/vision-banner.jpg");
    background-position: center 48%;
}

.beliefs-banner {
    background-image: url("../images/beliefs-banner.jpg");
    background-position: center 52%;
}

.team-banner {
    background-image: url("../images/team-banner.jpg");
    background-position: center 52%;
}

.soccer-camps-banner {
    background-image: url("../images/soccer-camps-banner.jpg");
    background-position: center 48%;
}

.station-card-image {
    aspect-ratio: 4 / 3;
    object-fit: contain;
    object-position: center center;
    background: #f4efe6;
}

.core-values-infographic {
    width: 288px;
    max-width: 72vw;
    margin: 32px auto 0;
}

.core-values-infographic img {
    display: block;
    width: 100%;
    height: auto;
}



.events-banner {
    background-image: url("../images/events-banner.jpg");
}
