/* --- AMAZING UI ENHANCEMENTS (2025) --- */

/* 1. Animated Background Blobs for .badges-container */
.badges-container {
  position: relative;
  overflow: hidden;
}
.badges-container::before, .badges-container::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  z-index: 0;
  opacity: 0.18;
  pointer-events: none;
  animation: floatBlob 12s ease-in-out infinite alternate;
}
.badges-container::before {
  width: 420px;
  height: 420px;
  background: var(--primary-color);
  left: -120px;
  top: -120px;
  animation-delay: 0s;
}
.badges-container::after {
  width: 320px;
  height: 320px;
  background: var(--accent-color);
  right: -100px;
  bottom: -100px;
  animation-delay: 3s;
}
@keyframes floatBlob {
  0% { transform: scale(1) translateY(0) rotate(0deg); }
  50% { transform: scale(1.08) translateY(30px) rotate(12deg); }
  100% { transform: scale(0.95) translateY(-20px) rotate(-8deg); }
}

/* 2. Glassmorphism for .badge-display-card and .badge-progress-item */
.badge-display-card, .badge-progress-item {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px) saturate(120%);
  box-shadow: 0 8px 32px 0 rgba(0,95,115,0.10), 0 1.5px 8px 0 rgba(255,179,71,0.08);
  border: 1.5px solid rgba(0,95,115,0.10);
}

/* 3. Glow/Highlight for Earned Badges */
.badge-progress-item.earned {
  box-shadow: 0 0 0 4px #ffb70344, 0 8px 32px 0 rgba(0,95,115,0.10);
  border: 2.5px solid var(--accent-color);
  position: relative;
}
.badge-progress-item.earned::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%,-50%);
  border-radius: 50%;
  box-shadow: 0 0 32px 12px #ffb70333;
  z-index: 0;
  pointer-events: none;
  animation: badgeGlow 2.5s infinite alternate;
}
@keyframes badgeGlow {
  0% { box-shadow: 0 0 32px 12px #ffb70333; }
  100% { box-shadow: 0 0 48px 20px #ffb70355; }
}

/* 4. Decorative Divider (Wavy SVG) */
.decorative-divider {
  width: 100%;
  height: 48px;
  background: none;
  display: block;
  margin: 40px 0 30px 0;
  border: none;
  padding: 0;
}

/* 5. Micro-Interactions for Buttons and Cards */
.btn:active {
  transform: scale(0.97) translateY(1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}
.badge-progress-item:active {
  transform: scale(0.98) translateY(2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}
.badge-display-card:active {
  transform: scale(0.99) translateY(2px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

/* 6. Profile Avatar Ring Animation */
.profile-picture {
  border: 4px solid var(--accent-color);
  box-shadow: 0 0 0 0 var(--accent-color);
  animation: avatarPulse 2.5s infinite cubic-bezier(.4,0,.2,1);
}
@keyframes avatarPulse {
  0% { box-shadow: 0 0 0 0 var(--accent-color); }
  70% { box-shadow: 0 0 0 16px #ffb70322; }
  100% { box-shadow: 0 0 0 0 var(--accent-color); }
}

/* 7. Confetti Animation (for celebration moments) */
.confetti {
  pointer-events: none;
  position: fixed;
  left: 0; top: 0; width: 100vw; height: 100vh;
  z-index: 3000;
  overflow: hidden;
}
.confetti-piece {
  position: absolute;
  width: 12px; height: 12px;
  border-radius: 50%;
  opacity: 0.7;
  animation: confetti-fall 2.5s linear infinite;
}
@keyframes confetti-fall {
  0% { transform: translateY(-40px) scale(1); }
  100% { transform: translateY(100vh) scale(0.7); }
}

/* 8. Section Fade-in Animation */
.amazing-fadein {
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInAmazing 1.2s cubic-bezier(.4,2,.6,1) forwards;
}
@keyframes fadeInAmazing {
  to { opacity: 1; transform: none; }
}

/* --- END AMAZING UI ENHANCEMENTS --- */
/* --- Global Variables (from Brand Guidelines) --- */
:root {
  --primary-color: #005f73; /* Midnight Green */
  --accent-color: #ffb703; /* Golden Yellow */
  --light-bg: #ffefc8; /* Dutch White */
  --text-color: #343a40;
  --white-color: #ffffff;
  --gray-bg: #f8f9fa;

  --font-headline: "Nourd", "Arial", sans-serif;
  --font-body: "Inter", "Verdana", sans-serif;

  --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
}

/* --- Basic Reset & Body --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--white-color);
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Header & Navigation --- */
.main-header {
  background: var(--white-color);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}
.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  height: 60px;
}
.logo-link {
  display: inline-block;
}
.main-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 25px;
}
.main-nav a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
  position: relative;
  padding: 5px 0;
  border-radius: 50px;
  
}
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-color);
  transition: width 0.3s ease;

}
.main-nav a:not(.btn):hover::after {
  width: 100%;
}
.menu-toggle {
  display: none;
}

/* --- Buttons (REVISED FOR MODERN UI) --- */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease-in-out;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}
.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
}
.btn-primary {
  background-image: linear-gradient(
    to right,
    var(--accent-color) 0%,
    #ffc947 51%,
    var(--accent-color) 100%
  );
  background-size: 200% auto;
  color: var(--primary-color);
  font-weight: bold;
}
.btn-primary:hover {
  background-position: right center;
}
.btn-secondary {
  background-color: transparent;
  border-color: var(--white-color);
  color: var(--white-color);
}
.btn-secondary:hover {
  background-color: var(--white-color);
  color: var(--primary-color);
}
.main-nav .btn-secondary {
  border-color: var(--primary-color);
  color: var(--primary-color);
}
.main-nav .btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white-color);
}
.btn-large {
  padding: 15px 40px;
  font-size: 1.1rem;
}

