@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   1. Design System & CSS Custom Properties
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-cream: #FAF8F5;
    --bg-sand: #F3EFE9;
    --bg-sage-light: #E6ECEF;
    --bg-forest: #1C2B33;
    --bg-forest-light: #253B47;
    --text-dark: #1D2A30;
    --text-muted: #546670;
    --text-light: #E6ECEF;
    --accent-gold: #C2A378;
    --accent-gold-dark: #A88656;
    --white: #FFFFFF;
    --border-muted: rgba(76, 104, 117, 0.15);
    --border-light: rgba(230, 236, 238, 0.18);
    --border-dark: rgba(76, 104, 117, 0.25);
    --primary-brand: #4C6875;

    /* Fonts */
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-normal: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-slow: 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Spacing & Layout */
    --container-width: 1280px;
    --header-height: 80px;
    --border-radius: 4px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.serif-title {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 3.5vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

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

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

/* ==========================================================================
   3. Common Layout & Grid Utilities
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.container-narrow {
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.section {
    padding-top: 8rem;
    padding-bottom: 8rem;
    position: relative;
}

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

.section-dark p {
    color: rgba(230, 236, 230, 0.7);
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   4. Buttons & UI Elements
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.2rem;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    border-radius: var(--border-radius);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-brand);
    color: var(--white);
    border: 1px solid var(--primary-brand);
}

.btn-primary:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-forest);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-dark);
    border: 1px solid var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--primary-brand);
    color: var(--bg-cream);
    transform: translateY(-2px);
    border-color: var(--primary-brand);
}

.btn-light {
    background-color: var(--white);
    color: var(--primary-brand);
    border: 1px solid var(--white);
}

.btn-light:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-forest);
    transform: translateY(-2px);
}

.btn-outline-light {
    background-color: transparent;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    border-color: var(--white);
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.btn-link {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dark);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--accent-gold);
}

.btn-link:hover {
    color: var(--accent-gold);
    border-bottom-color: transparent;
}

.btn-link-light {
    color: var(--white);
    border-bottom-color: var(--accent-gold);
}

.btn-link-light:hover {
    color: var(--accent-gold);
}

.hero-btns {
    gap: 15px;
    display: flex;
}

/* ==========================================================================
   5. Interactive Header & Nav System
   ========================================================================== */
.header {
    position: fixed;
    top: 30px;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.header-scrolled {
    background-color: rgba(250, 248, 245, 0.85);
    backdrop-filter: blur(12px) saturate(160%);
    border-bottom-color: var(--border-muted);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
    top: 0px;
}

/* .header-scrolled.header-dark {
  background-color: rgba(28, 43, 51, 0.9);
  border-bottom-color: var(--border-light);
} */

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: all var(--transition-normal);
}

.header-scrolled .logo-img {
    height: 48px;
    width: auto;
}

.logo-text {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-dark);
}

.header-dark:not(.header-scrolled) .logo-text {
    color: var(--white);
}

.header-dark:not(.header-scrolled) .logo-img {
    filter: brightness(0) invert(1);
}

.nav {
    display: flex;
    align-items: center;
    gap: 2.2rem;
}

.nav-link {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-dark);
    position: relative;
    padding: 0.5rem 0;
}

.header-dark:not(.header-scrolled) .nav-link {
    color: var(--white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--accent-gold);
    transition: width var(--transition-fast);
}

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

.nav-link:hover {
    color: var(--accent-gold);
}

/* Donate Nav Button Styling */
.nav-btn-donate {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-brand);
    color: var(--white) !important;
    border: 1px solid var(--primary-brand);
    padding: 0.55rem 1.35rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: none !important;
    letter-spacing: 0.05em;
    transition: all var(--transition-normal);
}

.nav-btn-donate::after {
    display: none !important;
    /* Hide hover underline line */
}

.nav-btn-donate:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-forest) !important;
    transform: translateY(-1px);
}

.nav-btn-donate svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2.5;
    fill: none;
}

