/* --- GLOBAL BRAND COLORS --- */

:root {
    --brand-primary: #00897B;
    /* TEAL GREEN (Logo, Nav, Icons) */
    --brand-primary-dark: #00695C;
    /* DARKER TEAL (Hover states) */
    --brand-primary-light: #4DB6AC;
    /* LIGHTER TEAL (Accents) */
    --brand-secondary: #006699;
    /* TEAL BLUE (Footers, backgrounds) */
    --brand-secondary-light: #3399CC;
    /* LIGHTER TEAL BLUE */
    --brand-accent: #E6529B;
    /* HOT PINK (Minimal accents) */
    --brand-accent-light: #F48FB1;
    /* LIGHT PINK */
    --brand-navy: #21498A;
    /* NAVY BLUE (Forms, buttons) */
    --brand-light-teal: #66B2AA;
    /* NEUTRAL TEAL */
    --brand-off-white: #e2e8f0;
    /* OFF-WHITE */
    --brand-light-gray: #f1f5f9;
    /* LIGHT GRAY */
    --brand-dark-gray: #334155;
    /* DARK GRAY */
}

/* 1. PRIMARY TEAL (#00897B) FOR ALL HEADINGS */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--brand-primary) !important;
}

/* 2. EXCEPTION: HEADINGS ON DARK BACKGROUNDS */
.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary h4,
.bg-secondary h1,
.bg-secondary h2,
.bg-secondary h3,
.bg-secondary h4,
.bg-dark-gray h1,
.bg-dark-gray h2,
.bg-dark-gray h3,
.bg-dark-gray h4,
[class*="bg-"][class*="gray"] h1,
[class*="bg-"][class*="gray"] h2,
[class*="bg-"][class*="gray"] h3,
[class*="bg-"][class*="gray"] h4,
[class*="bg-"][class*="navy"] h1,
[class*="bg-"][class*="navy"] h2,
[class*="bg-"][class*="navy"] h3,
[class*="bg-"][class*="navy"] h4 {
    color: white !important;
}

/* 3. NAVIGATION BAR TEXT ON WHITE BACKGROUND */
.navbar.bg-white .nav-link,
.navbar.bg-white #brand-name,
.navbar.bg-white #brand-slogan {
    color: var(--brand-primary) !important;
}

/* 4. NAVIGATION LINKS */
.nav-link {
    color: var(--brand-primary) !important;
    font-weight: 600;
}

.nav-link:hover {
    color: var(--brand-primary-dark) !important;
}

.nav-link.active {
    color: var(--brand-accent) !important;
}

/* 5. BUTTONS */
.bg-accent,
.btn-action {
    background-color: var(--brand-accent) !important;
}

.btn-submit,
.read-next-button {
    background-color: var(--brand-navy) !important;
}

/* 6. ENSURE NAVIGATION LINKS ARE ALWAYS TEAL */
#navbar .nav-link,
#navbar #brand-name,
#navbar #brand-slogan {
    color: #00897B !important;
}

.navbar.bg-white #navbar .nav-link,
.navbar.bg-white #navbar #brand-name,
.navbar.bg-white #navbar #brand-slogan {
    color: #00897B !important;
}

/* --- BEAUTIFUL FORM STYLING --- */

/* 1. The Container (The White Card) */
.beautiful-form-container {
    background-color: #ffffff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(33, 73, 138, 0.15);
    /* Navy Shadow */
    border: 1px solid #e2e8f0;
    max-width: 600px;
    margin: 0 auto;
    /* Center it */
}

/* 2. Headers */
.form-title {
    color: #21498A;
    /* Navy Brand */
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-align: center;
}

.form-subtitle {
    color: #64748b;
    /* Slate Grey */
    text-align: center;
    margin-bottom: 30px;
    font-size: 1rem;
}

/* 3. The Grid Layout */
.form-row {
    display: flex;
    gap: 20px;
    /* Space between First and Last Name */
}

/* --- SUBSCRIBE WIDGET --- */
.subscribe-widget {
    background-color: #21498A;
    color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

.subscribe-widget h3 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.25rem;
    font-weight: 700;
}

.subscribe-widget p {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.subscribe-widget input {
    width: 100%;
    padding: 12px;
    border-radius: 4px;
    border: none;
    margin-bottom: 10px;
    color: #333;
}

.subscribe-widget button,
.btn-action {
    display: inline-block;
    width: 100%;
    /* Full width for subscribe, maybe auto for btn-action? */
    background-color: var(--brand-accent);
    color: white;
    font-weight: 700;
    padding: 12px 35px;
    /* Unified padding */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.3s ease;
    letter-spacing: 1px;
}

.subscribe-widget button:hover,
.btn-action:hover {
    background-color: #C93480;
    transform: translateY(-2px);
}

.btn-action {
    width: auto;
    /* Allow button to size to content */
}

/* Read Next Story Button */
.read-next-button {
    background-color: #21498A;
    /* Navy Blue */
    color: white;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 6px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid #21498A;
}

.read-next-button:hover {
    background-color: white;
    color: #21498A;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(33, 73, 138, 0.2);
}

/* --- SIDEBAR WIDGETS --- */
.sidebar-widget {
    margin-bottom: 30px;
}

/* --- FOOTER LINKSFIX --- */
.story-footer-links {
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
}

.story-footer-links a {
    color: white;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.story-footer-links a:hover {
    border-color: #E6529D;
}

/* --- 1. TYPOGRAPHY FIXES --- */
.article-header h1,
.article-body h2,
.article-body h3,
.article-body p,
.article-body li {
    font-family: 'Montserrat', sans-serif !important;
}

.article-body p {
    font-weight: 400;
    /* Regular */
    line-height: 1.8;
    color: #333;
    font-size: 1.05rem;
}

/* --- CLEAN FORM LAYOUT --- */
.clean-form-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
    width: 100%;
}

.form-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    /* Soft Shadow */
    width: 100%;
    /* max-width removed here so it fills the column in your grid layout */
    padding: 40px 30px;
    border: 1px solid #eee;
}

