/* CHIMD Redesign - Core Styling & Modern UI Foundation */

/* Custom Fonts & Global Reset */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Design Tokens */
  --primary: #0C54A5;                /* Original CHI Lighter Royal Blue */
  --primary-light: hsl(212, 86%, 42%);
  --secondary: #e76f51;               /* Warm Coral Accent */
  --secondary-hover: #f4a261;
  --accent: hsl(171, 63%, 43%);        /* Emerald Mint for Healing */
  --bg: hsl(45, 20%, 98%);            /* Warm Off-White Silk */
  --bg-darker: hsl(45, 15%, 93%);
  --text-main: hsl(215, 25%, 21%);    /* Soft Slate */
  --text-muted: hsl(215, 16%, 47%);
  --white: #ffffff;
  
  /* Glassmorphism & UI Shadows */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.4);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 30px rgba(12, 84, 165, 0.08);
  --shadow-lg: 0 20px 40px rgba(12, 84, 165, 0.12);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
}

/* Typography styling */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--secondary);
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

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

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

.btn-secondary:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

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

.btn-accent:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Header & Sticky Nav */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(12, 84, 165, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
  direction: ltr !important;
}

.site-header.scrolled {
  padding: 0.4rem 0;
  background: rgba(12, 84, 165, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 85px;
  direction: ltr !important;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  transition: var(--transition);
}

.site-header.scrolled .site-logo-img {
  height: 44px;
}

.footer-logo-img {
  height: 58px;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-family: var(--font-heading);
  font-weight: 500;
  color: #FFFFFF;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--secondary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Top-Right Language Dropdown Selector */
.header-social-links {
  display: none !important;
  gap: 0.75rem;
  font-size: 1.25rem;
}

.header-social-links a {
  color: #FFFFFF;
  transition: var(--transition);
}

.header-social-links a:hover {
  color: var(--secondary);
  transform: translateY(-2px);
}

.lang-selector-container {
  position: relative;
  display: inline-block;
}

.lang-selector-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-selector-container .lang-icon {
  position: absolute;
  left: 0.65rem;
  color: #FFFFFF;
  pointer-events: none;
  font-size: 0.8rem;
  z-index: 2;
}

.lang-selector-container .lang-arrow {
  position: absolute;
  right: 0.65rem;
  color: #FFFFFF;
  pointer-events: none;
  font-size: 0.7rem;
  z-index: 2;
}

.lang-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.35rem 1.6rem 0.35rem 1.8rem;
  border-radius: 50px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.82rem;
  max-width: 125px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

.lang-select:hover, .lang-select:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: #FFFFFF;
}

.lang-select option {
  background: #0c54a5;
  color: #FFFFFF;
  padding: 0.5rem 1rem;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #FFFFFF;
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--white);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  list-style: none;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: var(--transition);
  z-index: 1001;
  min-width: 120px;
}

.lang-dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  color: var(--text-main);
}

.lang-option:hover {
  background-color: rgba(12, 84, 165, 0.05);
  color: var(--primary);
}

/* Mobile Nav Toggle (Top Right) */
.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-sm);
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(12, 84, 165, 0.2);
  transition: var(--transition);
}

