/* ==========================================================================
   CSS VARIABLE CORE DESIGN TOKENS (Modify these to instantly skin your site)
   ========================================================================== */
:root {
    --primary-brand: #1a365d;       /* Deep corporate blue color */
    --accent-brand: #c69214;        /* Rich accent gold tone */
    --text-dark: #2d3748;           /* Accessible dark body text */
    --text-light: #718096;          /* Subdued grey metadata text */
    --bg-light: #f7fafc;            /* Clean light grey background card fill */
    --white: #ffffff;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --max-layout-width: 1140px;
}

/* ==========================================================================
   ELEMENT RESETS & GLOBAL BASELINE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.65;
    background-color: var(--white);
    overflow-x: visible; /* Prevents structural scroll clipping traps */
}

ul {
    list-style: none;
}

a {
    text-shadow: none;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

/* LAYOUT CONTAINER CONSTRAINT */
.layout-container {
    width: 100%;
    max-width: var(--max-layout-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   STICKY TOP HEADER STYLING COMPONENT
   ========================================================================== */
.app-header {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.header-inner {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* BRANDING BLOCKS */
.brand-identity {
    display: flex;
    flex-direction: column;
}

.brand-primary {
        font-family: 'Cormorant Garamond', serif;
        font-weight: 600;
        font-style: italic;
        color: var(--primary-church);
        font-size: 1.8rem;
        line-height: 1.1;
    }
    .brand-secondary {
        font-family: 'Inter', sans-serif;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 2px;
        color: var(--accent-gold);
        font-size: 0.75rem;
    }
	
/* DESKTOP STAGE NAVIGATION LIST */
.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
}

.nav-link:hover, 
.nav-link.active {
    color: var(--primary-brand);
    border-bottom-color: var(--accent-brand);
}

/* ACTION CALLOUT NAVIGATION ITEM */
.nav-btn-cta {
    background-color: var(--primary-brand);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 4px;
    border: none !important;
}

.nav-btn-cta:hover {
    background-color: var(--accent-brand);
    transform: translateY(-1px);
}

/* MOBILE TOGGLE BURGER ELEMENT */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.toggle-bar {
    width: 100%;
    height: 2px;
    background-color: var(--primary-brand);
    transition: var(--transition-smooth);
}

/* ==========================================================================
   MODERN PARALLAX HERO CONTAINER
   ========================================================================== */
.hero-billboard {
    position: relative;
    /*height: 65vh;*/
	min-height: 85vh !important;
    /*min-height: 440px;*/
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    z-index: 1;
    overflow: hidden; /* Essential: Keeps the image from spilling out of the frame */
}

/* The standalone image container layer */
.billboard-parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 130%; /* Make it taller so it has extra image padding to scroll into */
    background-color: #2d3748;
    background-image: url('images/cross.png'); /* Your actual image path */
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;
    will-change: transform; /* Boosts rendering speed on modern browsers */
    z-index: 1;
}

.billboard-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
 /*   background-color: rgba(26, 54, 93, 0.55); */
    z-index: 2;
}

.billboard-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 0 20px;
}

/* ==========================================================================
   CONTENT LAYOUT COMPONENTS
   ========================================================================== */
.content-wrapper {
    padding: 80px 0;
}

/* EDITORIAL FOCUS PATTERN */
.editorial-block {
    max-width: 100%;
    margin-bottom: 60px;
}

/* --- New Layout Rules for the Anglican Way Section --- */
.editorial-split-wrapper {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 60px;
}

.editorial-block-anglican {
    flex: 1.2; /* Gives the text slightly more space than the image */
}

.editorial-image-pane {
    flex: 0.8;
    display: flex;
    justify-content: center;
}

.long-editorial-img {
    width: 100%;
    max-width: 450px; /* Limits how wide the photo can stretch on massive displays */
    height: auto;
    object-fit: cover;
    border-radius: 8px; /* Optional: rounds the corners cleanly */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Optional: adds a soft drop shadow */
}

/* Mobile responsive fallback */
@media (max-width: 768px) {
    .editorial-split-wrapper {
        flex-direction: column; /* Stacks the image below the text on phones */
        gap: 20px;
    }
    .long-editorial-img {
        max-width: 100%; /* Lets it span full width on small screens */
    }
}

.section-title {
    font-size: 2rem;
    color: var(--primary-brand);
    margin-bottom: 16px;
    font-weight: 700;
}

.section-body {
    font-size: 1.15rem;
    color: var(--text-dark);
}

/* STRUCTURAL CONTENT CARDS COMPONENT GRID */
.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.content-card {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: 6px;
    border-top: 4px solid var(--primary-brand);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.card-title {
    font-size: 1.4rem;
    color: var(--primary-brand);
    margin-bottom: 16px;
    font-weight: 600;
}

.card-body {
    font-size: 1rem;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.card-body-meta {
    font-size: 0.95rem;
    margin-bottom: 24px;
    color: var(--text-light);
}

/* UNIVERSAL APP BUTTON SYSTEM */
.action-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

.button-primary {
    background-color: var(--accent-brand);
    color: var(--white);
}

.button-primary:hover {
    background-color: var(--white);
    color: var(--primary-brand);
}

.button-secondary {
    background-color: var(--primary-brand);
    color: var(--white);
}

.button-secondary:hover {
    background-color: var(--accent-brand);
}

.button-outline {
    background-color: transparent;
    border: 2px solid var(--primary-brand);
    color: var(--primary-brand);
}

.button-outline:hover {
    background-color: var(--primary-brand);
    color: var(--white);
}

/* ==========================================================================
   NEW ADDITIONS: GALLERY & FEATURE SUB-PAGE COMPONENT LAYOUTS
   ========================================================================== */

/* INTERIOR HEADER ZONE STYLING */
.page-intro-banner {
    background-color: var(--bg-light);
    border-bottom: 1px solid #e2e8f0;
    padding: 60px 0;
    text-align: left;
}

.page-main-title {
    font-size: 2.5rem;
    color: var(--primary-brand);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.page-sub-title {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 700px;
}

/* ALTERNATING FEATURE STORY STACK SYSTEM */
.feature-story-container {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-bottom: 100px;
}

.story-row {
    display: flex;
    align-items: center;
    gap: 48px;
}

/* Flips image to right side on wide monitors */
.story-row.reverse {
    flex-direction: row-reverse;
}

.story-image-pane, 
.story-text-pane {
    flex: 1;
    min-width: 290px;
}

.story-image-pane .responsive-img {
    width: 100% !important;
    height: auto !important;
    max-height: 550px !important;  /* Stops massive vertical blowouts */
    object-fit: contain !important; /* Shows full photo without a forced crop */
}

.responsive-img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.story-label {
    display: block;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--accent-brand);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.story-heading {
    font-size: 1.85rem;
    color: var(--primary-brand);
    margin-bottom: 16px;
    font-weight: 700;
}

.story-paragraph {
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.7;
}

/* GRID LAYOUT MATRIX FOR MULTIPLE BULK PHOTOS */
.visual-gallery-section {
    border-top: 1px solid #e2e8f0;
    padding-top: 60px;
}

.gallery-header-block {
    margin-bottom: 40px;
}

/* DYNAMIC MASONRY SYSTEM */
.photo-matrix-grid {
    /* Uses CSS columns instead of rows to handle varying image heights */
    column-count: 3;
    column-gap: 24px;
    width: 100%;
}

.matrix-item {
    background-color: var(--bg-light);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: var(--transition-smooth);
    
    /* CRITICAL: Prevents cards from splitting awkwardly across columns */
    display: inline-block;
    width: 100%;
    margin-bottom: 24px;
}

.matrix-img {
    width: 100%;
    height: auto;        /* Lets the image find its own natural height */
    display: block;
    object-fit: contain; /* Displays the full image without clipping edges */
}

/* MOBILE RESPONSIVENESS FOR THE COLUMNS */
@media (max-width: 900px) {
    .photo-matrix-grid {
        column-count: 2; /* Drops to 2 columns on tablets */
    }
}

@media (max-width: 600px) {
    .photo-matrix-grid {
        column-count: 1; /* Drops to a single clean column on phones */
    }
}

.matrix-caption {
    padding: 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: center;
    background-color: var(--white);
    border-top: 1px solid #edf2f7;
}

/* MOBILE ADAPTATION SYSTEM EXTRA OVERRIDES */
@media (max-width: 768px) {
    .page-intro-banner {
        padding: 40px 0;
    }
    
    .page-main-title {
        font-size: 2rem;
    }

    .story-row, 
    .story-row.reverse {
        flex-direction: column; /* Force vertical flow on mobile screens */
        gap: 24px;
    }
    
    .feature-story-container {
        gap: 60px;
        margin-bottom: 60px;
    }
    
    .story-heading {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   FOOTER BLOCK ARCHITECTURE
   ========================================================================== */
.app-footer {
    background-color: #1a202c; /* Clean, dark contrast theme anchor */
    color: #e2e8f0;
    padding: 60px 0 0 0;
}

.footer-layout {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-segment {
    flex: 1;
    min-width: 250px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--white);
}

.footer-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 8px;
}

.footer-sub-base {
    border-top: 1px solid #2d3748;
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #a0aec0;
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATION MATRIX (MOBILE LAYOUT ENGINE)
   ========================================================================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex; /* Expose mobile layout toggle handle trigger */
    }

    /* Transform row links list array into an absolute dropdown tray */
    .navigation-menu {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease-in-out;
    }

    .navigation-menu.is-active {
        max-height: 450px; /* Expands open drawer cleanly */
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        padding: 24px;
        gap: 0;
    }

    .nav-link {
        display: block;
        padding: 12px 0;
        border-bottom: 1px solid #edf2f7;
    }

    .nav-btn-cta {
        margin-top: 16px;
        text-align: center;
    }

    /* Transforming Mobile Menu Hamburger Animation */
    .nav-toggle.is-open .toggle-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .nav-toggle.is-open .toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.is-open .toggle-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Content adaptations */
    .billboard-title {
        font-size: 2rem;
    }
    
    .footer-layout {
        flex-direction: column;
        gap: 24px;
    }
}

/* ==========================================================================
   LAYOUT STRUCTURE: TOP TEXT + DUAL EVEN IMAGES
   ========================================================================== */

.split-gallery-block {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 80px;
    width: 100%;
}

/* Constrains text to a highly readable line length */
.split-block-header {
    max-width: 800px;
    width: 100%;
}

/* Creates the matching 50/50 image columns */
.split-block-images {
    display: flex;
    gap: 24px;
    width: 100%;
    align-items: flex-start;
}

.split-image-wrapper {
    flex: 1; /* Forces both boxes to scale to identical widths */
    min-width: 0; /* Prevents long text/captions from warping container sizes */
}

.split-panel-img {
    width: 100% !important;
    height: auto !important;
    max-height: 550px !important;  /* Raised slightly to give tall photos great breathing room */
    
    /* THE FIX: Enforces full visibility of your image from edge to edge */
    object-fit: contain !important; 
    
    border-radius: 6px !important;
    display: block !important;
}

/* ==========================================================================
   LAYOUT MATRICES: 50/50 SPLIT SYMMETRICAL 3-ROW GRID ENGINE
   ========================================================================== */

.matrix-dual-column-block {
    display: flex;
    gap: 40px; /* Generous breathing room between columns */
    width: 100%;
    margin-bottom: 80px;
    align-items: flex-start;
}

/* Individual 50% Columns */
.matrix-column-pane {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column; /* Stacks rows 1, 2, and 3 vertically */

}

/* ROW 1: Media Vault (Controls spacing and boundaries for images) */
.matrix-media-vault {
    width: 100%;
    height: 380px; /* Uniform height bounding box for matching visual weight */
    background-color: transparent; /* Clean, empty backdrop transparent space */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

/* The actual image element inside Row 1 */
.matrix-vault-img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    
    /* THE FIX: Prevents cropping on tall images and maps them cleanly inside the box */
    object-fit: contain !important;
    
    border-radius: 6px !important;
    display: block;
}

/* ROW 2: Caption Layer */
.matrix-caption-vault {
    margin-bottom: 12px;
}

.matrix-caption-title {
    font-size: 1.4rem;
    color: var(--primary-brand);
    font-weight: 700;
    line-height: 1.3;
}

/* ROW 3: Body Text Block */
.matrix-body-vault {
    width: 100%;
}

.matrix-body-text {
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.65;
}

/* ==========================================================================
   MOBILE ADAPTATION ENGINE FOR THE 50/50 SYMMETRICAL GRID
   ========================================================================== */
@media (max-width: 768px) {
    .matrix-dual-column-block {
        flex-direction: column; /* Force 50% splits to collapse into single rows on phones */
        gap: 50px; /* Structural separation gap between the stacked blocks */
    }

    .matrix-column-pane {
        width: 100%;
        text-align: center; /* Center-aligns row text properties for mobile reading ease */
        align-items: center;
    }

    .matrix-media-vault {
        height: auto; /* Dissolves desktop height limits so mobile vertical files fit organically */
        max-height: 420px;
        margin-bottom: 16px;
    }

    .matrix-vault-img {
        width: 100% !important;
        max-width: 400px !important; /* Protects tall images from expanding uncontrollably wide on mobile screens */
        margin: 0 auto;
    }
}

/* ==========================================================================
   LAYOUT STRUCTURE: INTRO FOCUS SPLIT OVERRIDE
   ========================================================================== */

.editorial-split-wrapper {
    display: flex;
    gap: 52px; /* Clean tracking space between your purpose text and the image */
    align-items: center; /* Keeps the text block vertically centered next to the photo */
    width: 100%;
    margin-bottom: 80px;
}

/* Assigns equal 50/50 balance across desktop widths */
.editorial-split-wrapper .editorial-block {
    flex: 1;
    min-width: 0;
    margin-bottom: 0 !important; /* Overrides any native bottom spacing on your old section */
}

.editorial-image-pane {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}

/* The Long Image Asset Constraints */
.long-editorial-img {
    width: 100% !important;
    height: auto !important;
    max-height: 550px !important; /* Caps vertical footprint on high-res monitors */
    
    /* THE FIX: Guarantees your long vertical image scales cleanly without getting cropped */
    object-fit: contain !important; 
    
    border-radius: 6px !important;
    display: block;
}

/* Container layout positioning */
.social-connect-strip {
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Base icon structural layout */
.social-icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f4f4f4; /* Default light circle background */
    color: #555555;            /* Default neutral grey icon tint */
    font-size: 1.2rem;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease;
}

/* Official brand color states on user interaction */
.social-icon-link.facebook:hover {
    background-color: #1877F2;
    color: #ffffff;
}

.social-icon-link.x-twitter:hover {
    background-color: #000000;
    color: #ffffff;
}

.social-icon-link.instagram:hover {
    background-color: #E1306C;
    color: #ffffff;
}

/* ==========================================================================
   TABLET & MOBILE BREAKPOINT RESET
   ========================================================================== */
@media (max-width: 992px) {
    .editorial-split-wrapper {
        flex-direction: column; /* Collapses side-by-side into a single vertical stack */
        gap: 40px;
    }

    .editorial-split-wrapper .editorial-block {
        width: 100%;
        text-align: center; /* Center-aligns your scripture text blocks on small devices */
    }

    .editorial-image-pane {
        width: 100%;
    }

    .long-editorial-img {
        max-width: 420px !important; /* Protects portrait imagery from stretching wide on mobile screens */
        margin: 0 auto;
    }
}

/* ==========================================================================
   MOBILE ADAPTATION MATRIX OVERRIDE
   ========================================================================== */
@media (max-width: 768px) {
    .split-block-images {
        flex-direction: column; /* Stacks the two images vertically on phones */
        gap: 32px;
        align-items: center;    /* THE FIX: Centers both image wrappers on the screen */
    }

    .split-image-wrapper {
        width: 100%;
        max-width: 450px;       /* Keeps tall images from stretching too wide on phone screens */
        text-align: center;     /* THE FIX: Centers the captions right under the photos */
    }

    .split-panel-img {
        margin: 0 auto;         /* Safely locks the image position to the absolute horizontal center */
    }
	
	/* Completely removes the placeholder on mobile screens so it stays clean */
    .structural-balance-spacer {
        display: none !important;
	
}


/* ==========================================================================
   THE ABSOLUTE SHADOW & BORDER DESTRUCTION RESET
   ========================================================================== */

/* 1. Strip absolutely everything off the outer container cards */
.photo-matrix-grid *, 
.matrix-item, 
.story-image-pane {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border: none !important;
    outline: none !important;
    background: transparent !important;
}

/* 2. Strip shadows off the images themselves just in case */
.matrix-img, 
.responsive-img,
.story-image-pane img {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    border: none !important;
    outline: none !important;
}

/* 3. Strip any borders or backgrounds from captions */
.matrix-caption {
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}