/* ============================================
   NGO Website - Shared Styles
   All common styles used across all pages
   ============================================ */

/* CSS Variables for Consistent Theming */
:root {
  --primary-color: #004aad;
  --primary-dark: #00327a;
  --primary-hover: #00337f;
  --secondary-color: #007BFF;
  --secondary-dark: #0056b3;
  --text-color: #333;
  --text-light: #fff;
  --bg-light: #f9f9f9;
  --bg-dark: #222;
  --border-color: #ddd;
  --nav-bg: #515151;
  --success-color: #28a745;
  --error-color: #dc3545;
  --transition: all 0.3s ease;
  /* Typography rhythm (single source) */
  --font-size-body: 1rem;
  --line-height-body: 1.65;
  --line-height-heading: 1.25;
  --space-paragraph: 0.75rem;
  --space-heading-after: 0.65em;
  --space-section-y: clamp(2.5rem, 5vw, 3.5rem);
}

/* Reset Styles */
* {
  margin: 0;
  padding: 0;
  list-style: none;
  text-decoration: none;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Body Styles */
body {
  font-family: 'Roboto', sans-serif;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  margin: 0;
  padding: 0;
  color: var(--text-color);
}

/* Readable body text — single spacing rhythm sitewide */
p {
  font-size: 20px;
  line-height: var(--line-height-body);
  margin-top: 0;
  margin-bottom: var(--space-paragraph);
  color: var(--text-color);
}

/* Avoid double gap when headings precede paragraphs (headings keep own margin) */
.section > h2 + p,
.banner-content > h1 + p {
  margin-top: 0;
}

h1, h2, h3, h4 {
  line-height: var(--line-height-heading);
  font-weight: 700;
  color: var(--text-color);
  margin-top: 0;
  margin-bottom: var(--space-heading-after);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.35rem); }
h4 { font-size: 1.1rem; }

/* Media: never overflow viewport; keep aspect ratio (Library mini-player excluded) */
img,
video:not(.video-player-element),
canvas,
svg {
  max-width: 100%;
  height: auto;
}

/* Library mini-player uses .video-player-element; keep controls unobstructed */
video:not(.video-player-element) {
  object-fit: contain;
  vertical-align: middle;
}

.section > p,
.section .container > p,
.banner-content > p,
.footer p {
  max-width: 42rem;
}

.section + .section {
  margin-top: 0;
}

/* Library photo grid: base image visible; overlay stacks above */
#photo-gallery .photo-wrapper img {
  opacity: 1;
  position: relative;
  z-index: 0;
}

#photo-gallery .photo-overlay {
  z-index: 1;
}

/* Section intros: align with heading rhythm */
.section .section-description {
  margin-top: 0;
  margin-bottom: var(--space-paragraph);
}

/* Partner / affiliate placeholders (Index) */
.partner-placeholder {
  display: inline-block;
  width: 150px;
  height: 80px;
  background: #f0f0f0;
  margin: 10px;
  border-radius: 4px;
}

/* Container */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

/* Header — 50/50 empowerment theme: white / light (left) → primary blue (right) */
.header {
  background: linear-gradient(
    90deg,
    #ffffff,
    #e6f0ff,
    #99c2ff,
    var(--primary-color),
    #00327a
  );
  background-size: 300% 300%;
  animation: gradientShift 12s ease-in-out infinite;

  color: var(--text-light);

  position: relative;
  z-index: 100;
  overflow: hidden;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Diagonal pattern only on the left header band: pure white → light tint (#f5f9ff), before the 50% blue split */
.header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255,255,255,0.4) 0%,
    rgba(255,255,255,0.15) 30%,
    rgba(0,114,255,0.1) 60%,
    rgba(0,50,122,0.2) 100%
  );
  pointer-events: none;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
  gap: 1rem;
  flex-wrap: nowrap;
  position: relative;
  z-index: 1;
}

.header .logo {
  font-size: 1.1rem;
  font-weight: bold;
  position: relative;
  flex-shrink: 0;
  align-self: center;
  white-space: nowrap;
  overflow: visible;
  margin: 0;
  padding: 0;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}

