/* MATW Project - Main Stylesheet */

/* CSS Variables */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --secondary: #1e293b;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --white: #ffffff;
  --light-gray: #f8fafc;
  --gray: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--secondary);
  background: var(--white);
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.heading-2 { font-size: 2.5rem; font-weight: 700; }
.heading-3 { font-size: 2rem; font-weight: 700; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
}

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

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

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

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

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

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

/* Header */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  background: var(--secondary);
  color: var(--white);
  padding: 8px 0;
  font-size: 14px;
}

.header-main {
  padding: 15px 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(rgba(30, 41, 59, 0.9), rgba(30, 41, 59, 0.8)), url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?w=1200');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 100px 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

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

/* Sections */
section {
  padding: 60px 0;
}

.section-padding {
  padding: 60px 0;
}

.bg-light {
  background: var(--light-gray);
}

.bg-white {
  background: var(--white);
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  color: var(--gray);
  font-size: 14px;
  margin-top: 5px;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.card:hover {
  transform: translateY(-5px);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card-text {
  color: var(--gray);
  margin-bottom: 15px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* Donation Form */
.donation-amounts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.amount-btn {
  padding: 15px;
  border: 2px solid var(--border);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
}

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

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

/* Progress Bars */
.progress-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

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

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

/* Footer */
footer {
  background: var(--secondary);
  color: var(--white);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

footer h4 {
  margin-bottom: 20px;
  color: var(--white);
}

footer a {
  color: var(--gray);
  text-decoration: none;
  display: block;
  margin-bottom: 10px;
}

footer a:hover {
  color: var(--white);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: var(--gray);
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

.chat-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.chat-window {
  display: none;
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  height: 450px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.chat-window.active {
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: var(--primary);
  color: var(--white);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: var(--light-gray);
}

.chat-input {
  padding: 15px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
}

.chat-input button {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 10px 15px;
  border-radius: 20px;
  cursor: pointer;
}

.message {
  margin-bottom: 10px;
  max-width: 80%;
}

.message.user {
  margin-left: auto;
  text-align: right;
}

.message .bubble {
  display: inline-block;
  padding: 10px 15px;
  border-radius: 15px;
  background: var(--primary);
  color: var(--white);
}

.message.support .bubble {
  background: var(--white);
  color: var(--secondary);
  border: 1px solid var(--border);
}

/* Tabs */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 30px;
}

.tab {
  padding: 15px 30px;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray);
}

.tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
  margin-bottom: -2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .header-content {
    flex-direction: column;
    gap: 20px;
  }
  
  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .donation-amounts {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-gray { color: var(--gray); }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 1rem; }
.grid { display: grid; }