:root {
    --navy: #182838;
    --navy-deep: #102030;
    --blue: #24384d;
    --gold: #cfa45a;
    --gold-dark: #b48638;
    --cream: #f7f3ec;
    --paper: #ffffff;
    --ink: #1f2933;
    --muted: #5c6670;
    --border: #e5ded3;
    --soft-shadow: 0 10px 30px rgba(16, 32, 48, 0.08);
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--cream);
    color: var(--ink);
}

h1,
h2,
h3,
.hero h1,
.site-header h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--navy);
}

.hero,
.site-header {
    background: var(--navy);
    color: #fff !important;
    padding: 64px 20px;
    text-align: center;
}

.hero h1,
.site-header h1,
.site-header-inner,
.site-header-inner a {
    color: #fff !important;
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    text-decoration: none !important;
}

.hero p,
.site-header p {
    margin: 0;
    font-size: 1.08rem;
    color: #f2eadf;
}

.main-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 18px rgba(16, 32, 48, 0.05);
}

.header-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    color: var(--navy);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    color: var(--gold);
    display: inline-flex;
    align-items: center;
}

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

.main-nav a {
    color: var(--navy);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 2px;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--gold-dark);
    font-weight: 600 !important;
    text-decoration: none;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--navy);
    font-size: 1.9rem;
    cursor: pointer;
    padding: 0;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 34px 16px;
}

.top-links {
    margin-bottom: 22px;
}

.top-links a,
.back-link {
    color: var(--navy);
    font-weight: bold;
    text-decoration: none;
}

.intro,
.card,
.church-profile,
.no-results,
.church-card,
.link-card,
.filters {
    background: var(--paper);
    border: 1px solid rgba(229, 222, 211, 0.8);
    border-radius: 18px;
    box-shadow: var(--soft-shadow);
}

.intro,
.card,
.church-profile,
.no-results {
    padding: 28px;
}

.section {
    margin-bottom: 34px;
}

.section h2 {
    color: var(--navy);
}

.search-box {
    background: #fff;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    max-width: 720px;
    margin: 10px auto 0 auto;
}

.search-box input {
    flex: 1;
}

.search-box button,
button,
.button-link,
.cta a,
.church-actions a {
    display: inline-block;
    background: var(--gold);
    color: #fff;
    border: none;
    text-decoration: none;
    padding: 11px 17px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: 0.2s ease;
}

.search-box button:hover,
button:hover,
.button-link:hover,
.cta a:hover,
.church-actions a:hover {
    background: var(--gold-dark);
}

.button-link.secondary,
.church-actions a.secondary {
    background: var(--navy);
}

.button-link.secondary:hover,
.church-actions a.secondary:hover {
    background: var(--blue);
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.link-card {
    padding: 16px;
    text-decoration: none;
    color: var(--ink);
    display: block;
}

.link-card strong,
.church-card h2 a,
.church-card h3 a {
    color: var(--navy);
}

.church-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.church-card {
    padding: 22px;
}

.church-card h2,
.church-card h3 {
    margin-top: 0;
}

.church-card h2 a,
.church-card h3 a {
    text-decoration: none;
}

.church-card h3 {
    font-size: 1.5rem;
}

.tag {
    display: inline-block;
    background: rgba(207, 164, 90, 0.14);
    color: var(--navy);
    border: 1px solid rgba(207, 164, 90, 0.35);
    padding: 7px 13px;
    border-radius: 999px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.tag a {
    color: var(--navy);
    text-decoration: none;
}

.church-meta {
    margin: 8px 0;
    line-height: 1.5;
}

.church-actions,
.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.filters {
    padding: 20px;
    margin-bottom: 24px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px 13px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-sizing: border-box;
    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(207, 164, 90, 0.35);
    border-color: var(--gold);
}

.results-count {
    margin-bottom: 16px;
    font-weight: bold;
}

.results-count span,
.results-text {
    font-weight: normal;
    color: var(--muted);
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}

.pagination-button {
    display: inline-block;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--navy);
    font-weight: bold;
    transition: 0.2s ease;
}

.pagination-button:hover,
.pagination-button.active {
    background: var(--gold);
    color: #ffffff;
    border-color: var(--gold);
}

.cta {
    text-align: center;
    margin-top: 24px;
}

.site-footer {
    background: var(--navy-deep);
    color: #ffffff;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 16px 24px;
}

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

.footer-column h3 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
}

.footer-column p {
    line-height: 1.7;
    color: #e7ddd0;
}