.mobile-nav-toggle:hover,
.mobile-nav-toggle:focus {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

/* Sections */
section {
  padding: 6.5rem 0;
  position: relative;
}

/* Hero Section */
.hero {
  background: radial-gradient(circle at 10% 20%, rgba(248, 245, 235, 0.9) 0%, rgba(225, 235, 240, 0.9) 90%), url('https://chimd.org/wp-content/uploads/2022/07/banner01.jpg') no-repeat center center/cover;
  padding: 10rem 0 7rem 0;
  display: flex;
  align-items: center;
  min-height: 90vh;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: center;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  border-top: 1px solid rgba(12, 84, 165, 0.1);
  padding-top: 2rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
}

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

.hero-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-circle {
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(231, 111, 81, 0.1), rgba(12, 84, 165, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 6s ease-in-out infinite;
}

.hero-circle img {
  width: 90%;
  height: 90%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

/* Section Header styling */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem auto;
}

.section-tag {
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--secondary);
  margin: 0.75rem auto 0 auto;
  border-radius: 2px;
}

/* About / Mission Section */
.about {
  background-color: var(--white);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

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

.profile-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(12, 84, 165, 0.03);
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.profile-image-container {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin-bottom: 1.5rem;
  overflow: hidden;
  border: 4px solid var(--bg-darker);
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.profile-name {
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.profile-role {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.profile-bio {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.partners-box {
  background: linear-gradient(135deg, rgba(225, 235, 240, 0.4), rgba(248, 245, 235, 0.4));
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(12, 84, 165, 0.05);
  margin-top: 2rem;
}

.partners-box h4 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.partners-logo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.partner-logo-tag {
  background: var(--white);
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(12, 84, 165, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.partner-logo-tag:hover {
  transform: translateY(-2px);
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.partner-logo-tag:hover i {
  color: var(--secondary) !important;
}

/* Programs Section & Tabs */
.programs {
  background: linear-gradient(180deg, var(--white) 0%, var(--bg) 100%);
}

.tabs-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--white);
  border: 1px solid rgba(12, 84, 165, 0.1);
  padding: 1rem 1.75rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--primary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.tab-btn:hover,
.tab-btn.active {
  background-color: var(--primary);
  color: var(--white);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.tab-content {
  display: none;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(12, 84, 165, 0.03);
  animation: fadeIn 0.4s ease;
}

.tab-content.active {
  display: block;
}

.program-showcase {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.program-bullets {
  margin-top: 1.5rem;
  list-style: none;
}

.program-bullets li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.program-bullets li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.25rem;
}

.program-decor {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--white);
  padding: 3rem;
  border-radius: var(--radius-md);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.program-decor::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  animation: rotateGlow 15s linear infinite;
  pointer-events: none;
}

@keyframes rotateGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Timeline/Events Section */
.events {
  background-color: var(--white);
}

/* Upcoming Event Card Styles */
.upcoming-event-card {
  max-width: 1000px;
  margin: 2rem auto 4rem;
  background: var(--light-bg);
  border-left: 5px solid var(--primary);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.upcoming-event-content {
  position: relative;
}

.upcoming-badge {
  background-color: var(--primary);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 1rem;
  display: inline-block;
}

.upcoming-event-content h3 {
  font-size: 1.8rem;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.event-details {
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 1rem;
}

.event-details i {
  margin-right: 0.5rem;
}

.registration-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.registration-buttons .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.wechat-btn {
  background-color: #07c160;
  color: white;
  border: none;
}

.wechat-btn:hover {
  background-color: #06ad56;
  color: white;
}

/* WeChat Modal Styles */
.modal-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

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

.wechat-qr-img {
  max-width: 250px;
  width: 100%;
  height: auto;
  margin-top: 1.5rem;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 10px;
}

.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 4px;
  background-color: rgba(12, 84, 165, 0.1);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.timeline-item {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

.timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  right: -10px;
  background-color: var(--white);
  border: 4px solid var(--secondary);
  top: 25px;
  border-radius: 50%;
  z-index: 1;
  transition: var(--transition);
}

.timeline-item.left {
  left: 0;
}

.timeline-item.right {
  left: 50%;
}

.timeline-item.right::after {
  left: -10px;
}

.timeline-content {
  padding: 2rem;
  background-color: var(--bg);
  position: relative;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(12, 84, 165, 0.03);
}

.timeline-content:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--secondary);
  margin-bottom: 0.5rem;
  display: block;
}

.timeline-img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin: 1rem 0;
  object-fit: cover;
  max-height: 250px;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
}

.read-more-btn:hover {
  color: var(--secondary);
  gap: 0.75rem;
}

/* Resources Grid Section */
.resources {
  background-color: var(--bg);
}

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

.resource-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(12, 84, 165, 0.03);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

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

.resource-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background-color: rgba(231, 111, 81, 0.1);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
}

.resource-card h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.resource-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Interactive Donation Hub & Stripe Modal */
.donation-hub {
  background: linear-gradient(135deg, rgba(12, 84, 165, 0.03) 0%, rgba(16, 185, 129, 0.03) 100%);
  border-top: 1px solid rgba(12, 84, 165, 0.05);
}

.donation-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  margin: 0 auto;
  border: 1px solid rgba(12, 84, 165, 0.04);
}

.donation-frequency {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.freq-btn {
  background: var(--bg);
  border: 1px solid rgba(12, 84, 165, 0.1);
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

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

.donation-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.tier-card {
  border: 2px solid var(--bg-darker);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.tier-card:hover {
  border-color: var(--primary-light);
  background-color: rgba(12, 84, 165, 0.01);
}

.tier-card.selected {
  border-color: var(--secondary);
  background-color: rgba(231, 111, 81, 0.03);
}

.tier-amount {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.tier-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.tier-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.custom-amount-wrapper {
  max-width: 400px;
  margin: 0 auto 2.5rem auto;
  position: relative;
}

.custom-amount-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  font-size: 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  border: 2px solid var(--bg-darker);
  border-radius: var(--radius-md);
  color: var(--primary);
  transition: var(--transition);
}

.custom-amount-input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 4px rgba(231, 111, 81, 0.15);
}

.currency-symbol {
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-muted);
}

.donation-btn-container {
  text-align: center;
}

/* Multi-step Checkout Modal */
.checkout-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(12, 84, 165, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.checkout-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  position: relative;
  transform: scale(0.95);
  transition: var(--transition);
}

.checkout-modal.open .modal-card {
  transform: scale(1);
}

.modal-header {
  background-color: var(--primary);
  color: var(--white);
  padding: 1.5rem 2rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
}

.modal-body {
  padding: 2.5rem 2rem;
}

/* Stripe form simulation styles */
.stripe-form-group {
  margin-bottom: 1.5rem;
}

.stripe-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stripe-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(12, 84, 165, 0.15);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: var(--transition);
}

.stripe-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.stripe-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stripe-lock-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1.5rem;
}

/* Confetti success screen */
.donation-success-panel {
  text-align: center;
  display: none;
}

.success-icon-badge {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  margin: 0 auto 1.5rem auto;
}

/* Contact Us Section */
/* Newsletter Section */
.newsletter-section {
  background-color: var(--light-bg);
  padding: 4rem 0;
}

.newsletter-card {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  color: var(--white);
  box-shadow: 0 15px 35px rgba(12, 84, 165, 0.2);
}

.newsletter-content {
  flex: 1;
}

.newsletter-content h2 {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-size: 2rem;
}

.newsletter-content p {
  color: rgba(255,255,255,0.9);
  font-size: 1.1rem;
}

.newsletter-form-container {
  flex: 1;
  max-width: 500px;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  padding: 0.5rem;
  border-radius: 50px;
}

.newsletter-input {
  flex: 1;
  background: var(--white);
  border: none;
  border-radius: 50px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  outline: none;
}

.newsletter-btn {
  border-radius: 50px;
  padding: 0.8rem 1.5rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .newsletter-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem;
  }
  .newsletter-form {
    flex-direction: column;
    border-radius: var(--radius-sm);
    background: transparent;
    padding: 0;
  }
  .newsletter-input {
    border-radius: var(--radius-sm);
  }
  .newsletter-btn {
    border-radius: var(--radius-sm);
  }
}

.contact {
  background-color: var(--white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
}

.contact-info-panel h3 {
  margin-top: 2rem;
}

.contact-list {
  list-style: none;
  margin-top: 1rem;
}

.contact-list li {
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
}

.contact-list i {
  color: var(--secondary);
  font-size: 1.25rem;
  width: 25px;
}

.contact-form {
  background-color: var(--bg);
  padding: 3rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(12, 84, 165, 0.03);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(12, 84, 165, 0.15);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(12, 84, 165, 0.08);
}

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

/* Footer Section */
.site-footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 5rem 0 2rem 0;
  border-top: 5px solid var(--secondary);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3.5rem;
}

.footer-logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-desc {
  font-size: 0.95rem;
  opacity: 0.8;
  max-width: 350px;
}

.footer-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-title::after {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background-color: var(--secondary);
  margin-top: 0.5rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
  color: var(--secondary-hover);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Responsive Rules */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-stats {
    justify-content: center;
  }
  
  .about-grid, .program-showcase, .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-item.right {
    left: 0;
  }
  
  .timeline-item::after {
    left: 21px;
    right: auto;
  }
  
  .timeline-item.right::after {
    left: 21px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 992px) {
  .header-social-links {
    display: none !important;
  }

  .header-container {
    position: relative;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    align-items: center;
    justify-content: space-between;
  }

  .logo-link {
    cursor: pointer;
    margin-right: auto;
  }

  .site-logo-img {
    height: 48px;
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .nav-menu {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 1rem;
    left: auto;
    width: 270px;
    max-width: calc(100vw - 2rem);
    background-color: #ffffff;
    flex-direction: column;
    padding: 0;
    margin: 0;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.25);
    border-radius: var(--radius-md);
    border: 1px solid rgba(0, 0, 0, 0.12);
    align-items: stretch;
    gap: 0;
    display: none;
    z-index: 99999;
  }
  
  .nav-menu.open {
    display: flex !important;
    padding: 0.6rem 0;
  }

  .nav-menu li {
    width: 100%;
    text-align: left;
  }

  .nav-link {
    display: flex;
    align-items: center;
    padding: 0.7rem 1.2rem;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text-main);
    border-left: 3px solid transparent;
    transition: var(--transition);
  }

  .nav-link:hover,
  .nav-link.active {
    background-color: rgba(12, 84, 165, 0.05);
    color: var(--primary);
    border-left-color: var(--secondary);
  }

  .nav-menu li .btn {
    margin: 0.5rem 1rem;
    width: calc(100% - 2rem);
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
  }
  
  /* Compact Language Selector & Mobile Nav Toggle Alignment */
  .mobile-nav-toggle {
    display: flex;
    flex-shrink: 0;
    margin-right: 0.4rem;
  }

  .lang-selector-container {
    flex-shrink: 0;
  }

  .lang-select {
    font-size: 0.75rem;
    padding: 0.3rem 1.2rem 0.3rem 1.5rem;
    max-width: 90px;
  }
  
  .lang-selector-container .lang-icon {
    left: 0.45rem;
    font-size: 0.72rem;
  }

  .lang-selector-container .lang-arrow {
    right: 0.45rem;
    font-size: 0.62rem;
  }

  .lang-btn {
    padding: 0.5rem 0.75rem;
  }
  .lang-btn .lang-text {
    display: none;
  }

  /* Hero Section Optimizations */
  .hero {
    padding: 7rem 0 4rem 0;
    min-height: auto;
  }

  .hero-circle {
    width: min(280px, 75vw);
    height: min(280px, 75vw);
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
    width: 100%;
  }

  /* Padding Optimizations for Cards */
  .tab-content {
    padding: 1.75rem 1.25rem;
  }

  .program-showcase {
    gap: 2rem;
  }

  .program-decor {
    padding: 2rem 1.25rem;
  }

  .donation-card {
    padding: 1.75rem 1.25rem;
  }

  .custom-amount-input {
    font-size: 1.25rem;
    padding: 0.85rem 1rem 0.85rem 2.5rem;
  }

  .currency-symbol {
    font-size: 1.25rem;
    left: 1.25rem;
  }

  .contact-form {
    padding: 2rem 1.25rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-desc {
    margin: 0 auto;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-title::after {
    margin: 0.5rem auto 0 auto;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 576px) {
  .modal-card {
    width: 95%;
  }
  
  .modal-body {
    padding: 1.5rem 1rem;
  }

  .stripe-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .freq-btn {
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
  }

  .resources-grid,
  .donation-tiers {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   Chatbot Widget Styling
========================================= */
.chatbot-fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.chatbot-fab-container.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.7);
}

.chatbot-fab {
  width: 65px;
  height: 65px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  border: 2px solid rgba(255,255,255,0.2);
}

.chatbot-fab:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.chatbot-fab-label {
  background: var(--white);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.8rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-sm);
  pointer-events: none;
  white-space: nowrap;
  animation: floatLabel 3s ease-in-out infinite;
}

@keyframes floatLabel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.chatbot-panel {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 370px;
  height: 520px;
  max-width: calc(100vw - 2rem);
  max-height: calc(100vh - 4rem);
  background: var(--white);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.3s ease, transform 0.3s ease, height 0.3s ease, max-height 0.3s ease;
  touch-action: none;
}

.chatbot-panel.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chatbot-panel.minimized {
  height: 54px !important;
  max-height: 54px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.2);
}

.chatbot-panel.minimized .chat-messages,
.chatbot-panel.minimized .chat-input-area {
  display: none !important;
}

.chat-header {
  background: var(--primary);
  color: var(--white);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.chat-header:active {
  cursor: grabbing;
}

.chat-header h4 {
  color: var(--white);
  margin: 0;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-header-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
}

.chat-header-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.chat-messages {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-msg {
  max-width: 85%;
  padding: 0.8rem 1rem;
  font-size: 0.95rem;
  line-height: 1.5;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-msg.bot {
  align-self: flex-start;
  background: var(--white);
  color: var(--text-main);
  border-radius: 1rem 1rem 1rem 0;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.05);
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--primary);
  color: var(--white);
  border-radius: 1rem 1rem 0 1rem;
  box-shadow: var(--shadow-sm);
}

.chat-input-area {
  padding: 1rem;
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,0.05);
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.chat-input {
  flex-grow: 1;
  padding: 0.8rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}

.chat-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 2px rgba(12, 84, 165, 0.1);
}

.chat-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

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

.chat-send-btn:hover {
  background: var(--primary-light);
}

.chat-disclaimer {
  padding: 0.4rem 0.8rem;
  background: #f8fafc;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.7rem;
  color: #64748b;
  text-align: center;
  line-height: 1.35;
}

.chat-voice-btn {
  background: var(--bg-darker);
  color: var(--text-main);
}

.chat-voice-btn:hover {
  background: var(--secondary);
  color: var(--white);
}

.chat-voice-btn.listening {
  background: var(--secondary);
  color: var(--white);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(231, 111, 81, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(231, 111, 81, 0); }
  100% { box-shadow: 0 0 0 0 rgba(231, 111, 81, 0); }
}

/* Chatbot Mobile Responsiveness */
@media screen and (max-width: 480px) {
  .chatbot-panel {
    width: calc(100% - 2rem);
    right: 1rem;
    bottom: 6.5rem;
    height: 60vh;
  }
  .chatbot-fab-container {
    bottom: 1rem;
    right: 1rem;
  }
  .chatbot-fab {
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
  }
  .chatbot-fab-label {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
}