/* --- Hero Section --- */
.hero-section {
  position: relative;
  text-align: center;
  color: var(--white-color);
  padding: 120px 50px;
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 95, 115, 0.75);
}
.hero-content {
  position: relative;
  z-index: 2;
}
.hero-content h1 {
  color: var(--white-color);
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-family: var(--font-headline);
}
.hero-content p {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.9;
}

/* --- General Sections & Titles --- */
section {
  padding: 80px 0;
}
.section-title {
  text-align: center;
  font-size: 2.8rem;
  font-family: var(--font-headline);
  color: var(--primary-color);
  margin-bottom: 50px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}
.feature-item {
  text-align: center;
  padding: 30px;
  background: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}
.feature-item i {
  color: var(--accent-color);
  margin-bottom: 20px;
}
.feature-item h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

/* --- Footer --- */
.main-footer {
  background: var(--primary-color);
  color: var(--light-bg);
  padding-top: 60px;
}
.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding-bottom: 40px;
}
.footer-section h3 {
  color: var(--white-color);
  margin-bottom: 20px;
  font-family: var(--font-headline);
}
.footer-section p,
.footer-section a {
  color: var(--light-bg);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}
.footer-section a:hover {
  opacity: 1;
}
.social-icons a {
  margin-right: 15px;
  font-size: 1.2rem;
}
.footer-bottom {
  text-align: center;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Authentication Forms --- */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  padding: 40px 0;
}
.auth-form-wrapper {
  background: var(--white-color);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 450px;
  text-align: center;
}
.auth-form-wrapper h2 {
  margin-bottom: 30px;
  font-family: var(--font-headline);
  color: var(--primary-color);
}
.form-group {
  margin-bottom: 20px;
  text-align: left;
}
.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--primary-color);
}
.form-group input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: var(--font-body);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.25);
}
.auth-form-wrapper .btn {
  width: 100%;
  padding: 15px;
  font-size: 1.1rem;
  margin-top: 10px;
}
.auth-switch-link {
  margin-top: 25px;
  color: var(--text-color);
}
.auth-switch-link a {
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
}
.error-message {
  background-color: #f8d7da;
  color: #721c24;
  padding: 10px;
  border: 1px solid #f5c6cb;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  text-align: left;
}
.error-message ul {
  list-style-position: inside;
}
.google-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px;
  background-color: #4285f4;
  color: white;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}
