/* style.css - Bishop Oxford Pastoral Charge */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Brand Colors - Earthy Rural Palette */
    --clr-forest: #2A4A33;
    --clr-forest-dark: #1F3826;
    --clr-sage: #5A7B63;
    --clr-sage-light: #8BA893;
    --clr-gold: #D6A848;
    --clr-gold-hover: #C29535;
    
    /* Neutrals */
    --clr-cream: #F9F7F1;
    --clr-ivory: #F3EFE6;
    --clr-charcoal: #2B2B2B;
    --clr-text: #4A4A4A;
    --clr-white: #FFFFFF;
    
    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --border-radius: 8px;
    --max-width: 1200px;
    --header-height: 90px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Box Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(42, 74, 51, 0.08);
    --shadow-lg: 0 12px 24px rgba(42, 74, 51, 0.12);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--clr-text);
    background-color: var(--clr-cream);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--clr-forest-dark);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

a {
    color: var(--clr-forest);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover, a:focus {
    color: var(--clr-gold);
}

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

ul, ol {
    list-style: none;
}

.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 2rem;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--clr-gold);
    color: var(--clr-forest-dark);
}

.btn-primary:hover {
    background-color: var(--clr-gold-hover);
    color: var(--clr-forest-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    color: var(--clr-forest);
    border-color: var(--clr-forest);
}

.btn-secondary:hover {
    background-color: var(--clr-forest);
    color: var(--clr-white);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
    background-color: var(--clr-white);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-smooth);
    height: var(--header-height);
    box-shadow: var(--shadow-sm);
}

.site-header.scrolled {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.brand-logo {
    height: 50px;
    width: auto;
    transition: height var(--transition-smooth);
}

.scrolled .brand-logo {
    height: 40px;
}

.brand-name {
    font-family: var(--font-heading);
    color: var(--clr-forest-dark);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: var(--clr-charcoal);
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--clr-gold);
    transition: width var(--transition-smooth);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a.active {
    color: var(--clr-forest);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--clr-forest-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ==========================================================================
   Hero Sections
   ========================================================================== */
.hero {
    margin-top: var(--header-height);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--clr-white);
}

.hero-small {
    min-height: 40vh;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(31, 56, 38, 0.7), rgba(43, 43, 43, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.hero h1 {
    color: var(--clr-white);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--clr-forest-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--spacing-lg) 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 50px;
    filter: brightness(0) invert(1);
}

.footer-brand-name {
    font-family: var(--font-heading);
    color: var(--clr-gold);
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-widget h3 {
    color: var(--clr-white);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--clr-gold);
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: var(--clr-gold);
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-contact a {
    color: var(--clr-white);
}

.footer-contact a:hover {
    color: var(--clr-gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

/* ==========================================================================
   Common Layouts & Components
   ========================================================================== */
/* Section Titles */
.section-title {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--clr-sage);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* Grid Layouts */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Cards */
.card {
    background: var(--clr-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img-wrap {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
}

.card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.card-meta {
    font-size: 0.9rem;
    color: var(--clr-sage);
    margin-bottom: 1rem;
    font-weight: 500;
}

.card-content p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Two Column Content (Image + Text) */
.content-img {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.lead-text {
    font-size: 1.2rem;
    color: var(--clr-forest);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

/* Special Background Section */
.bg-ivory {
    background-color: var(--clr-ivory);
}

.bg-forest {
    background-color: var(--clr-forest);
    color: var(--clr-white);
}

.bg-forest h2, .bg-forest h3 {
    color: var(--clr-gold);
}

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--clr-sage-light);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
    padding-right: 3rem;
}

.timeline-item:nth-child(even) {
    margin-left: auto;
    padding-right: 0;
    padding-left: 3rem;
}

.timeline-dot {
    position: absolute;
    top: 0;
    right: -10px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--clr-gold);
    border: 4px solid var(--clr-cream);
    box-sizing: content-box;
}

.timeline-item:nth-child(even) .timeline-dot {
    right: auto;
    left: -10px;
}

.timeline-date {
    font-family: var(--font-heading);
    color: var(--clr-forest);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--clr-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--clr-forest-dark);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    background-color: var(--clr-white);
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--clr-sage);
    box-shadow: 0 0 0 3px rgba(90, 123, 99, 0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.error-msg {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    display: none;
}

/* Lightbox Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: zoom-in;
}

.gallery-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

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

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 90vh;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    background: transparent;
    border: none;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .timeline::before {
        left: 0;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 3rem;
        padding-right: 0;
    }
    
    .timeline-dot {
        left: -10px !important;
        right: auto !important;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Mobile Menu */
    .mobile-toggle {
        display: block;
    }
    
    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--clr-white);
        box-shadow: var(--shadow-sm);
        transition: left var(--transition-smooth);
        overflow-y: auto;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 2rem;
        align-items: center;
        gap: 1.5rem;
    }
    
    .scrolled + .main-nav {
        top: 70px;
        height: calc(100vh - 70px);
    }

    .brand-name {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
}
