/* CSS Variables - Tetrad Color Scheme */
:root {
  /* Primary Tetrad Colors */
  --primary-color: #6366f1;      /* Indigo */
  --secondary-color: #f59e0b;    /* Amber */
  --tertiary-color: #10b981;     /* Emerald */
  --quaternary-color: #ef4444;   /* Red */
  
  /* Darker variants */
  --primary-dark: #4338ca;
  --secondary-dark: #d97706;
  --tertiary-dark: #059669;
  --quaternary-dark: #dc2626;
  
  /* Lighter variants */
  --primary-light: #a5b4fc;
  --secondary-light: #fcd34d;
  --tertiary-light: #6ee7b7;
  --quaternary-light: #fca5a5;
  
  /* Neutral colors */
  --dark: #0f172a;
  --dark-alt: #1e293b;
  --medium: #64748b;
  --light: #f8fafc;
  --white: #ffffff;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-secondary: linear-gradient(135deg, var(--tertiary-color), var(--quaternary-color));
  --gradient-dark: linear-gradient(135deg, var(--dark), var(--dark-alt));
  
  /* Typography */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  
  /* Spacing */
  --section-padding: 5rem 0;
  --container-padding: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s ease;
  --transition-slow: 0.6s ease;
  
  /* Borders */
  --border-radius: 12px;
  --border-radius-lg: 20px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.2);
  
  /* Glass morphism */
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-backdrop: blur(20px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--dark);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
  font-size: clamp(1rem, 2vw, 1.125rem);
}

/* Global Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  font-family: var(--font-heading);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.95rem;
}

.btn:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-smooth);
}

.btn:hover:before {
  left: 100%;
}

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

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

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: var(--glass-backdrop);
}

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

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Header/Navigation */
.navbar {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border-bottom: 1px solid var(--glass-border);
  padding: 1rem 0;
  transition: all var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--white);
  text-decoration: none;
}

.brand-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-nav .nav-link {
  color: var(--white);
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-nav .nav-link:hover {
  color: var(--secondary-color);
  background: rgba(255, 255, 255, 0.1);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
  width: 1.5rem;
  height: 1.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.8), rgba(245, 158, 11, 0.6));
  z-index: 1;
}

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

.hero-title {
  color: var(--white) !important;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  color: var(--white) !important;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  opacity: 0.95;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.hero-animation {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--white);
  border-radius: 50%;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* Section Styles */
.section {
  padding: var(--section-padding);
  position: relative;
}

.section-title {
  text-align: center;
  color: var(--dark);
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--medium);
  font-size: 1.2rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Card Styles */
.card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-smooth);
  border: none;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.card-image {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-content {
  padding: 2rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Methodology Section */
.methodology-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  position: relative;
}

.methodology-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
}

.methodology-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Events Timeline */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  position: relative;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-date {
  background: var(--gradient-primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  min-width: 120px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.timeline-content {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  width: calc(50% - 2rem);
  position: relative;
}

.timeline-content h4 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.event-location {
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Community Section */
.community-card {
  text-align: center;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.community-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-secondary);
}

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

.community-card .card-image {
  margin-bottom: 1.5rem;
  border-radius: 50%;
  width: 150px;
  height: 150px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  border: 4px solid var(--tertiary-light);
}

.community-card .card-image img {
  border-radius: 50%;
}

.member-role {
  color: var(--tertiary-color);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Resources Section */
.resource-card {
  background: var(--light);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  border-left: 4px solid var(--secondary-color);
  transition: all var(--transition-smooth);
}

.resource-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-md);
  transform: translateX(10px);
}

.resource-card h4 a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.resource-card h4 a:hover {
  color: var(--primary-dark);
}

/* Blog Section */
.blog-card {
  background: var(--white);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.blog-date {
  color: var(--secondary-color);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

.read-more:hover {
  color: var(--primary-dark);
  transform: translateX(5px);
}

/* Contact Section */
.contact-form-wrapper {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.contact-form-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-primary);
}

.form-control {
  background: var(--light);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  padding: 1rem;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  background: var(--white);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
  outline: none;
}

select.form-control {
  cursor: pointer;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.footer-title {
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-subtitle {
  color: var(--secondary-light);
  margin-bottom: 1rem;
  font-weight: 600;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

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

.social-links a {
  color: var(--white);
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--border-radius);
  transition: all var(--transition-fast);
  font-weight: 500;
}

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

.footer-contact {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.2);
  margin: 2rem 0;
}

.footer-copyright {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Success Page */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: var(--white);
  text-align: center;
}

.success-content {
  max-width: 600px;
  padding: 3rem;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 2rem;
  display: block;
}

/* Privacy and Terms Pages */
.content-page {
  padding-top: 100px;
  min-height: 100vh;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.content-wrapper h1 {
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.content-wrapper h2 {
  color: var(--dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.content-wrapper p {
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 3rem;
  }
  
  .timeline-item:nth-child(odd) {
    flex-direction: column;
  }
  
  .timeline-content {
    width: 100%;
    margin-top: 1rem;
  }
  
  .timeline-date {
    min-width: auto;
    position: absolute;
    left: -60px;
    top: 0;
  }
  
  .contact-form-wrapper {
    padding: 2rem;
  }
  
  .social-links {
    flex-wrap: wrap;
  }
  
  .navbar-nav {
    text-align: center;
    margin-top: 1rem;
  }
}

@media (max-width: 576px) {
  :root {
    --section-padding: 3rem 0;
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .community-card {
    padding: 1.5rem;
  }
  
  .contact-form-wrapper {
    padding: 1.5rem;
  }
}

/* Morphing Animations */
@keyframes morph {
  0% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
  50% {
    border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
  }
  100% {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
  }
}

.morphing-bg {
  animation: morph 8s ease-in-out infinite;
}

/* AOS Animation Overrides */
[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

/* Parallax Effect */
.parallax {
  transform: translateZ(0);
  will-change: transform;
}

/* Utility Classes */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-light {
  background-color: var(--light) !important;
}

.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
}

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

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

/* Performance Optimizations */
.card-image,
.hero-section {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}