.google-login-btn:hover {
  background-color: #357ae8;
}
.google-login-btn img {
  background: white;
  border-radius: 50%;
  padding: 2px;
  height: 24px;
  width: 24px;
  margin-right: 15px;
}
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 25px 0;
  color: #aaa;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ccc;
}
.divider:not(:empty)::before {
  margin-right: 0.5em;
}
.divider:not(:empty)::after {
  margin-left: 0.5em;
}

/* --- Animation Classes --- */
.animate-on-load,
.animate-on-scroll {
  opacity: 0;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-load {
  transform: translateY(30px);
}
.animate-on-scroll {
  transform: translateY(50px);
}
.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Admin Panel Styles --- */
body.admin-page {
  display: flex;
  background: #f4f7f6;
}
.admin-sidebar {
  width: 250px;
  background: linear-gradient(180deg, var(--primary-color) 0%, #00424f 100%);
  color: var(--white-color);
  padding: 20px;
  height: 100vh;
  position: fixed;
}
.admin-sidebar .logo {
  padding: 40px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.admin-sidebar .logo img {
  height: 40px;
  border-radius: 8px;
}

.admin-nav ul {
  list-style: none;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.admin-nav li a {
  display: block;
  padding: 15px 20px;
  color: #e0f2f1;
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: background 0.3s ease;
}
.admin-nav li.active a,
.admin-nav li a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white-color);
}
.admin-main-content {
  margin-left: 250px;
  width: calc(100% - 250px);
  padding: 40px;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}
.admin-header h1 {
  font-size: 2.5rem;
}
.admin-card {
  background: var(--white-color);
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}
.question-list table {
  width: 100%;
  border-collapse: collapse;
}
.question-list th,
.question-list td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.question-list th {
  background-color: #f8f9fa;
  font-weight: 600;
}
.admin-card .btn {
  padding: 10px 20px;
  font-size: 1rem;
}

/* --- Admin Action Button Styles (REVISED) --- */
.action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}
.action-buttons form {
  margin: 0;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: white;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.btn-action:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}
.btn-action i {
  font-size: 0.9em;
}
.btn-edit {
  background-image: linear-gradient(to right, #ffc107 0%, #ffdb4d 100%);
  color: #333;
}
.btn-delete {
  background-image: linear-gradient(to right, #dc3545 0%, #f75c6b 100%);
  color: white;
}

/* --- Entry Test Quiz UI Styles (FINAL FIX) --- */
.quiz-body {
  background: linear-gradient(45deg, var(--primary-color), #007991);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}
.quiz-container {
  background-color: var(--white-color);
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 800px;
  overflow: hidden;
}
.quiz-header {
  padding: 30px;
  background-color: #f7f7f7;
  border-bottom: 1px solid #e0e0e0;
}
.quiz-header h2 {
  margin: 0;
  color: var(--text-color); /* UI FIX: Explicitly set text color */
}
.quiz-main {
  padding: 30px;
}
#question-text {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 30px;
  color: var(--text-color); /* UI FIX: Explicitly set text color */
}
.answer-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.answer-options button {
  width: 100%;
  text-align: left;
  background-color: #f8f9fa;
  border: 2px solid #e0e0e0;
  padding: 15px;
  font-size: 1rem;
  font-family: var(--font-body);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-color); /* UI FIX: Explicitly set text color */
}
.answer-options button:hover:not([disabled]) {
  background-color: var(--light-bg);
  border-color: var(--accent-color);
}
.answer-options button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.3);
}
.answer-options button.selected {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--primary-color);
  font-weight: bold;
}
.answer-options button.correct {
  background-color: #28a745;
  border-color: #28a745;
  color: white;
}
.answer-options button.incorrect {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}
.quiz-footer {
  padding: 30px;
  text-align: right;
  border-top: 1px solid #e0e0e0;
}
#results-container {
  padding: 50px 30px;
  text-align: center;
}
#results-container h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
}
#results-container p {
  font-size: 1.2rem;
  margin: 20px 0;
}
#score-text {
  font-size: 3rem;
  font-weight: bold;
  color: var(--accent-color);
}