.header .logo img {
  display: block;
  height: clamp(40px, 8vw, 56px);
  width: auto;
  max-width: min(280px, 48vw);
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
}

/* Logo + site title — min 30px gap; title stays readable on animated light/dark header bands */
.header-brand {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  gap: clamp(30px, 3vw, 48px);
}

.header-site-title {
  margin: 0;
  padding: 0;
  font-size: clamp(0.8rem, 1.1vw + 0.55rem, 1.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  max-width: min(440px, 42vw);
  color: #0a1f3d;
  text-shadow:
    0 0 10px rgba(255, 255, 255, 1),
    0 0 20px rgba(255, 255, 255, 0.85),
    0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 6px rgba(255, 255, 255, 0.75);
  transition: font-size 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.35s ease;
}


/* Google Translate — lives in header, right of search (original compact control) */
.header-translate-slot {
  display: inline-flex;
  align-items: center;
  margin-left: 0.75rem;
  flex-shrink: 0;
  max-width: min(160px, 28vw);
  transform: scale(0.88);
  transform-origin: center right;
}

.header-translate-slot .skiptranslate,
.header-translate-slot select {
  font-size: 12px !important;
  max-width: 100%;
}

.goog-te-gadget {
  font-family: inherit !important;
}

.goog-te-gadget-simple {
  border: none !important;
  padding: 2px 4px !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

/* Language picker dropdown — fixed width, list flows downward, height capped to viewport */
.goog-te-menu-frame,
iframe.goog-te-menu-frame {
  width: min(700px, calc(100vw - 2rem)) !important;
  max-width: 700px !important;
  min-width: 240px !important;
  max-height: min(85vh, calc(100vh - 6rem)) !important;
  height: auto !important;
  box-sizing: border-box !important;
  z-index: 100002 !important;
}

.goog-te-menu2 {
  max-width: 700px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  max-height: min(85vh, calc(100vh - 6rem)) !important;
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 50%, rgba(0, 74, 173, 0.08) 100%) !important;
  border: 1px solid rgba(0, 74, 173, 0.2) !important;
  border-radius: 8px !important;
  box-sizing: border-box !important;
}

#goog-gt-tt,
.goog-tooltip,
.goog-te-balloon-frame {
  max-width: min(700px, calc(100vw - 2rem)) !important;
  max-height: min(85vh, calc(100vh - 6rem)) !important;
  overflow: auto !important;
  box-sizing: border-box !important;
}

/* Global toast notifications (7s + shrinking bar) */
#globalNotificationHost {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 2rem));
}

.global-notification {
  pointer-events: auto;
  background: #fff;
  color: var(--text-color);
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 74, 173, 0.2);
  overflow: hidden;
  opacity: 1;
  transition: opacity 0.28s ease;
  width: 100%;
}

.global-notification--error {
  border-color: rgba(220, 53, 69, 0.45);
}

.global-notification__inner {
  padding: 0.85rem 1rem 0;
}

.global-notification__text {
  font-size: 0.95rem;
  line-height: 1.45;
  padding-bottom: 0.65rem;
}

.global-notification__track {
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  margin: 0 -1rem;
  width: calc(100% + 2rem);
}

.global-notification__fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 0 0 0 2px;
}

.global-notification--error .global-notification__fill {
  background: linear-gradient(90deg, #c82333, #e4606d);
}

.global-notification--out {
  opacity: 0;
}


.header .nav {
  position: relative;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 1rem;
}

/* Navigation Bar — smooth size when Google Translate changes label lengths */
.navigation {
  display: flex;
  position: relative;
  width: 90%;
  max-width: 640px;
  margin: 0 auto;
  left: auto;
  background: var(--nav-bg);
  min-height: 40px;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: min-height 0.45s cubic-bezier(0.4, 0, 0.2, 1), width 0.4s ease;
}

.navigation .nav {
  width: 100%;
  transition: width 0.4s ease;
}

.navigation .nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0;
  position: relative;
  transition: gap 0.35s ease, row-gap 0.35s ease;
}

.nav ul {
  position: relative;
}

