/* ===
Base styles 
=== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    /* Smooth fade between light/dark themes */
    transition: background-color 0.35s ease, color 0.35s ease;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    line-height: 1.5;
    color: #111111;
    background-color: #f4f4f4;
    transition: background-color 0.35s ease, color 0.35s ease;
}

a {
    color: #140D6D;
    text-decoration: none;
}

a:hover,
a:focus {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    transition: filter 0.35s ease;
}

/* Layout */
.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background-color: #ffffff;
    color: #000000;
    padding: 8px 16px;
    z-index: 1000;
}

.skip-link:focus {
    left: 8px;
    top: 8px;
    outline: 2px solid #140D6D;
}

/* ===
Donation section
=== */
.donate-section {
  display: flex;
  justify-content: flex-end; /* Pushes the button to the far right */
  width: 100%;               /* Ensures the container takes up full width */
margin-right: 20px;
margin-bottom: 20px;
}

/* ===
PayPal Button
=== */
.paypal-button {
  display: inline-block;
  text-decoration: none;
  outline: none;
  line-height: 0;
  cursor: pointer;
}

.paypal-button:hover,
.paypal-button:focus,
.paypal-button:active {
  text-decoration: none;
  outline: none;
}

.paypal-button img {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: pointer;
}

/* Header & navigation */
.site-header {
    background-color: #140D6D;
    color: #ffffff;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-square {
    width: 200px;
    height: auto;
    border-radius: 8px;
    background-color: #ffffff;
    color: #140D6D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.main-nav a {
    color: #ffffff;
    font-weight: 600;
}

.main-nav a:focus,
.main-nav a:hover {
    text-decoration: underline;
}

/* Search button */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-button {
    
    border: 1px solid #ffffff;
    background: transparent;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
}

.search-button:focus {
    outline: 2px solid #ffffff;
}

/* MOBILE MENU */
.mobile-menu-btn,
#mobile-menu-button {
    display: none;
    border: 1px solid #ffffff;
    background: transparent;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
}

.mobile-menu-btn:focus,
#mobile-menu-button:focus {
    outline: 2px solid #ffffff;
}

@media (max-width: 768px) {
    .mobile-menu-btn,
    #mobile-menu-button {
        display: inline-block;
    }

    .main-nav {
        display: none !important;
    }
}

/* Backdrop */
#mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: none;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
    z-index: 9999;
}

#mobile-menu-backdrop[hidden] {
    display: none;
}

/* Dialog panel */
/* Dialog panel */
#mobile-menu-dialog {
    background: #ffffff;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    padding: 20px;
    outline: none;

    /* FIX: make the dialog itself scroll on small screens */
    max-height: calc(100vh - 120px); /* 80px top padding + a little breathing room */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Close button */
#mobile-menu-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    float: right;
    cursor: pointer;
    color: #140D6D;
}

#mobile-menu-close:focus {
    outline: 2px solid #140D6D;
}

/* Menu list */
.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.mobile-menu-nav a {
    display: block;
    padding: 14px 0;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid #dddddd;
    color: #140D6D;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a:focus {
    background: #f0f0ff;
    text-decoration: none;
}

/* SEARCH DIALOG */
.search-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1500;
}

.search-dialog {
    background-color: #ffffff;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    border-radius: 8px;
}

/* Freeze page scrolling whenever the backdrop is active */
body:has(#mobile-menu-backdrop:not([hidden])) {
    overflow: hidden;
    touch-action: none; /* Prevents mobile pull-to-refresh and swipe scrolling */
}

/* Freeze page scrolling whenever the search dialog is active */
body:has(.search-dialog-backdrop:not([hidden])):has(.search-dialog-backdrop[style*="display: flex"]),
body:has(.search-dialog-backdrop:not([style*="display: none"]):not([hidden])) {
    overflow: hidden;
    touch-action: none;
}

/* Content layout */
.page-section {
    max-width: 1100px;
    margin: 24px auto;
    padding: 0 16px 24px 16px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: background-color 0.35s ease, color 0.35s ease;
}
.page-section h1 {
    margin-top: 0;
    padding-top: 16px;
}

/* Card layout */
.item-list {
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 20px;
}