/* --- Final Quiz Fix --- */
.quiz-footer .btn {
  font-weight: bold;
  color: var(--primary-color);
}

/* --- Volunteer Dashboard Styles --- */
.dashboard-container {
  padding: 40px 20px;
  background-color: var(--gray-bg);
}

.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-header h1 {
  font-family: var(--font-headline);
  font-size: 2.5rem;
  color: var(--primary-color);
}
.dashboard-header p {
  font-size: 1.1rem;
  color: #6c757d;
}

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

.dashboard-card {
  background: var(--white-color);
  padding: 25px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
  transition: all 0.3s ease;
}
.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-weight: 500;
  color: #6c757d;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card-main-content {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}
.cadre-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 50px;
  color: white;
  font-size: 1.5rem; /* Made the badge text larger */
}

/* Progress Bar Styles */
.progress-card-content p {
  margin-bottom: 10px;
  font-size: 0.9rem;
}
.progress-bar-container {
  width: 100%;
  height: 20px;
  background-color: #e9ecef;
  border-radius: 50px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background-image: linear-gradient(45deg, var(--accent-color), #ffcc33);
  border-radius: 50px;
  text-align: center;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 0.8rem;
  line-height: 20px;
  transition: width 0.5s ease-in-out;
}
.next-level-text {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6c757d;
}
.next-level-text strong {
  color: var(--primary-color);
}

/* --- Volunteer Opportunities Page Styles --- */
.opportunities-container {
  padding: 60px 20px;
  background-color: var(--gray-bg);
}

.opportunity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.opportunity-card {
  background: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.3s ease;
}
.opportunity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.opportunity-card-header {
  padding: 25px;
}
.opportunity-card-header h3 {
  font-family: var(--font-headline);
  color: var(--primary-color);
  font-size: 1.4rem;
  margin: 0;
}
.opportunity-card-meta {
  padding: 0 25px 25px;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: #6c757d;
  font-size: 0.9rem;
}
.opportunity-card-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.opportunity-card-footer {
  margin-top: auto; /* Pushes the footer to the bottom */
  padding: 20px 25px;
  border-top: 1px solid #e9ecef;
}
.opportunity-card-footer .btn {
  width: 100%;
}

/* Detail Page Styles */
.opportunity-detail-card {
  background: var(--white-color);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
}
.opportunity-detail-card h2 {
  font-size: 2.5rem;
}
.opportunity-detail-card .meta-info {
  display: flex;
  gap: 20px;
  margin: 20px 0;
  color: #6c757d;
}
.opportunity-detail-card .section-title {
  text-align: left;
  font-size: 1.5rem;
  margin-top: 30px;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 5px;
  display: inline-block;
}
.opportunity-detail-card p {
  line-height: 1.8;
}

/* --- Modern Admin Table Styles --- */
.table-responsive {
  overflow-x: auto; /* Ensures table is responsive on small screens */
}
.modern-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.modern-table thead th {
  background-color: #f8f9fa;
  color: var(--primary-color);
  font-weight: 600;
  text-align: left;
  padding: 15px;
}
.modern-table tbody td {
  padding: 15px;
  border-bottom: 1px solid #e9ecef;
  color: #495057;
  vertical-align: middle;
}
.modern-table tbody tr:last-child td {
  border-bottom: none;
}
.modern-table tbody tr:hover {
  background-color: #f1f1f1;
}

/* --- Status Badge Styles --- */
.status-badge {
  padding: 5px 12px;
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.85rem;
}
.status-badge.status-open {
  background-color: #d4edda;
  color: #155724;
}
.status-badge.status-closed {
  background-color: #f8d7da;
  color: #721c24;
}

/* --- Application Management Styles --- */
.status-badge.status-approved {
  background-color: #d4edda;
  color: #155724;
}
.status-badge.status-pending {
  background-color: #fff3cd;
  color: #856404;
}
.status-badge.status-rejected {
  background-color: #f8d7da;
  color: #721c24;
}

/* Volunteer's "My Applications" Card Style */
.application-card {
  background: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
  padding: 25px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* For mobile responsiveness */
  gap: 15px;
}
.application-card-info h3 {
  font-family: var(--font-headline);
  color: var(--primary-color);
  font-size: 1.3rem;
  margin: 0 0 10px 0;
}
.application-card-info p {
  color: #6c757d;
  margin: 0;
}

/* --- Profile & Submission Page Styles --- */
.profile-container,
.submission-container {
  padding: 60px 20px;
  background-color: var(--gray-bg);
}

.profile-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
}