.form-title {
    text-align: center;
    margin-bottom: 10px;
    color: #21498A;
    /* Navy Brand Color */
    font-size: 28px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.form-subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: #666;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
}

/* INPUTS & TEXTAREA */
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.3s;
    background-color: #FAFAFA;
    /* Slight grey background like Excel cells */
}

/* Focus State */
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #21498A;
    /* Navy Blue on Click */
    background-color: #fff;
}

/* GRID ROW (Side by Side Names) */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
    /* Makes them equal width */
}

/* BUTTON */
.btn-submit {
    background-color: #21498A;
    /* Navy Blue */
    color: white;
    border: none;
    border-radius: 4px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #E6529D;
    /* Hot Pink on Hover */
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        /* Stack names on small screens */
        gap: 0;
    }
}

/* --- 2. QUOTE REDESIGN --- */
.systems-insight {
    background: transparent !important;
    /* Remove blue bg */
    border: none !important;
    /* Remove border */
    position: relative;
    padding: 20px 40px;
    margin: 50px 0;
    text-align: center;
}

.systems-insight.borderless-card {
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin: 40px auto;
    max-width: 90%;
    border: 1px solid #e9ecef;
}

/* Light teal text for quote */
.systems-insight.light-teal-text p,
.systems-insight.light-teal-text::before,
.systems-insight.light-teal-text::after {
    color: #66B2AA !important;
}

.systems-insight p {
    font-size: 1.4rem;
    color: #21498A;
    /* Navy */
    font-style: italic;
    font-weight: 600;
    position: relative;
    z-index: 2;
    margin: 0;
}

/* The Big Quote Marks using Pseudo-elements */
.systems-insight::before {
    content: "\201C";
    font-family: 'Georgia', serif;
    /* Serif looks better for quotes */
    font-size: 6rem;
    color: #E6529D;
    /* Hot Pink */
    opacity: 0.3;
    position: absolute;
    top: -40px;
    left: 0;
    line-height: 1;
}

.systems-insight::after {
    content: "\201D";
    font-family: 'Georgia', serif;
    font-size: 6rem;
    color: #E6529D;
    opacity: 0.3;
    position: absolute;
    bottom: -60px;
    right: 0;
    line-height: 1;
}

/* Newsletter Style Columns */
.newsletter-columns {
    column-count: 2;
    column-gap: 40px;
    column-rule: 1px solid #e0e0e0;
    margin: 30px 0;
}

/* Responsive adjustment for mobile */
@media (max-width: 768px) {
    .newsletter-columns {
        column-count: 1;
        column-rule: none;
    }
}

.newsletter-columns p {
    break-inside: avoid;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.newsletter-columns h2 {
    break-after: avoid;
}

/* --- REFERENCES --- */
.article-references {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #888;
    font-family: sans-serif;
}

.article-references p {
    font-weight: 700;
    margin-bottom: 5px;
}

.article-references ol {
    padding-left: 20px;
    margin: 0;
}

/* --- 3. CTA CARD (OUTLINE STYLE) --- */
.article-bottom-cta,
.CTA-widget {
    max-width: 800px;
    margin: 80px auto 0;
    background-color: #ffffff !important;
    /* White BG */
    border: 2px solid #21498A;
    /* Navy Outline */
    border-radius: 12px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(33, 73, 138, 0.15);
}

/* --- MAP CONTAINER --- */
.impact-map-section {
    padding: 80px 0;
    background-color: #F9F9F9;
    /* Light grey background */
    text-align: center;
}

.map-header h2 {
    color: #21498A;
    /* Navy */
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.map-header p {
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

#impact-map {
    height: 600px;
    /* Tall, cinematic height */
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(33, 73, 138, 0.15);
    /* Navy shadow */
    border: 4px solid white;
    background-color: #aad3df;
    /* Fallback ocean color */
    z-index: 1;
}

/* --- CUSTOM PULSING PIN --- */
.rfw-pin {
    background-color: #21498A;
    /* Navy Core */
    border: 3px solid #E6529D;
    /* Hot Pink Border */
    width: 24px;
    height: 24px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 0 0 rgba(230, 82, 157, 0.7);
    animation: impact-pulse 2s infinite;
}

/* Pulse Animation */
@keyframes impact-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(230, 82, 157, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 20px rgba(230, 82, 157, 0);
        /* Pulse expands outward */
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(230, 82, 157, 0);
    }
}

/* --- TOOLTIP STYLING (Hover Text) --- */
.rfw-tooltip {
    background-color: #21498A;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Tiny arrow on tooltip */
.rfw-tooltip::before {
    border-top-color: #21498A;
}