.navigation .nav ul li {
  margin: 0 0.5rem;
  transition: margin 0.35s ease, transform 0.3s ease;
}

.navigation .nav ul li a {
  color: var(--text-light);
  text-decoration: none;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease, border-radius 0.25s ease,
    max-width 0.4s ease, opacity 0.3s ease;
}

/* Non-link current page label (no self-navigation) */
.navigation .nav ul li span.nav-current-label {
  color: var(--text-light);
  padding: 0.5rem 1rem;
  font-weight: 500;
  display: inline-block;
  transition: padding 0.35s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.4s ease, opacity 0.3s ease;
}

.navigation .nav ul li a:hover {
  background: var(--primary-dark);
  border-radius: 5px;
}

/* Dropdown Menu */
.nav ul li.dropdown {
  position: relative;
}

.nav ul li .dropdown-menu {
  display: none;
  position: absolute;
  top: 30px;
  left: 0;
  min-width: 220px;
  width: max-content;
  max-width: min(320px, 92vw);
  background: var(--primary-color);
  border-radius: 5px;
  z-index: 10;
  box-sizing: border-box;
  transition: opacity 0.25s ease, min-width 0.35s ease, min-height 0.35s ease;
}

.nav ul li .dropdown-menu li {
  margin: 0;
}

.nav ul li .dropdown-menu li a {
  padding: 0.5rem 1rem;
  display: block;
  color: var(--text-light);
  white-space: nowrap;
  transition: var(--transition);
}

.nav ul li .dropdown-menu li a:hover {
  background: var(--primary-dark);
  color: var(--text-light);
}

.nav ul li:hover .dropdown-menu {
  display: block;
}

/* Header Icons */
.header .header-icons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
}

.header .header-icons button {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-light);
  cursor: pointer;
  transition: transform 0.2s;
}

.header .header-icons button:hover {
  transform: scale(1.1);
}

.header .header-icons button.translate-btn i {
  font-size: 30px;
}

.header .header-icons button.user-btn {
  font-size: 30px;
}

/* Search Bar */
.search-container {
  position: relative;
  width: 300px;
  margin: 0;
}

#search-input {
  width: 200px;
  padding: 0.5rem;
  font-size: 16px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: width 0.3s ease;
}

#search-input:focus {
  width: 300px;
  outline: none;
}

.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--border-color);
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  color: #222;
  display: none;
  border-top: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 8px 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.suggestions-list.show {
  display: block;
  opacity: 1;
}

.suggestions-list li {
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.suggestions-list li:last-child {
  border-bottom: none;
}

.suggestions-list li:hover {
  background-color: #f0f0f0;
}

.suggestions-list .result-title {
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.suggestions-list .result-type {
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  font-weight: 500;
}

.suggestions-list .result-source {
  font-size: 0.7rem;
  color: #999;
  font-style: italic;
}

.suggestions-list .search-result.site-wide {
  border-left: 3px solid var(--primary-color, #004aad);
}

.suggestions-list .search-result.page-content {
  border-left: 3px solid var(--secondary-color, #007BFF);
}

/* ============================================
   BANNER & SECTIONS
   ============================================ */

/* Banner Section */
.banner {
  position: relative;
  width: 100%;
  height: 60vh;
  background-image: url("../Resources/Images/mr-cup-fabien-barral-Mwuod2cm8g4-unsplash.jpg");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-light);
  overflow: hidden;
  padding-top: 100px;
  top: -43px;
}

.banner::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.banner-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
  animation: fadeIn 2s ease-in-out;
}

.banner-content h1,
.banner-content p {
  color: var(--text-light);
}

.banner-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.banner-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

/* General Section Styling */
.section {
  padding: var(--space-section-y) clamp(1rem, 4vw, 2rem);
  text-align: center;
  background: var(--bg-light);
  margin: 0;
  justify-content: center;
  display: grid;
}

.section h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--primary-color);
  margin-bottom: 1rem;
}

#partners.section{
  text-align: center;
  justify-content: center;
  display: grid;
}

/* ============================================
   NEWS & EVENTS CARDS
   ============================================ */

