/* ========================================================================
   TABLE OF CONTENTS
   1.  GLOBAL STYLES (body, typography, links)
   2.  HEADER & FOOTER
   3.  LAYOUT COMPONENTS (page container, grids)
   4.  REUSABLE COMPONENTS (cards, buttons, forms, helpers)
   5.  PAGE-SPECIFIC STYLES
   6.  MEDIA QUERIES (desktop & mobile layouts)
   ======================================================================== */

/* === 1. GLOBAL STYLES === */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #3f3f3f;
    line-height: 1.6;
}
h1, h2, h3 {
    color: #333;
    font-weight: 700;
}
h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-align: center;
}
h2 {
    font-size: 2.2em;
    border-bottom: 3px solid #E67E22;
    padding-bottom: 15px;
    margin-top: 40px;
    margin-bottom: 30px;
}
h3 {
    font-size: 1.5em;
    color: #E67E22;
}
a {
    color: #3498DB;
    text-decoration: none;
}
blockquote {
    font-style: italic;
    color: #333;
    margin: 20px 0;
    padding-left: 20px;
    border-left: 4px solid #eee;
}

/* === 2. HEADER & FOOTER === */
header {
    background-color: #222f5b;
    padding: 20px 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 100;
}
header .logo {
    height: 40px;
}
nav a, nav a:link, nav a:visited {
    margin: 0 15px;
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    transition: color 0.3s ease;
}
nav a:hover {
    color: #E67E22;
}
footer.site-footer {
    color: #ffffff;
    padding-top: 0;
    margin-top: 40px;
    border-top: none;
}
.footer-donate-banner {
    background-color: #E67E22;
    padding: 25px 20px;
    text-align: center;
    transition: background-color 0.3s ease;
}
.footer-donate-banner:hover {
    background-color: #D35400;
}
.footer-donate-banner a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
    display: block;
}
.footer-donate-banner a span {
    display: inline-block;
    border: 2px solid #ffffff;
    padding: 15px 35px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.footer-donate-banner a:hover span {
    background-color: #ffffff;
    color: #D35400;
}
.footer-main {
    background-color: #222f5b;
    padding: 50px 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}
.footer-column h4 {
    font-size: 1.2em;
    color: #ffffff;
    border-bottom: 2px solid #E67E22;
    padding-bottom: 10px;
    margin-bottom: 20px;
    margin-top: 0;
}
.footer-column ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
.footer-column ul li a:hover {
    color: #E67E22;
}
.footer-column a {
    color: #ffffff;
    transition: color 0.3s;
}
.social-icons a {
    margin-right: 15px;
    font-size: 1.8em;
    transition: all 0.3s ease;
}
.social-icons a:hover {
    transform: scale(1.1);
}
.subscribe-form {
    display: flex;
    margin-top: 15px;
}
.subscribe-form input {
    flex-grow: 1;
    border: none;
    padding: 12px;
    border-radius: 5px 0 0 5px;
    font-size: 1em;
}
.subscribe-form button {
    border: none;
    background-color: #E67E22;
    color: white;
    padding: 0 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 0 5px 5px 0;
}
.sub-footer {
    background-color: #1a2448;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: #aab8c2;
}
.sub-footer a {
    color: #aab8c2;
    margin: 0 10px;
}

/* === 3. LAYOUT COMPONENTS === */
.page-container {
    max-width: 1100px;
    margin: 40px auto;
    background-color: #ffffff;
    padding: 40px 50px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 30px;
}
.story-section {
    padding-left: 25px;
}

/* === 4. REUSABLE COMPONENTS === */
.card {
    background-color: #ffffff;
    border: 1px solid #eee;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #3f3f3f;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.card img {
    width: 100%;
    height: auto;
    display: block;
}
.card .card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card .card-content h3 {
    margin-top: 0;
}
.card .card-content p {
    flex-grow: 1;
}
.donate-button, .cta-button, .main-give-btn {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.donate-button {
    background-color: #E67E22;
    padding: 12px 22px;
}
.donate-button:hover {
    background-color: #D35400;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 118, 51, 0.4);
    color: #ffffff;
}
.cta-button {
    background-color: #3498DB;
    padding: 15px 30px;
    font-size: 1.1em;
    margin-top: 20px;
}
.cta-button:hover {
    background-color: #2980B9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}
.form-field {
    display: flex;
    flex-direction: column;
}
.form-field.full-width {
    grid-column: 1 / -1;
}
.form-field label {
    font-weight: bold;
    margin-bottom: 8px;
    color: #555;
}
.form-field input, .form-field select, .form-field textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
}
.form-field textarea {
    min-height: 120px;
    resize: vertical;
}
.is-hidden {
    display: none !important;
}

/* === 5. PAGE-SPECIFIC STYLES === */
.banner-rotator { margin: 50px 0; }
.video-banner { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.video-banner-content { flex: 1; }
.video-banner-embed { flex: 1.5; min-width: 300px; }
.video-embed-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; background: #000; border-radius: 10px; }
.video-embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
.event-banner { background-color: #f1f1f1; border: 1px solid #ddd; border-radius: 10px; padding: 25px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.event-banner-content { flex: 2; }
.event-banner-content .event-title { font-size: 1.2em; font-weight: bold; color: #555; margin: 0; }
.event-banner-content .event-mainline { font-size: 2.5em; font-weight: 700; color: #222f5b; margin: 5px 0; }
.event-banner-content .event-details { font-size: 1.2em; font-weight: bold; margin: 10px 0; }
.event-banner-image { flex: 1; min-width: 150px; }
.event-banner-image img { max-width: 100%; border-radius: 50%; }
.impact-story { background-color: #f8f9fa; padding: 50px 0; margin: 40px -50px; }
.impact-story-content { max-width: 800px; margin: 0 auto; text-align: center; padding: 0 20px; }
.impact-story-content .story-title { font-size: 1.2em; font-weight: bold; color: #E67E22; text-transform: uppercase; }
.impact-story-content h3 { border: none; }
.story-attribution { font-size: 1.1em; font-weight: bold; color: #555; }
.home-donate-cta { background-color: #222f5b; color: #ffffff; text-align: center; padding: 50px 20px; margin: 40px -50px -40px -50px; border-radius: 0 0 15px 15px; }
.home-donate-cta h2 { color: #ffffff; border-bottom: none; font-size: 2.5em; }
.home-donate-cta p { font-size: 1.2em; max-width: 700px; margin: 20px auto 30px auto; }
.donate-container .story-section { text-align: left; max-width: 700px; margin: 0 auto 40px auto; border-left: 4px solid #222f5b; font-size: 1.1em; line-height: 1.7; }
.donate-container .story-section h3 { font-size: 1.4em; margin-top: 0; border-bottom: none; }
.donate-container .story-section strong { color: #222f5b; }
.donation-method-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 50px; flex-wrap: wrap; }
.method-tab { flex-grow: 1; padding: 15px 10px; border: 1px solid #ddd; background-color: #f8f9fa; color: #555; font-size: 1em; font-weight: bold; cursor: pointer; border-radius: 8px; transition: all 0.3s ease; }
.method-tab.active, .method-tab:hover { background-color: #222f5b; color: white; border-color: #222f5b; transform: translateY(-3px); box-shadow: 0 4px 15px rgba(34, 47, 91, 0.4); }
.main-give-btn { background-color: #222f5b; padding: 20px 50px; font-size: 1.3em; margin-bottom: 70px; box-shadow: 0 4px 15px rgba(34, 47, 91, 0.4); }
.main-give-btn:hover { background-color: #E67E22; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(220, 118, 51, 0.5); }
.impact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 20px; }
.impact-box { background-color: #ffffff; border: 1px solid #eee; border-radius: 10px; padding: 25px 20px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: all 0.3s ease; cursor: pointer; }
.impact-box:hover { transform: translateY(-8px); box-shadow: 0 8px 30px rgba(0,0,0,0.1); border-color: #222f5b; }
.impact-box .amount { font-size: 2.5em; font-weight: bold; color: #222f5b; margin-bottom: 10px; }
.impact-box .description { font-size: 1em; color: #555; line-height: 1.4; }
.story-layout-flex { display: flex; align-items: flex-start; gap: 30px; }
.story-text-content { flex: 1; }
.program-logo { display: block; max-width: 150px; height: auto; border-radius: 10px; }
.bio-headshot { max-width: 200px; height: 200px; border-radius: 50%; object-fit: cover; margin: 0 auto 25px auto; display: block; }
.speaker-request-form { margin-top: 30px; }
.mobile-nav-toggle { display: none; background: transparent; border: none; cursor: pointer; padding: 10px; z-index: 1001; }
.mobile-nav-toggle .bar { display: block; width: 25px; height: 3px; background-color: #ffffff; margin: 5px 0; transition: all 0.3s ease-in-out; }
.nav-open .mobile-nav-toggle .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-open .mobile-nav-toggle .bar:nth-child(2) { opacity: 0; }
.nav-open .mobile-nav-toggle .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* === 6. MEDIA QUERIES === */
@media (max-width: 991px) {
    header nav { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: #222f5b; flex-direction: column; justify-content: center; align-items: center; z-index: 1000; }
    .nav-open header nav { display: flex; }
    header nav a, header nav a:link, header nav a:visited { font-size: 1.5em; margin: 15px 0; }
    header nav .donate-button { font-size: 1.2em; padding: 15px 30px; margin-top: 20px; }
    .mobile-nav-toggle { display: block; }
    .nav-open { overflow: hidden; }
}
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    .page-container { padding: 20px 20px; margin: 20px auto; }
    h1 { font-size: 2.2em; line-height: 1.2; }
    h2 { font-size: 1.8em; }
    .impact-story { margin: 20px -20px; padding: 40px 20px; }
    .impact-story-content .story-quote { font-size: 1.4em; }
    .home-donate-cta { margin: 20px -20px -20px -20px; padding: 40px 20px; border-radius: 0 0 15px 15px; }
    .home-donate-cta h2 { font-size: 2em; }
    .footer-main { padding: 40px 20px; }
    .story-layout-flex { flex-direction: column; align-items: center; text-align: center; }
}
@media (min-width: 992px) {
    .page-container .card-grid { grid-template-columns: 1fr 1fr; }
    .page-container .card-grid.speaker-grid { grid-template-columns: 1fr 1fr 1fr; }
}