/* Reset and Base Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

:root {
  --primary: #02A95C;
  --primary-hover: #028a4a;
  --background: #ffffff;
  --foreground: #1a1a1a;
  --muted: #f5f5f5;
  --muted-foreground: #6b6b6b;
  --border: #e5e5e5;
  --text-gray: #6b6b6b;
  --sticky-bar-bg: #3d3d2f;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--background);
  z-index: 40;
  border-bottom: 1px solid var(--border);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.header-icon {
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-icon svg {
  width: 20px;
  height: 20px;
  color: var(--foreground);
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-desktop {
  display: none;
  gap: 1.5rem;
}

.nav-desktop a {
  font-weight: 500;
  transition: color 0.2s;
}

.nav-desktop a:hover {
  color: var(--primary);
}

@media (min-width: 768px) {
  .header-icon.mobile-only {
    display: none;
  }
  
  .nav-desktop {
    display: flex;
  }
}

/* Hero Section */
.hero {
  position: relative;
  margin-top: 56px;
}

.hero-image-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/5;
  overflow: hidden;
  background-color: var(--muted);
}

@media (min-width: 768px) {
  .hero-image-container {
    aspect-ratio: 16/9;
  }
}

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.2) 50%, transparent);
}

.organizer-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.organizer-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
}

.organizer-name {
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content {
  position: absolute;
  bottom: 1.5rem;
  left: 1rem;
  right: 1rem;
}

.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  line-height: 1.3;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 1.875rem;
  }
}

.carousel-dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 9999px;
  background-color: rgba(255,255,255,0.5);
}

.carousel-dot.active {
  width: 24px;
  background-color: white;
}

/* Donation Section */
.donation-section {
  padding: 1.5rem 0;
}

.donation-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.progress-ring-container {
  position: relative;
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 4;
}

.progress-ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.5s ease;
}

.progress-percentage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.donation-info {
  flex: 1;
}

.amount-raised {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.amount-value {
  font-size: 1.25rem;
  font-weight: 700;
}

.amount-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.amount-goal {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-decoration: underline;
}

.last-donor {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
}

.btn {
  flex: 1;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  display: inline-block;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

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

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

/* Story Section */
.story-section {
  padding: 1.5rem 0;
}

.story-text {
  white-space: pre-line;
  line-height: 1.7;
  font-size: 1rem;
  color: var(--foreground);
}

/* Donors Section */
.donors-section {
  padding: 2rem 0;
}

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

.donors-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.donors-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.donors-count {
  background-color: var(--muted);
  color: var(--muted-foreground);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.btn-see-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-see-top:hover {
  background-color: var(--muted);
}

.btn-see-top svg {
  width: 16px;
  height: 16px;
}

.donors-list {
  list-style: none;
}

.donor-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.donor-item:last-child {
  border-bottom: none;
}

.donor-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.donor-info {
  flex: 1;
}

.donor-name {
  font-weight: 500;
}

.donor-amount-time {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.donor-amount-time strong {
  color: var(--foreground);
}

.btn-see-all {
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-see-all:hover {
  background-color: var(--muted);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 2.5rem;
}

.footer-country {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.country-selector {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  background: transparent;
  cursor: pointer;
}

.country-selector:hover {
  background-color: var(--muted);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.social-icon {
  color: var(--foreground);
  transition: color 0.2s;
}

.social-icon:hover {
  color: var(--primary);
}

.social-icon svg {
  width: 24px;
  height: 24px;
}

.app-store-badge {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.app-store-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--foreground);
  color: var(--background);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.app-store-btn svg {
  width: 24px;
  height: 24px;
}

.app-store-text {
  font-size: 0.75rem;
}

.app-store-text .small {
  font-size: 0.625rem;
  opacity: 0.8;
}

.app-store-text .bold {
  font-weight: 600;
}

.footer-copyright {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.footer-links {
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
}

.footer-link {
  display: block;
  padding: 0.5rem 0;
  color: var(--foreground);
  transition: text-decoration 0.2s;
}

.footer-link:hover {
  text-decoration: underline;
}

.privacy-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.privacy-icons {
  display: flex;
}

.privacy-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.privacy-icon.green {
  background-color: var(--primary);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.privacy-icon.blue {
  background-color: #3b82f6;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Sticky Donation Bar */
.sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background-color: var(--sticky-bar-bg);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.sticky-bar.visible {
  transform: translateY(0);
}

.sticky-bar-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.sticky-progress-ring {
  position: relative;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.sticky-progress-ring svg {
  transform: rotate(-90deg);
}

.sticky-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.3);
  stroke-width: 4;
}

.sticky-ring-fill {
  fill: none;
  stroke: var(--primary);
  stroke-width: 4;
  stroke-linecap: round;
}

.sticky-percentage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.sticky-info {
  flex: 1;
  min-width: 0;
}

.sticky-amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.sticky-amount-value {
  font-size: 1rem;
  font-weight: 700;
  color: white;
}

.sticky-amount-label {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

.sticky-donor {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sticky-buttons {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.sticky-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sticky-btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

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

.sticky-btn-primary {
  background-color: var(--primary);
  border: 2px solid var(--primary);
  color: white;
}

.sticky-btn-primary:hover {
  opacity: 0.9;
}

/* Two Column Layout for Desktop */
@media (min-width: 1024px) {
  .main-content {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
  }
  
  .main-left {
    flex: 2;
  }
  
  .main-right {
    flex: 1;
  }
  
  .donation-section.mobile-only {
    display: none;
  }
  
  .desktop-donation-card {
    display: block;
    position: sticky;
    top: 80px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
}

@media (max-width: 1023px) {
  .desktop-donation-card {
    display: none;
  }
  
  .main-right {
    display: none;
  }
}

/* ======================= */
/* DONATION PAGE STYLES    */
/* ======================= */

.donate-page {
  min-height: 100vh;
  background-color: var(--background);
}

.donate-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--background);
  z-index: 40;
  border-bottom: 1px solid var(--border);
}

.donate-header-content {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--foreground);
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--primary);
}

.back-link svg {
  width: 20px;
  height: 20px;
}

.donate-main {
  padding-top: 80px;
  padding-bottom: 2.5rem;
}

.donate-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 1rem;
}

.donate-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
}

.donate-subtitle {
  text-align: center;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.amount-btn {
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1rem;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.amount-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

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

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

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

.form-input-wrapper {
  position: relative;
}

.form-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
}

.form-input-icon svg {
  width: 20px;
  height: 20px;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(2, 169, 92, 0.1);
}

.form-input.has-icon {
  padding-left: 3rem;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.checkbox {
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
}

.checkbox-label {
  font-size: 1rem;
}

.payment-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--muted);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 2rem;
}

.payment-icon {
  width: 48px;
  height: 48px;
  background-color: #FF0000;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 0.625rem;
  line-height: 1.2;
  text-align: center;
}

.payment-info h3 {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.payment-info p {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.btn-donate-final {
  width: 100%;
  padding: 1rem;
  background-color: var(--primary);
  border: none;
  border-radius: 0.5rem;
  color: white;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-donate-final:hover {
  background-color: var(--primary-hover);
}

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

.security-note {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 1.5rem;
}