.news-container {
  display: flex;
  gap: 100px;
  flex-wrap: wrap;
  justify-content: center;
}

.news-item {
  perspective: 1000px;
  width: 300px;
}

.news-card {
  width: 350px;
  height: 430px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
}

.news-card:hover {
  transform: scale(1.1);
}

.news-front {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  background-color: var(--secondary-color);
  color: var(--text-light);
}

.news-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  background-color: var(--success-color);
  color: var(--text-light);
  transform: rotateY(180deg);
}

.news-photo {
  width: 100%;
  height: 250px;
  flex-shrink: 0;
  overflow: hidden;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
}

.news-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.news-card.flipped {
  transform: rotateY(180deg);
}

.news-front h3 {
  padding-top: 10px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: var(--text-light);
  padding: 0.75rem 1.75rem;
  font-size: var(--font-size-body);
  line-height: var(--line-height-body);
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 25px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  max-width: 100%;
}

.btn:hover {
  background: var(--primary-hover);
  transform: scale(1.1);
}

.btn-submit {
  background-color: var(--secondary-color);
  color: var(--text-light);
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  transition: var(--transition);
}

.btn-submit:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

/* ============================================
   FORMS
   ============================================ */

.form-center {
  margin-left: auto;
  margin-right: auto;
}

.form-center.form-max-520 {
  max-width: 520px;
  width: 100%;
}

.form-center.form-max-800 {
  max-width: 800px;
  width: 100%;
}

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

.form-group .form-label {
  font-weight: bold;
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 1rem;
  display: flex;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-size: 16px;
}

.form-group select {
  background-color: var(--text-light);
  color: var(--text-color);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}

/* Standard inline feedback (used by Donate.js and other forms) */
.success,
.error {
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  line-height: 1.4;
}

.success {
  color: var(--success-color);
  background-color: rgba(40, 167, 69, 0.12);
  border-left: 5px solid var(--success-color);
}

.error {
  color: var(--error-color);
  background-color: rgba(220, 53, 69, 0.12);
  border-left: 5px solid var(--error-color);
}

/* ============================================
   MODAL
   ============================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  margin: 15% auto;
  padding: 20px;
  border: 1px solid var(--border-color);
  width: 45%;
  background-color: var(--text-light);
  border-radius: 8px;
  position: relative;
}

.modal-content h2 {
  color: var(--primary-color);
}

.close {
  color: var(--text-muted, #999);
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close:hover,
.close:focus {
  color: var(--text-color);
  text-decoration: none;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  background: linear-gradient(135deg, #1a1a1a 0%, #222 100%);
  color: var(--text-light);
  padding: 3.5rem 0 1.5rem;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-bottom: 2.5rem;
  width: 100%;
}

.footer-contact,
.footer-links,
.footer-quick-links {
  text-align: left;
}

.footer h3 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  padding-bottom: 0.75rem;
}

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

.footer .contact-form,
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer .contact-form label,
.contact-form label {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: #ccc;
  font-weight: 500;
  position: static;
  right: auto;
}

.footer .contact-form input,
.footer .contact-form textarea,
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  margin-bottom: 0;
  border: 1px solid #444;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.footer .contact-form input:focus,
.footer .contact-form textarea:focus,
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}

.footer .contact-form input::placeholder,
.contact-form input::placeholder {
  color: #888;
}

.footer .contact-form .btn-primary,
.footer .contact-form button,
.contact-form button {
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  padding: 0.875rem 1.5rem;
  cursor: pointer;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  margin-top: 0.5rem;
}

.footer .contact-form .btn-primary:hover,
.footer .contact-form button:hover,
.contact-form button:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.3);
}

.footer-links ul {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  list-style: none;
  padding: 0;
}

.footer-links ul li,
.footer-quick-links ul li {
  margin: 0;
}

.footer-links ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 50%;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links ul li a i {
  font-size: 1.25rem;
}

.footer-links ul li a:hover {
  background: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.4);
  border-color: var(--primary-color);
}

.footer-quick-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-quick-links ul li a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
  position: relative;
  padding-left: 1.25rem;
}

.footer-quick-links ul li a::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.footer-quick-links ul li a:hover {
  color: var(--text-light);
  padding-left: 1.5rem;
}

.footer-quick-links ul li a:hover::before {
  transform: translateX(3px);
}

.footer-msg {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer p,
.footer .footer-msg p {
  margin: 0.5rem 0;
  color: #aaa;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* Undo global max-width centering issue for footer bottom copy */