.profile-sidebar .dashboard-card,
.profile-main .dashboard-card {
  padding: 30px;
}

.profile-picture-wrapper {
  text-align: center;
}
.profile-picture {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  margin-bottom: 20px;
}
.profile-sidebar h3 {
  margin-bottom: 20px;
  text-align: center;
}

/* --- Search & Pagination Styles --- */
.admin-toolbar {
  display: flex;
  justify-content: flex-end; /* Pushes search bar to the right */
  margin-bottom: 20px;
}
.search-form {
  width: 100%;
  max-width: 350px;
}
.search-form input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 50px;
  font-size: 1rem;
}
.search-form input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 183, 3, 0.25);
}

.pagination {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.pagination a {
  text-decoration: none;
  color: var(--primary-color);
  padding: 8px 15px;
  border-radius: 6px;
  transition: all 0.2s ease;
}
.pagination a:hover {
  background-color: var(--light-bg);
}
.pagination a.active {
  background-color: var(--primary-color);
  color: white;
  font-weight: bold;
}

/* --- News & Blog Styles --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.news-card {
  background: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}
.news-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.news-card-content {
  padding: 25px;
}
.news-card-content h3 {
  font-family: var(--font-headline);
  color: var(--primary-color);
  font-size: 1.4rem;
  margin: 0 0 10px 0;
}
.news-card-meta {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 15px;
}
.news-card-excerpt {
  margin-bottom: 20px;
}
.news-card-footer a {
  text-decoration: none;
  font-weight: bold;
  color: var(--primary-color);
}

/* Single Post Page */
.post-container {
  padding: 60px 0;
  max-width: 800px;
  margin: auto;
}
.post-container h1 {
  font-size: 3rem;
}
.post-meta {
  margin: 20px 0;
  color: #6c757d;
}
.post-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

/* --- Cadre System Page Styles --- */
.cadre-timeline {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0;
}
.cadre-timeline::after {
  content: "";
  position: absolute;
  width: 6px;
  background-image: linear-gradient(
    to bottom,
    var(--accent-color),
    var(--primary-color)
  );
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  border-radius: 6px;
}
.cadre-container {
  padding: 10px 40px;
  position: relative;
  width: 50%;
}
.cadre-container.left {
  left: 0;
}
.cadre-container.right {
  left: 50%;
}
.cadre-container::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 25px;
  right: -17px;
  background-color: white;
  border: 4px solid var(--accent-color);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}
.cadre-container.right::after {
  left: -14px;
}
.cadre-content {
  padding: 20px 30px;
  background-color: white;
  position: relative;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}