/* Styling when header is transparent dark (home hero overlay) */
.header-dark:not(.header-scrolled) .nav-btn-donate {
    background-color: var(--white);
    color: var(--bg-forest) !important;
    border-color: var(--white);
}

.header-dark:not(.header-scrolled) .nav-btn-donate:hover {
    background-color: transparent;
    color: var(--white) !important;
    border-color: var(--white);
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: inline-flex;
    align-items: center;
}

.nav-dropdown:hover .dropdown-chevron {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(15px);
    background-color: var(--white);
    min-width: 250px;
    border: 1px solid var(--border-muted);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border-radius: var(--border-radius);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: 0.8rem 0;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: all var(--transition-fast);
}

.subpage-branch-icon {
    display: none;
}

.dropdown-item:hover {
    background-color: var(--bg-cream);
    color: var(--accent-gold-dark);
    padding-left: 1.8rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 1100;
}

.header-dark:not(.header-scrolled) .mobile-menu-btn {
    color: var(--white);
}

/* ==========================================================================
   6. Global Footer
   ========================================================================== */
.footer {
    background-color: var(--bg-forest);
    color: var(--white);
    padding-top: 6rem;
    padding-bottom: 3rem;
    border-top: 1px solid var(--border-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 4rem;
    margin-bottom: 5rem;
}

.footer-brand p {
    color: rgba(230, 236, 230, 0.7);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--white);
}

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

.footer-socials {
    display: flex;
    gap: 1.25rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all var(--transition-fast);
}

.social-icon:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-3px);
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    font-size: 0.9rem;
    color: rgba(230, 236, 230, 0.75);
    transition: color var(--transition-fast);
}

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

.footer-contact p {
    font-size: 0.9rem;
    color: rgba(230, 236, 230, 0.75);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

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

/* Footer Newsletter Form */
.footer-newsletter p {
    font-size: 0.9rem;
    color: rgba(230, 236, 230, 0.7);
    margin-bottom: 1.2rem;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.8rem 1.2rem;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--white);
    border-radius: var(--border-radius);
    transition: border-color var(--transition-fast);
}

.newsletter-input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background-color: rgba(255, 255, 255, 0.08);
}

