/* ============================================
   Lowell Helps - Community Mutual Aid
   Comprehensive Stylesheet
   ============================================ */

/* CSS Custom Properties */
:root {
  --primary: #1F3D2B;
  --primary-dark: #162D1F;
  --secondary: #2F6F7E;
  --secondary-dark: #245A66;
  --accent: #2F6F7E;
  --accent-dark: #245A66;
  --bg: #F4F1EC;
  --text: #1e293b;
  --text-light: #64748b;
  --white: #ffffff;
  --border: #e2e8f0;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

/* Modern Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

/* Skip to Content (Accessibility) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 1000;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
  color: var(--white);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  position: relative;
}

.nav-logo span {
  color: var(--accent);
}

.nav-logo-sub {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-light);
  letter-spacing: 0.02em;
  margin-left: 0.5rem;
  align-self: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 500;
  font-size: 0.938rem;
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.nav-links a.nav-cta {
  background: var(--primary);
  color: var(--white);
  margin-left: 0.5rem;
}

.nav-links a.nav-cta:hover {
  background: var(--primary-dark);
  color: var(--white);
}

/* Hamburger Menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Sections
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  display: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.25rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-small {
  padding: 3rem 1.5rem;
}

.hero-small h1 {
  font-size: 2.25rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.5;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.9);
  color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
}

.btn-accent {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

.btn-success:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: var(--white);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: var(--white);
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.125rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--white);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  transition: all var(--transition);
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: rgba(37, 99, 235, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   Request Cards
   ============================================ */
.request-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.request-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.request-card .request-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.request-card h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.request-card .request-description {
  color: var(--text-light);
  font-size: 0.938rem;
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 1rem;
}

.request-card .request-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-light);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.badge-approved {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.badge-denied {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

/* Category Badges */
.badge-category {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.badge-environment { background: rgba(34, 197, 94, 0.15); color: #15803d; }
.badge-youth { background: rgba(99, 102, 241, 0.15); color: #4f46e5; }
.badge-food { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.badge-community { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.badge-senior { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.badge-animal { background: rgba(236, 72, 153, 0.15); color: #db2777; }
.badge-neighborhood { background: rgba(6, 182, 212, 0.15); color: #0891b2; }
.badge-health { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.badge-other { background: rgba(100, 116, 139, 0.15); color: #475569; }

/* ============================================
   Forms
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.938rem;
  color: var(--text);
}

.form-group label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  background: var(--white);
  transition: all var(--transition);
  color: var(--text);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-control::placeholder {
  color: var(--text-light);
}

.form-control.error {
  border-color: var(--danger);
}

.form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

textarea.form-control {
  min-height: 140px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-hint {
  font-size: 0.813rem;
  color: var(--text-light);
  margin-top: 0.375rem;
}

.form-error {
  font-size: 0.813rem;
  color: var(--danger);
  margin-top: 0.375rem;
  display: none;
}

.form-group.has-error .form-error {
  display: block;
}

.form-group.has-error .form-control {
  border-color: var(--danger);
}

.char-count {
  text-align: right;
  font-size: 0.813rem;
  color: var(--text-light);
  margin-top: 0.375rem;
}

.char-count.warning {
  color: var(--warning);
}

.char-count.danger {
  color: var(--danger);
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar .form-control {
  max-width: 250px;
}

.filter-bar .search-input {
  flex: 1;
  min-width: 200px;
}

/* ============================================
   How It Works / Steps
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.step {
  position: relative;
}

.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.step-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(31, 61, 43, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.step h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--text-light);
}

/* ============================================
   Stats
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.938rem;
}

/* ============================================
   Opportunity Cards
   ============================================ */
.opportunity-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
}

.opportunity-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--text);
}

.opp-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg);
}

.opp-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.opp-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.opp-card-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.opp-org {
  color: var(--secondary);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.opp-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-light);
  margin-top: auto;
  padding-top: 0.75rem;
}

.opp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.75rem;
}

.tag {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(47, 111, 126, 0.1);
  color: var(--secondary);
}

/* Organization Logo Styles */
.org-logo-box {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.org-logo-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.org-logo-box-lg {
  width: 100px;
  height: 100px;
}

.org-card-with-logo {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.org-card-with-logo .org-logo-box-lg {
  width: 120px;
  height: 120px;
}

.org-card-with-logo .org-card-content {
  flex: 1;
  min-width: 0;
}

@media (max-width: 480px) {
  .org-card-with-logo {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .org-card-with-logo .org-logo-box-lg {
    width: 100px;
    height: 100px;
  }
}

.opp-card-logo {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 1;
}

.opp-card-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.opp-card-body {
  position: relative;
}

.opp-card-body.has-logo .request-meta,
.opp-card-body.has-logo h3 {
  padding-right: 60px;
}

@media (max-width: 480px) {
  .org-logo-box {
    width: 60px;
    height: 60px;
  }
  .org-logo-box-lg {
    width: 72px;
    height: 72px;
  }
  .opp-card-logo {
    width: 36px;
    height: 36px;
  }
}

/* Featured Causes Grid */
.causes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cause-card {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--white);
}

.cause-card:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow-md);
  color: var(--white);
  transform: translateY(-2px);
}

.cause-card .cause-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
}

.cause-card h4 {
  font-size: 0.938rem;
  font-weight: 600;
  color: var(--white);
}

/* Email capture */
.email-capture {
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  text-align: center;
}

.email-capture h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.email-capture p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.email-capture-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}

.email-capture-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1rem;
}

.email-capture-form input::placeholder {
  color: rgba(255,255,255,0.6);
}

.email-capture-form button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.email-capture-form button:hover {
  background: rgba(255,255,255,0.9);
}

/* Split CTA */
.split-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.split-cta-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  border: 1px solid var(--border);
}

.split-cta-card h3 {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
}

.split-cta-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* View toggle */
.view-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--white);
  padding: 0.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.view-toggle button {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-light);
  transition: all var(--transition);
}