.cadre-content h2 {
  font-family: var(--font-headline);
  color: var(--primary-color);
  margin-top: 0;
}
.cadre-content p {
  margin: 0;
  font-size: 0.95rem;
}
.cadre-points {
  font-weight: bold;
  color: var(--accent-color);
  font-size: 1.1rem;
  margin-bottom: 10px;
}

/* Mobile responsive timeline */
@media screen and (max-width: 768px) {
  .cadre-timeline::after {
    left: 31px;
  }
  .cadre-container {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  .cadre-container.right {
    left: 0%;
  }
  .cadre-container::after {
    left: 15px;
  }
}

/* --- Dynamic User Menu in Header --- */
.user-menu {
  position: relative;
  display: inline-block;

}
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.user-menu-trigger img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--accent-color);

 
}


.user-menu-dropdown {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 180px;
  box-shadow: var(--shadow);
  z-index: 1;
  right: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
}
.user-menu-dropdown a {
  color: var(--primary-color);
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.2s;
}
.user-menu-dropdown a:hover {
  background-color: #f1f1f1;
}
.user-menu:hover .user-menu-dropdown {
  display: block;
}

/* --- Mobile Responsive Profile Page FIX --- */
@media screen and (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr; /* Stack columns on mobile */
  }

.main-nav li > a{
   align-items: left;

  }
}

/* --- Leaderboard Styles --- */
.leaderboard-table .rank-badge {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}
.leaderboard-table .volunteer-info {
  display: flex;
  align-items: center;
  gap: 15px;
}
.leaderboard-table .volunteer-info img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.leaderboard-table .points-badge {
  font-weight: bold;
  color: var(--accent-color);
  font-size: 1.2rem;
}

/* --- NEW Social Share Modal Styles (REDESIGNED) --- */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0; /* Start invisible */
  transition: opacity 0.3s ease;
}
.modal.show {
  display: block;
  opacity: 1; /* Fade in */
}

.modal-content {
  background-color: #fefefe;
  position: relative;
  margin: 10% auto;
  width: 90%;
  max-width: 550px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  overflow: hidden; /* Important for the two-part design */
  transform: scale(0.9); /* Start slightly smaller */
  transition: transform 0.3s ease;
}
.modal.show .modal-content {
  transform: scale(1); /* Scale to full size */
}

.modal-sidebar {
  background-image: linear-gradient(
    160deg,
    var(--primary-color) 0%,
    #007991 100%
  );
  width: 180px;
  padding: 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.modal-sidebar img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 4px solid var(--accent-color);
  object-fit: cover;
}
.modal-sidebar h4 {
  color: white;
  margin-top: 15px;
  font-family: var(--font-headline);
}