.newsletter-btn {
    background-color: var(--accent-gold);
    color: var(--bg-forest);
    border: none;
    padding: 0 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.newsletter-btn:hover {
    background-color: var(--white);
}

.footer-bottom {
    margin-top: 5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(230, 236, 230, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: rgba(230, 236, 230, 0.5);
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a:hover {
    color: var(--white);
}

/* ==========================================================================
   7. Form Controls & Validation (:user-valid / :user-invalid)
   ========================================================================== */
.form-group {
    margin-bottom: 1.8rem;
    display: flex;
    flex-direction: column;
}

.form-label {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
}

.form-control {
    font-family: var(--font-sans);
    background-color: var(--white);
    border: 1px solid var(--border-muted);
    border-radius: var(--border-radius);
    padding: 0.9rem 1.2rem;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.form-control::placeholder {
    color: #a0a8a0;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 4px 20px rgba(194, 163, 120, 0.06);
}

/* Modern Native Form Validation CSS Styling */
.form-control:user-valid {
    border-color: rgba(30, 140, 60, 0.5);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231e8c3c' width='18' height='18'%3E%3Cpath d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 2.5rem;
}

.form-control:user-invalid {
    border-color: rgba(200, 30, 30, 0.5);
    background-color: rgba(200, 30, 30, 0.01);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23c81e1e' width='18' height='18'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 18px;
    padding-right: 2.5rem;
}

/* ==========================================================================
   8. Page Template Hero / Cover Layouts
   ========================================================================== */
.hero-page {
    position: relative;
    background-color: var(--bg-sand);
    padding-top: calc(var(--header-height) + 5rem);
    padding-bottom: 6rem;
    overflow: hidden;
    border-bottom: 1px solid var(--border-muted);
}

.hero-page::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle, rgba(230, 236, 230, 0.8) 0%, rgba(243, 239, 233, 0) 70%);
    z-index: 1;
}

.hero-page-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero-page-tag {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--accent-gold-dark);
    margin-bottom: 1rem;
    display: block;
}

.hero-page-title {
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.hero-page-desc {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-family: var(--font-serif);
    line-height: 1.4;
    color: var(--text-muted);
}

/* ==========================================================================
   9. Component Specific Styles
   ========================================================================== */

/* Trust Element Box */
.trust-banner {
    background-color: var(--bg-sage-light);
    border-left: 3px solid var(--accent-gold);
    padding: 1.8rem 2.5rem;
    margin: 3rem 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.trust-banner-text {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.trust-banner-author {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Storytelling Callout Split */
.story-split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.story-image-wrap {
    position: relative;
}

.story-image-wrap img {
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.04);
    transition: transform var(--transition-slow);
    display: block;
}

.story-image-wrap:hover img {
    transform: scale(1.03);
}

.story-image-decor {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    border-top: 1px solid var(--accent-gold);
    border-left: 1px solid var(--accent-gold);
    z-index: -1;
    border-radius: var(--border-radius) 0 0 0;
}

.story-content h2 {
    margin-bottom: 1.5rem;
}

.story-content p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

/* Premium Card System */
.card-premium {
    background-color: var(--white);
    border: 1px solid var(--border-muted);
    border-radius: var(--border-radius);
    padding: 3rem 2.5rem;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(30, 43, 31, 0.04);
    border-color: var(--accent-gold);
}

.card-icon {
    font-size: 2rem;
    color: var(--accent-gold-dark);
    margin-bottom: 1rem;
}

.card-premium h3 {
    margin-bottom: 1rem;
    font-weight: 500;
}

.card-premium p {
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* Program Specific Detail Card */
.card-program {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 480px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: flex-end;
    border: 1px solid var(--border-muted);
}

.card-program-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    z-index: 1;
}

.card-program:hover .card-program-img {
    transform: scale(1.06);
}

.card-program::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(28, 43, 51, 0.95) 0%, rgba(28, 43, 51, 0.4) 60%, rgba(28, 43, 51, 0.1) 100%);
    z-index: 2;
}

.card-program-content {
    position: relative;
    z-index: 3;
    padding: 3rem 2rem;
    width: 100%;
    color: var(--white);
}

.card-program-title {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.card-program-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Timeline Components */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 4rem auto;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 7px;
    width: 2px;
    height: 100%;
    background-color: var(--border-muted);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-marker {
    position: absolute;
    top: 6px;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--bg-cream);
    border: 2px solid var(--accent-gold);
    transition: all var(--transition-fast);
    z-index: 2;
}

.timeline-item.active .timeline-marker {
    background-color: var(--accent-gold);
}

.timeline-item.completed .timeline-marker {
    background-color: var(--primary-brand);
    border-color: var(--primary-brand);
}

.timeline-date {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-gold-dark);
    margin-bottom: 0.3rem;
    display: block;
}

.timeline-title {
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.95rem;
}

/* Interactive Map Hotspot layout */
.map-interactive-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-muted);
    background-color: var(--bg-sand);
}

.map-svg-container {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    position: relative;
}

.map-svg-element {
    width: 100%;
    height: 100%;
    display: block;
}

.map-hotspot {
    cursor: pointer;
    transition: fill var(--transition-fast), filter var(--transition-fast);
}

.map-hotspot:hover {
    filter: drop-shadow(0 0 8px rgba(194, 163, 120, 0.6));
}

.map-hotspot-pin {
    transition: transform var(--transition-fast);
    transform-origin: center;
}

.map-hotspot:hover .map-hotspot-pin {
    transform: scale(1.25);
}

.map-tooltip-card {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 320px;
    background-color: var(--white);
    border: 1px solid var(--accent-gold);
    border-radius: var(--border-radius);
    padding: 1.5rem 1.8rem;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: all var(--transition-normal);
    z-index: 50;
}