.footer-column ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #e7ddd0;
    text-decoration: none;
    transition: 0.2s ease;
}

.footer-column a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 36px;
    padding-top: 20px;
    font-size: 0.95rem;
    color: #e7ddd0;
}

@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        background: #ffffff;
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
        gap: 14px;
        box-shadow: 0 12px 28px rgba(16, 32, 48, 0.12);
    }

    .main-nav.mobile-open {
        display: flex;
    }

    .main-nav a {
        width: 100%;
    }
}

@media (max-width: 850px) {
    .link-grid,
    .church-grid {
        grid-template-columns: 1fr 1fr;
    }

    .search-box,
    .filter-grid {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 560px) {
    .link-grid,
    .church-grid {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .site-header h1 {
        font-size: 1.8rem;
        color: #fff !important;
    }

    .site-logo {
        font-size: 1.05rem;
    }
}

.church-actions a.btn-details {
    background: var(--gold);
}

.church-actions a.btn-details:hover {
    background: var(--gold-dark);
}

.church-actions a.btn-website {
    background: var(--navy);
}

.church-actions a.btn-website:hover {
    background: var(--blue);
}

.church-actions a.btn-livestream {
    background: #7b1e3a;
}

.church-actions a.btn-livestream:hover {
    background: #63172f;
}

.church-actions a.btn-directions {
    background: #2f5d3a;
}

.church-actions a.btn-directions:hover {
    background: #264b2f;
}

.map-popup {
    max-width: 260px;
    padding: 4px 2px;
    font-family: Georgia, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
}

.map-popup-title {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
    line-height: 1.3;
}

.map-popup-denomination {
    display: inline-block;
    background: rgba(207, 164, 90, 0.14);
    color: var(--navy);
    border: 1px solid rgba(207, 164, 90, 0.35);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.map-popup-address {
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 14px;
}

.map-popup-actions a {
    display: inline-block;
    background: var(--gold);
    color: #fff;
    text-decoration: none;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    transition: 0.2s ease;
}

.map-popup-actions a:hover {
    background: var(--gold-dark);
}

.new-in-christ-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.new-in-christ-image {
    flex-shrink: 0;
}

.new-in-christ-image img {
    width: 170px;
    height: auto;
    display: block;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(16, 32, 48, 0.14);
    transition: 0.25s ease;
}

.new-in-christ-image img:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(16, 32, 48, 0.18);
}

.new-in-christ-content {
    flex: 1;
}

.church-actions a.btn-newinchrist {
    background: #2f5d3a;
}

.church-actions a.btn-newinchrist:hover {
    background: #264b2f;
}

@media (max-width: 700px) {

    .new-in-christ-layout {
        flex-direction: column;
    }

    .new-in-christ-image {
        width: 100%;
    }

    .new-in-christ-image img {
        width: 180px;
        margin: 0 auto;
    }

}

.hero-home {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(
            rgba(16, 32, 48, 0.72),
            rgba(16, 32, 48, 0.72)
        ),
        url('/assets/img/durham-region-map-2.png');

    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    color: #fff !important;
}

.hero-home::before {
    content: "";
    position: absolute;
    inset: 0;

    background:
        radial-gradient(
            circle at top left,
            rgba(207, 164, 90, 0.14),
            transparent 38%
        );

    pointer-events: none;
}

.hero-home h1,
.hero-home p,
.hero-home .search-box {
    position: relative;
    z-index: 2;
}

.contact-form {
    display: grid;
    gap: 18px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-field label {
    font-weight: 800;
    color: var(--navy);
}

.form-field textarea {
    min-height: 170px;
    resize: vertical;
}

.hidden-field {
    display: none;
}

.turnstile-wrap {
    margin-top: 4px;
}

.message-success {
    background: #edf7ef;
    border: 1px solid #b8dec0;
    color: #245c32;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 700;
}

.message-error {
    background: #fdeeee;
    border: 1px solid #efb9b9;
    color: #842525;
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 20px;
    font-weight: 700;
}

.church-photo {
    margin-bottom: 24px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--soft-shadow);
    border: 1px solid rgba(229, 222, 211, 0.8);
    max-width: 640px;
}

.church-photo img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

.denomination-description {
    margin-bottom: 28px;
}

.denomination-description h3 {
    margin-top: 0;
}

.section-denom-desc p {
    font-size: 14px;
}

p a, p a:hover, p a:visited {
    color:color: var(--navy);
    font-weight: 700;
    text-decoration: underline;
}