.modal-main {
  padding: 30px;
  flex: 1;
}
.close-btn {
  color: #aaa;
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.modal-main h3 {
  margin-top: 0;
}
.modal-main p {
  font-size: 0.95rem;
  color: #6c757d;
}

.share-text {
  background: #f1f1f1;
  border-left: 4px solid var(--accent-color);
  padding: 15px;
  margin: 20px 0;
  font-style: italic;
  font-size: 0.9rem;
  max-height: 80px;
  overflow-y: auto;
}
.social-share-buttons {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-bottom: 20px;
}
.social-share-buttons a {
  font-size: 2.2rem;
  color: #495057;
  transition: transform 0.2s ease;
}
.social-share-buttons a:hover {
  transform: scale(1.2);
}
.btn-whatsapp {
  color: #25d366;
}
.btn-facebook {
  color: #1877f2;
}
.btn-twitter {
  color: #1da1f2;
}
.btn-linkedin {
  color: #0a66c2;
}

/* Copy Link Feature */
.copy-link-wrapper {
  display: flex;
  margin-top: 20px;
}
.copy-link-input {
  flex-grow: 1;
  border: 1px solid #ccc;
  padding: 8px;
  border-radius: 6px 0 0 6px;
  font-size: 0.9rem;
}
.copy-link-button {
  padding: 8px 15px;
  border: none;
  background: var(--primary-color);
  color: white;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
}

/* Mobile responsive modal */
@media (max-width: 500px) {
  .modal-content {
    flex-direction: column;
    margin-top: 5%;
  }
  .modal-sidebar {
    width: 100%;
    border-radius: 15px 15px 0 0;
  }
}

.user-menu-trigger img {
  margin-left: 20px;
 

}

/* --- Reports & Charts Styles --- */
.chart-container {
  position: relative;
  height: 350px; /* Set a fixed height for consistency */
  width: 100%;
}
.export-button-wrapper {
  margin-bottom: 20px;
  text-align: right;
}

/* --- Volunteer Opportunities Page - Mobile Responsive FIX --- */
@media (max-width: 768px) {
  /* This is the most important rule. It tells the grid to become a single column on small screens. */
  .opportunity-grid {
    grid-template-columns: 1fr;
  }

  /* This rule just reduces the extra space on the sides for a cleaner mobile look. */
  .opportunities-container {
    padding: 40px 15px;
  }
}

/* --- NEW: Custom Confirmation Modal Styles --- */
.confirm-modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 3000; /* On top of everything */
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}
.confirm-modal-overlay.show {
  display: flex; /* Use flex to center the modal */
  opacity: 1;
}

.confirm-modal-box {
  background: var(--white-color);
  padding: 30px;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.confirm-modal-overlay.show .confirm-modal-box {
  transform: scale(1);
}

.confirm-modal-box h3 {
  font-family: var(--font-headline);
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 15px;
}
.confirm-modal-box p {
  color: #6c757d;
  margin-bottom: 30px;
}
.confirm-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}
.confirm-modal-buttons .btn {
  padding: 10px 24px;
  font-weight: bold;
}
/* Special style for the "Cancel" button */
.btn-cancel {
  background-color: #6c757d;
  color: white;
}
.btn-cancel:hover {
  background-color: #5a6268;
}

/* --- UI POLISH: Add space above the footer --- */
.latest-news {
  margin-bottom: 60px; /* This creates the clean white space you requested */
}

/* --- UI POLISH: Add space below "What We Do" section --- */
.mission-section {
  padding-bottom: 0; /* We remove the old padding to replace it with a margin */
  margin-bottom: 60px; /* This creates the clean white space you requested */
}

/* --- General Sections & Titles --- */
section {
  padding: 80px 0;
}
.mission-section {
  /* We are adding a top margin to this specific section to create the space */
  margin-top: 60px;
  padding-top: 0; /* We set padding to 0 so only the margin creates the space */
  margin-bottom: 60px; /* This is the other spacing fix you requested */
  padding-bottom: 0;
}
.latest-news {
  padding-top: 0; /* We remove its top padding to respect the margin from the section above */
  margin-bottom: 60px;
}
/* --- END OF FIX --- */

.section-title {
  text-align: center;
  font-size: 2.8rem;
  margin-bottom: 50px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}
.feature-item {
  text-align: center;
  padding: 30px;
  background: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}
.main-footer {
  background: var(--primary-color);
  color: var(--light-bg);
  padding-top: 60px;
}

/* --- VISUAL UPGRADE: About Us Page Styles --- */
.page-header {
  padding: 80px 0;
  text-align: center;
  color: white;
  background-size: cover;
  background-position: center;
  position: relative;
}
.page-header h1 {
  color: white;
  font-size: 3.5rem;
  position: relative;
  z-index: 2;
}
.page-header p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.about-content {
  padding: 80px 0;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}