.view-toggle button.active {
  background: var(--primary);
  color: var(--white);
}

/* Calendar View */
.calendar-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.calendar-header h3 {
  font-size: 1.125rem;
  font-weight: 700;
}

.calendar-header button {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.calendar-day-header {
  padding: 0.75rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.813rem;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
}

.calendar-day {
  min-height: 80px;
  padding: 0.5rem;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 0.813rem;
  cursor: pointer;
  transition: background var(--transition);
}

.calendar-day:nth-child(7n) {
  border-right: none;
}

.calendar-day:hover {
  background: var(--bg);
}

.calendar-day .day-number {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--text-light);
}

.calendar-day.today .day-number {
  background: var(--primary);
  color: var(--white);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.calendar-event {
  background: rgba(31, 61, 43, 0.1);
  color: var(--primary);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.688rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.calendar-event:hover {
  background: rgba(31, 61, 43, 0.2);
}

@media (max-width: 768px) {
  .causes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .split-cta {
    grid-template-columns: 1fr;
  }
  .email-capture-form {
    flex-direction: column;
  }
  .calendar-day {
    min-height: 50px;
  }
}

/* ============================================
   Resource Cards
   ============================================ */
.resource-section {
  margin-bottom: 3rem;
}

.resource-section h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.resource-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.resource-card h4 {
  font-size: 1.063rem;
  font-weight: 700;
  margin-bottom: 0.375rem;
  color: var(--primary);
}

.resource-card p {
  color: var(--text-light);
  font-size: 0.938rem;
  margin-bottom: 0.5rem;
}

.resource-card a {
  font-size: 0.875rem;
  font-weight: 600;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer h3 {
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-brand p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-links a {
  display: block;
  color: rgba(255,255,255,0.7);
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: all var(--transition);
  font-size: 0.875rem;
}

.footer-social a:hover {
  background: var(--primary);
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

/* ============================================
   Toast / Notification System
   ============================================ */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 320px;
  max-width: 450px;
  animation: toast-in 0.3s ease;
  border-left: 4px solid var(--text-light);
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }
.toast.toast-info { border-left-color: var(--primary); }

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: 0.938rem;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 1.25rem;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text);
}

.toast.removing {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ============================================
   Loading Spinner
   ============================================ */
.spinner-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  text-align: center;
  color: var(--text-light);
  margin-top: 1rem;
  font-size: 0.938rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

/* ============================================
   Modal
   ============================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-backdrop.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
  padding: 0.25rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

/* ============================================
   Admin Styles
   ============================================ */
.admin-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.admin-nav {
  background: var(--text);
  color: var(--white);
  padding: 0 1.5rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-nav .nav-logo {
  color: var(--white);
  font-size: 1.25rem;
}

.admin-nav .nav-logo span {
  color: var(--accent);
}

.admin-content {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.admin-stat {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.admin-stat h3 {
  font-size: 0.813rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.admin-stat .stat-value {
  font-size: 2rem;
  font-weight: 800;
}

.admin-stat.total .stat-value { color: var(--primary); }
.admin-stat.pending .stat-value { color: var(--warning); }
.admin-stat.approved .stat-value { color: var(--success); }
.admin-stat.denied .stat-value { color: var(--danger); }

/* Filter Tabs */
.filter-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1.5rem;
  background: var(--white);
  padding: 0.375rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: fit-content;
}

.filter-tab {
  padding: 0.5rem 1.25rem;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-light);
  transition: all var(--transition);
}

.filter-tab:hover {
  color: var(--text);
  background: var(--bg);
}

.filter-tab.active {
  background: var(--primary);
  color: var(--white);
}

/* Admin Table */
.table-container {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: var(--bg);
  padding: 0.875rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.813rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.938rem;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-table tr:hover td {
  background: rgba(37, 99, 235, 0.02);
}

.table-actions {
  display: flex;
  gap: 0.5rem;
}

/* Login Form */
.login-container {
  max-width: 420px;
  margin: 3rem auto;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}

.login-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.login-card .subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Detail rows for modals */
.detail-row {
  display: flex;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: var(--text-light);
  width: 120px;
  flex-shrink: 0;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-value {
  flex: 1;
}

/* Two Column Layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* Success Message */
.success-message {
  text-align: center;
  padding: 3rem 2rem;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  color: var(--success);
}

.success-message h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.success-message p {
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Privacy Notice */
.privacy-notice {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-light);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.privacy-notice .icon {
  font-size: 1.125rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
}

.faq-question:hover {
  background: var(--bg);
}

.faq-question .icon {
  transition: transform 0.3s ease;
  font-size: 0.875rem;
  color: var(--text-light);
}

.faq-item.active .faq-question .icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 0 1.5rem 1.25rem;
  max-height: 500px;
}

.faq-answer p {
  color: var(--text-light);
  line-height: 1.7;
}

/* Donate page */
.donate-option {
  text-align: center;
  padding: 2rem;
}

.donate-option .icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Impact stats on donate page */
.impact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
}

.impact-item .number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
}

.impact-item .label {
  color: var(--text-light);
  font-size: 1rem;
}

/* ============================================
   Responsive Breakpoints
   ============================================ */

/* Tablet: 1024px */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Mobile: 768px */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 5rem 1.5rem 2rem;
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
    z-index: 105;
    gap: 0.25rem;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }

  .nav-links a.nav-cta {
    margin-left: 0;
    margin-top: 0.5rem;
    text-align: center;
  }

  .hero {
    padding: 3.5rem 1.5rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1.063rem;
  }

  .hero-small {
    padding: 2.5rem 1.5rem;
  }

  .hero-small h1 {
    font-size: 1.75rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-header h2 {
    font-size: 1.625rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .form-control {
    max-width: none;
  }

  .admin-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-table th,
  .admin-table td {
    padding: 0.75rem;
    font-size: 0.813rem;
  }

  .table-actions {
    flex-direction: column;
  }

  .impact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .toast {
    min-width: auto;
    max-width: calc(100vw - 3rem);
  }

  .modal {
    margin: 1rem;
  }

  .detail-row {
    flex-direction: column;
    gap: 0.25rem;
  }

  .detail-label {
    width: auto;
  }
}

/* Small Mobile: 480px */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero h1 {
    font-size: 1.625rem;
  }

  .stat-number {
    font-size: 2rem;
  }

  .card {
    padding: 1.25rem;
  }

  .login-card {
    padding: 1.5rem;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