.footer-msg p {
  max-width: none;
}

.footer .footer-msg p:first-child {
  color: #ccc;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.footer-msg a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-msg a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Footer Responsive Design */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-contact,
  .footer-links,
  .footer-quick-links {
    text-align: center;
  }
  
  .footer h3::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .footer-links ul {
    justify-content: center;
  }
  
  .footer-quick-links ul li a {
    padding-left: 0;
  }
  
  .footer-quick-links ul li a::before {
    display: none;
  }
}

/* ============================================
   SITEMAP
   ============================================ */

.sitemap-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.sitemap-column h3 {
  font-size: 1.3rem;
  color: var(--primary-color, #004aad);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color, #004aad);
}

.sitemap-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-column ul li {
  margin-bottom: 0.75rem;
}

.sitemap-column ul li a {
  color: #555;
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  display: inline-block;
  padding-left: 1.25rem;
  position: relative;
}

.sitemap-column ul li a::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-color, #004aad);
  transition: transform 0.3s ease;
}

.sitemap-column ul li a:hover {
  color: var(--primary-color, #004aad);
  padding-left: 1.5rem;
}

.sitemap-column ul li a:hover::before {
  transform: translateX(3px);
}

/* ============================================
   NAVIGATION — current page highlight
   ============================================ */

.navigation .nav li.nav-current > a,
.navigation .nav a[aria-current="page"] {
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

/* ============================================
   CALENDAR — grid readability (Calendar.php + Calendar.js)
   ============================================ */

.calendar-days-grid .calendar-day {
  border: 1px solid var(--border-color);
  box-sizing: border-box;
  min-height: 3rem;
  color: var(--text-color);
  background: var(--bg-light);
}

.calendar-day.other-month {
  opacity: 0.6;
}

.calendar-day .day-number {
  font-weight: 600;
  font-size: 0.95rem;
}

.calendar-status-msg {
  color: var(--text-color);
}

.calendar-status-msg--fullwidth {
  grid-column: 1 / -1;
  padding: var(--space-paragraph) 1rem;
}

/* ============================================
   LIBRARY VIDEO MINI PLAYER — 400px box, fluid width
   ============================================ */

.video-player-container.active .video-player-wrapper {
  width: min(100%, 560px);
  max-width: 100%;
  height: 400px;
  max-height: 400px;
  box-sizing: border-box;
}

.video-player-container.active .video-player-wrapper .video-player-element {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: unset;
  object-fit: contain;
}

/* ============================================
   UTILITIES
   ============================================ */

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--secondary-color);
  color: var(--text-light);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 999;
}

#backToTop:hover {
  background-color: var(--secondary-dark);
}

#backToTop .bTn {
  position: relative;
  top: 4px;
}

/* Unsubscribe Form (standardized across pages) — compact width */
.modal-content form[id^="unsubscribeForm"] {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.modal-content form[id^="unsubscribeForm"] label {
  font-size: 0.95rem;
  color: var(--text-color);
  font-weight: 500;
}

.modal-content form[id^="unsubscribeForm"] input[type="email"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  color: var(--text-color);
}

.modal-content form[id^="unsubscribeForm"] input[type="email"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 74, 173, 0.1);
}

.modal-content form[id^="unsubscribeForm"] button {
  width: 100%;
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary-color);
  color: var(--text-light);
  transition: var(--transition);
}

.modal-content form[id^="unsubscribeForm"] button:hover {
  background: var(--primary-dark);
}

#responseMessage,
#unsubscribeResponseMessage {
  display: none;
  margin-top: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  background: rgba(0, 74, 173, 0.08);
  color: var(--text-color);
  line-height: 1.45;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