.value-card {
  text-align: center;
}
.value-card i {
  font-size: 2.5rem;
  color: var(--accent-color);
  margin-bottom: 15px;
}
.founders-section {
  background-color: var(--gray-bg);
}
.founder-card {
  text-align: center;
}
.founder-card img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent-color);
  margin-bottom: 20px;
}

/* --- VISUAL UPGRADE: Admin Form Icons --- */
.form-group {
  position: relative;
}
.form-group .fa-input-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}
.form-group input {
  padding-left: 40px;
}

/* --- NEW: Visual Badge Styles --- */
.badges-container {
  padding: 60px 20px;
  background-color: var(--gray-bg);
}
.badge-display-card {
  text-align: center;
  background: var(--white-color);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}
.badge-display-card h2 {
  color: var(--primary-color);
}
.badge-svg {
  width: 200px;
  height: auto;
  margin: 20px 0;
}
.badge-progress-list {
  margin-top: 50px;
}
.badge-progress-item {
  background: var(--white-color);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  padding: 25px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 25px;
}
.badge-progress-item .badge-svg {
  width: 100px;
  opacity: 0.3;
}
.badge-progress-item.earned .badge-svg {
  opacity: 1;
}
.progress-info h3 {
  color: var(--primary-color);
  margin: 0 0 10px 0;
}
.progress-bar-container {
  width: 100%;
  height: 10px;
  background-color: #e9ecef;
  border-radius: 50px;
}
.progress-bar-fill {
  height: 100%;
  background-color: var(--accent-color);
  border-radius: 50px;
}

/* --- NEW: Modern Mega Menu Header --- */
.main-nav ul {
  align-items: stretch; /* Allows dropdown to be full height */
}
.main-nav li {
  position: relative;
}
.main-nav .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 20px;
  background-color: white;
  min-width: 220px;
  box-shadow: var(--shadow);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  z-index: 1000;
  padding: 10px 0;
}
.main-nav li:hover > .dropdown {
  display: block;
}
.main-nav .dropdown a {
  display: block;
  padding: 12px 20px;
  white-space: nowrap;
}
.main-nav a:not(.btn)::after {
  display: none; /* We remove the old underline effect */
}
.main-nav li > a {
  display: flex;
  text-align: center;
  height: 100%;
  padding: 11px 20px;
}
.main-nav li:hover > a {
  background-color: var(--gray-bg);
  
}

/* --- NEW: AMAZING UI Badge Styles --- */
.badge-svg {
  width: 100%;
  height: auto;
  max-width: 220px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
.badge-progress-list {
  max-width: 800px;
  margin: 50px auto 0;
}
.badge-progress-item {
  cursor: pointer; /* Indicates the badges are clickable */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.badge-progress-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
.badge-progress-item .badge-svg {
  width: 120px;
  opacity: 0.4;
  filter: grayscale(80%); /* Makes unearned badges look gray */
}
.badge-progress-item.earned .badge-svg {
  opacity: 1;
  filter: grayscale(0%);
}

/* --- NEW: Badge Info Modal Styles --- */
.badge-modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}
.badge-modal.show {
  display: flex;
  opacity: 1;
}
.badge-modal-content {
  background-color: #fff;
  padding: 40px;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 500px;
  text-align: center;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.badge-modal.show .badge-modal-content {
  transform: scale(1);
}
.badge-modal .badge-svg {
  width: 180px;
}
.badge-modal h2 {
  color: var(--primary-color);
  margin-top: 20px;
}
.badge-modal-reqs {
  margin-top: 20px;
  font-weight: bold;
  color: #6c757d;
}

.badge-modal-content {
    padding: 30px; /* Uniform padding */
}
.badge-modal h2 {
    margin-top: 15px; /* Space below the badge */
    margin-bottom: 10px;
}
.badge-modal p {
    line-height: 1.6; /* Better line spacing for readability */
    margin-bottom: 10px;
}
.badge-modal-reqs {
    margin-top: 25px; /* More space above the requirements text */
    font-size: 0.9rem;
}