.item {
    border-top: 1px solid #dddddd;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 10px;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.item-title a,
.item-image a {
    text-decoration: none !important;
}

.item-layout {
    gap: 20px !important;
}

.item-image img {
    border-radius: 6px;
}

.item-summary,
.item-meta {
    margin-bottom: 12px !important;
}

/* Focus visible */
:focus-visible {
    outline: 3px solid #ff9900 !important;
    outline-offset: 4px !important;
    border-radius: 6px;
}

/* BLOG matching */
.page-section ul.item-list .read-more {
    padding: 8px 14px;
    font-size: 18px;
}

/* SEARCH results matching */
.search-results .item {
    border-radius: 10px;
    padding: 20px !important;
}
/* =========================
   Resources Page
   ========================= */

/* Layout */
.resource-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: flex-end;
}

.resource-filters label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    font-size: 0.95rem;
}

.resource-filters input,
.resource-filters select {
    padding: 0.5rem;
    font-size: 1rem;
    border-radius: 6px;
    border: 1px solid #999;
    background-color: white;
}

.resource-filters button {
    padding: 0.55rem 1rem;
    background-color: white;
border-radius: 6px;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.resource-filters button:focus,
.resource-filters input:focus,
.resource-filters select:focus {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Resource list */
.resource-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.resource-item {
    padding: 1.25rem;
        border-top: 1px solid #dddddd;
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 10px;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: background-color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.resource-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.resource-item p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.resource-item a {
    color: #333365;
    font-weight: 600;
}

.resource-item a:focus {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #999;
    text-decoration: none;
    background: #fff;
    color: #000;
}

.pagination a.active {
    background: #5a4db2;
    color: #fff;
    border-color: #5a4db2;
}

.pagination a:focus {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* ============================================================
   Calendar (Month View Layout Fixes) — add to END of stylesheet
   ============================================================ */

.calendar-wrap {
    width: 75%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Ensure lists/cards align cleanly inside the centered container */
.calendar-wrap .item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.calendar-wrap .item {
    margin: 0 0 12px;
}

.calendar-wrap .calendar-item {
    width: 100%;
}

/* Keep the bar and bottom nav inside the same centered width */
.calendar-wrap .cal-bar,
.calendar-wrap .cal-bottom-nav {
    width: 100%;
}

/* Mobile: full width */
@media (max-width: 768px) {
    .calendar-wrap {
        width: 100%;
        max-width: 100%;
    }
}


/* Base styles for the More Info section */
.more-info-section {
    background-color: #1a1a1a; /* Dark background for dark mode */
    padding: 1rem;
    color: #ffffff; /* Default text color for dark mode */
}

.more-info-section .more-info-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;           /* Horizontal by default for desktop */
    flex-direction: row;     /* Ensure horizontal layout */
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.more-info-section .more-info-nav li h4 {
    margin: 0;
    font-size: 1rem;
    color: #ffffff; /* Ensure heading is visible in dark mode */
}

.more-info-section .more-info-nav li a {
    text-decoration: none;
    color: #ffffff; /* Default link color for dark mode */
    padding: 0.25rem 0.5rem;
    transition: color 0.3s ease;
}

.more-info-section .more-info-nav li a:hover,
.more-info-section .more-info-nav li a:focus {
    color: #00bfff; /* Accent color on hover/focus */
    outline: 2px solid #00bfff; /* Accessibility focus outline */
    outline-offset: 2px;
}

/* Mobile/Small Screen: Vertical navigation */
@media (max-width: 768px) {
    .more-info-section .more-info-nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .more-info-section .more-info-nav li {
        margin-bottom: 0.5rem;
    }
    .more-info-section .more-info-nav ul {
list-style-type: none;
}
}

.home-video-wrap {
  width: 75%;
  margin-left: auto;
  margin-right: auto;
}

.home-video {
  width: 100%;
  height: auto;
  display: block;
}
.card-video-wrap {
    width: 75%;
    margin: 0 auto;
}

.card-video {
    width: 100%;
    height: auto;
    display: block;
}

/* ===
Base styles for the Social Section 
=== */
/* Container setup for horizontal layout */
.social-follow {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px; /* Adjust spacing between icons here */
}

/* Base link reset & positioning setup */
.social-link {
  display: inline-block;
  text-decoration: none;
  outline: none;
  line-height: 0;
  cursor: pointer;
}

.social-link:hover,
.social-link:focus,
.social-link:active {
  text-decoration: none;
  outline: none;
}

/* Image behavior & pointer configuration */
.social-link img {
  display: block;
  max-width: 100%;
  height: auto;
  cursor: pointer;
}