.map-tooltip-card.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.map-tooltip-title {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.map-tooltip-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

/* Donation Elements */
.donation-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.donation-tier-card {
    background-color: var(--white);
    border: 1px solid var(--border-muted);
    border-radius: var(--border-radius);
    padding: 2.2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.donation-tier-card:hover,
.donation-tier-card.active {
    border-color: var(--accent-gold);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(194, 163, 120, 0.05);
}

.donation-tier-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1.25rem;
    transition: transform var(--transition-normal);
}

.donation-tier-card:hover .donation-tier-icon {
    transform: scale(1.1);
}

.donation-tier-card.active {
    background-color: var(--bg-sage-light);
}

.donation-tier-element {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-gold-dark);
    margin-bottom: 0.5rem;
}

.donation-tier-amount {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.donation-tier-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Event List styling */
.event-item {
    display: grid;
    grid-template-columns: 180px 1fr auto;
    gap: 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-muted);
    align-items: center;
}

.event-date-box {
    background-color: var(--bg-sand);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-day {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 500;
    line-height: 1;
    color: var(--text-dark);
}

.event-month {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent-gold-dark);
}

.event-title {
    margin-bottom: 0.5rem;
}

.event-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    gap: 1.5rem;
}

/* Resources filtering & grid */
.resources-filter-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: none;
    border: 1px solid var(--border-muted);
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 30px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-brand);
    color: var(--white);
    border-color: var(--primary-brand);
}

.book-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 2rem;
    align-items: start;
}

.book-cover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
}

.book-title {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
}

.book-author {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-gold-dark);
    margin-bottom: 0.8rem;
}

/* Toast Notification Styling */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
}

.toast {
    background: rgba(28, 43, 51, 0.95);
    backdrop-filter: blur(12px);
    color: var(--white);
    border-left: 3px solid var(--accent-gold);
    padding: 1.25rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    margin-top: 1rem;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-message {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Failed submission: same shell, warning accent instead of gold. */
.toast.toast-error {
    border-left-color: #D9694F;
}

.toast-icon {
    flex-shrink: 0;
}

.toast.toast-error .toast-icon {
    fill: #E58067;
}

/* Submit buttons disable themselves while a submission is in flight. */
.btn[data-submitting="true"],
.newsletter-btn[data-submitting="true"] {
    opacity: 0.6;
    cursor: progress;
    pointer-events: none;
}

/* ==========================================================================
   Inline form validation (public/js/form-validation.js)
   ========================================================================== */

/* Message under a field. Hidden until the validator fills it, so an empty
   node never reserves space. */
.field-error {
    display: none;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #C0392B;
    margin-top: 0.4rem;
}

.field-error.is-visible {
    display: block;
}

/* A checkbox group's message sits below the whole grid. */
.checkbox-grid + .field-error,
[data-group-required] > .field-error {
    margin-top: 0.6rem;
}

/* Invalid state for the light-background forms. The footer newsletter sits on
   forest and is handled separately below - a light fill there would put white
   text on a near-white background. */
.form-control.is-invalid,
.form-input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: #C0392B;
    background-color: #FDF3F2;
}

.form-control.is-invalid:focus,
.form-input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
    border-color: #C0392B;
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
    outline: none;
}

/* ---- Footer newsletter -------------------------------------------------
   The input and button are one flex row and must stay that way, so the
   message is taken out of flow rather than wrapped onto a third line.
   `min-width: 0` lets the growing input shrink below its intrinsic size
   instead of pushing the button out of the row. */
.newsletter-form {
    position: relative;
}

.newsletter-input {
    min-width: 0;
}

.newsletter-form .field-error {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.45rem;
    color: #E8A9A0;
}

/* Tinted rather than filled, so white input text stays readable on forest. */
.newsletter-input.is-invalid {
    border-color: #E8A9A0;
    background-color: rgba(232, 169, 160, 0.12);
}

.newsletter-input.is-invalid:focus {
    border-color: #E8A9A0;
    background-color: rgba(232, 169, 160, 0.16);
    box-shadow: 0 0 0 3px rgba(232, 169, 160, 0.15);
    outline: none;
}

/* Off-screen honeypot field injected into every mail-backed form. */
.hi-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

/* ==========================================================================
   10. Scroll-driven and Hover Animations
   ========================================================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback / CSS native entry if supported */
@supports (animation-timeline: view()) {
    .scroll-driven-reveal {
        animation: reveal-on-scroll linear both;
        animation-timeline: view();
        animation-range: entry 10% cover 25%;
    }
}

@keyframes reveal-on-scroll {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   11. Media Queries (Mobile Responsive Design)
   ========================================================================== */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .donation-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .header-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .nav {
        position: fixed;
        top: var(--header-height);
        left: 100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-cream);
        flex-direction: column;
        align-items: flex-start;
        padding: 3rem 2.5rem;
        gap: 1.75rem;
        transition: left var(--transition-normal), visibility var(--transition-normal);
        overflow-y: auto;
        border-top: 1px solid var(--border-muted);
        visibility: hidden;
    }

    .nav.active {
        left: 0;
        visibility: visible;
    }

    /* Left align all links and dropdown containers */
    .nav-link,
    .nav-dropdown {
        width: 100%;
        text-align: left;
    }

    /* Mobile menu overrides to ensure text readability on light drawer */
    .header-dark:not(.header-scrolled) .nav-link {
        color: var(--text-dark);
    }

    .nav-btn-donate {
        align-self: flex-start;
        margin-top: 0.5rem;
        width: 100%;
        max-width: 200px;
        text-align: center;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-dropdown .dropdown-menu {
        min-width: auto;
        width: 100%;
        padding-left: 0;
        box-shadow: none;
        border: none;
        background-color: transparent;
        transform: none;
        transition: none;
    }

    .nav-dropdown:hover .dropdown-menu,
    .nav-dropdown.active .dropdown-menu {
        position: relative;
        top: 0;
        left: 0;
        opacity: 1;
        visibility: visible;
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .nav-dropdown:hover .dropdown-chevron,
    .nav-dropdown.active .dropdown-chevron {
        transform: rotate(180deg) !important;
    }

    .dropdown-item {
        display: flex !important;
        align-items: center;
        padding: 0.6rem 0;
    }

    .subpage-branch-icon {
        display: inline-block;
        width: 12px;
        height: 12px;
        margin-right: 6px;
        color: var(--text-muted);
        vertical-align: middle;
    }
}

@media (max-width: 768px) {
    .section {
        padding-top: 5rem;
        padding-bottom: 5rem;
    }

    .story-split {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .event-item {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .donation-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .donation-grid {
        grid-template-columns: 1fr;
        gap: 2rem
    }

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

/* Partners Logo Row */
.partners-logo-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2rem;
    align-items: center;
    justify-items: center;
    border-top: 1px solid var(--border-muted);
    padding-top: 4rem;
    margin-top: 3rem;
}

.partner-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    width: 100%;
    filter: grayscale(100%);
    opacity: 0.75;
    transition: all var(--transition-fast);
}

.partner-logo-item:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@media (max-width: 768px) {
    .partners-logo-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .partners-logo-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1.25rem;
    }
}

/* Utility Classes */
.mt-sm {
    margin-top: 1.5rem;
}

.mt-md {
    margin-top: 4rem;
}

.mt-lg {
    margin-top: 8rem;
}

.mt-xl {
    margin-top: 10rem;
}

.mb-sm {
    margin-bottom: 10px;
}

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

/* Section Colors & Headings */
.section-sand {
    background-color: var(--bg-sand);
}

.section-sage-light {
    background-color: var(--bg-sage-light);
}

.section-partners {
    background-color: var(--bg-sand);
    border-top: 1px solid var(--border-muted);
}

.section-header-center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.section-header-center-narrow {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.section-header-center-wide {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.flex-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

/* Timeline custom list styling */
.timeline-desc-list {
    list-style-type: none;
    padding-left: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

.timeline-desc-list li {
    margin-bottom: 0.35rem;
    display: flex;
    gap: 0.5rem;
}

.timeline-desc-list li span {
    color: var(--accent-gold);
    font-weight: 600;
}

/* Endorsements meta */
.endorsement-author-meta {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.trust-banner-home {
    background-color: var(--white);
    margin-top: 4rem;
}

/* Founder details */
.founder-signature-img {
    max-height: 380px;
    width: auto;
    margin: 0 auto;
    background-color: var(--bg-sand);
    padding: 3rem;
    border-radius: 50%;
    display: block;
}

.founder-quote-text {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.founder-name-text {
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 2rem;
}

.founder-title-text {
    font-weight: 400;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Partners details & list grid */
.partners-grid-intro {
    align-items: center;
    gap: 4rem;
    margin-bottom: 5rem;
}

.partners-intro-text {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
}

.partners-sublist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.partners-subheading {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.partners-list {
    list-style: none;
    padding-left: 0;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.partner-logo-item img {
    max-height: 80px;
    max-width: 140px;
    object-fit: contain;
}

.card-premium .btn {
    margin-top: 1.5rem;
}

/* Image alignment utility classes */
.img-align-left {
    object-position: left center;
}

.img-align-center {
    object-position: center center;
}

.img-align-right {
    object-position: right center;
}

/* Horizontal alignment utility classes for containers / layout block children */
.img-pos-left {
    display: block;
    margin-right: auto;
    margin-left: 0;
}

.img-pos-center {
    display: block;
    margin-right: auto;
    margin-left: auto;
}

.img-pos-right {
    display: block;
    margin-right: 0;
    margin-left: auto;
}

/* Stretch story columns and make image fit the full height */
.story-split-stretch {
    align-items: stretch;
}

.story-image-wrap-full {
    height: 100%;
}

.story-image-wrap-full img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* ==========================================================================
   Global Modal & Form Component Styles
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 43, 51, 0.45);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none; /* Flex when active */
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    animation: fadeIn 0.3s ease;
}

.modal-card {
    background-color: var(--white);
    border: 1px solid var(--border-dark);
    border-radius: var(--border-radius);
    box-shadow: 0 20px 50px rgba(28, 43, 51, 0.15);
    max-width: 540px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 2.5rem;
    animation: slideUp 0.3s ease;
}

.modal-close-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s ease;
    padding: 0.2rem;
    z-index: 10;
}

.modal-close-btn:hover {
    color: var(--primary-brand);
}

.modal-heading {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    color: var(--primary-brand);
    margin-bottom: 0.5rem;
}

.modal-subheading {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

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

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #D32F2F;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-dark);
    border-radius: calc(var(--border-radius) / 2);
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--text-dark);
    background-color: var(--white);
    transition: all 0.3s ease;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary-brand);
    box-shadow: 0 0 0 3px rgba(76, 104, 117, 0.1);
}

.form-input.invalid {
    border-color: #D32F2F;
    background-color: #FFEBEE;
}

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

.error-msg.visible {
    display: block;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-brand);
    cursor: pointer;
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.modal-loading-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    text-align: center;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(76, 104, 117, 0.1);
    border-top-color: var(--primary-brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.modal-success-view {
    text-align: center;
    padding: 1.5rem 0;
}

.success-icon-wrap {
    width: 80px;
    height: 80px;
    background-color: var(--bg-sage-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--bg-forest);
}

.modal-success-view h3 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--primary-brand);
    margin-bottom: 1rem;
}

.modal-success-view p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1199px) {
    .btn {
        padding: 0.85rem 1rem;
    }
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    .modal-card {
        padding: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-btns {
        align-items: center !important;
    }
    .hero-btns .btn {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
    }
}

@media (max-width: 767px) {
    .hero-btns {
        display: block;
    }
    .hero-home .hero-btns a {
        margin-bottom: 0px;
    }
    .hero-btns a {
        margin-bottom: 15px;
    }
    .approach-panel, .card-premium {
        padding: 2rem 2rem 3rem 2rem;
    }
    .book-card {
        grid-template-columns: 1fr;
    }
    .header {
        top: 10px;
    }
    .header.header-scrolled {
        top: 0px;
    }
    .logo-img {
        height: 55px;
    }
}