/* ============================================================
   MERM Design System 2.0 - CSS Implementation
   Modern, Spiritual, Accessible Design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ==================== ROOT VARIABLES ==================== */
:root {
  /* Primary Colors - Red (Action & Transformation) */
  --color-primary: #cb302c;
  --color-primary-dark: #a8241f;
  --color-primary-darker: #7e1b17;
  --color-primary-light: #df4d4a;
  --color-primary-lighter: #e67573;
  --color-primary-lightest: #f0a3a2;

  /* Secondary Colors - Blue (Spirituality & Trust) */
  --color-secondary: #0784be;
  --color-secondary-dark: #056b9c;
  --color-secondary-darker: #03486c;
  --color-secondary-light: #28a0d9;
  --color-secondary-lighter: #5dbce3;
  --color-secondary-lightest: #a1dbf0;

  /* Accent Colors - Golden Dawn (Blessings & Prophesy) */
  --color-accent: #FDB833;
  --color-accent-dark: #E0A200;
  --color-accent-darker: #C78A00;
  --color-accent-light: #FEC657;
  --color-accent-lighter: #FED87B;
  --color-accent-lightest: #FEF4E0;

  /* Neutral Colors - Foundation */
  --color-neutral-900: #1A1F35;
  --color-neutral-800: #2C3150;
  --color-neutral-700: #4B5563;
  --color-neutral-600: #8B92A3;
  --color-neutral-500: #D1D5DB;
  --color-neutral-400: #E5E7EB;
  --color-neutral-300: #F3F4F6;
  --color-neutral-200: #F9FAFB;
  --color-neutral-100: #FFFFFF;

  /* Semantic Colors */
  --color-success: #10B981;
  --color-success-light: #D1FAE5;
  --color-error: #EF4444;
  --color-error-light: #FEE2E2;
  --color-warning: #F59E0B;
  --color-warning-light: #FEF3C7;
  --color-info: #3B82F6;
  --color-info-light: #DBEAFE;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(26, 31, 53, 0.05);
  --shadow-sm: 0 2px 8px rgba(26, 31, 53, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 31, 53, 0.12);
  --shadow-lg: 0 8px 24px rgba(26, 31, 53, 0.15);
  --shadow-xl: 0 12px 32px rgba(230, 57, 70, 0.15);
  --shadow-2xl: 0 20px 40px rgba(26, 31, 53, 0.2);

  /* Border Radius */
  --radius-none: 0;
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 1, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-display: 'Playfair Display', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Fira Code', monospace;

  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;
}

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

html {
  scroll-behavior: smooth;
}

/* ==================== BODY ==================== */
body {
  font-family: var(--font-body);
  color: var(--color-neutral-900);
  background-color: var(--color-neutral-100);
  line-height: 1.75;
  font-size: 1rem;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: 3.75rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 3rem;
  letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

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

p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

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

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

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  min-height: 44px;
  font-family: var(--font-body);
  gap: 0.5rem;
  letter-spacing: 0.02em;
}

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

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

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

.btn-primary:active:not(:disabled) {
  background-color: var(--color-primary-darker);
  transform: translateY(0);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary:hover:not(:disabled) {
  background-color: var(--color-secondary-lightest);
  border-color: var(--color-secondary-dark);
}

.btn-secondary:active:not(:disabled) {
  background-color: var(--color-secondary-lighter);
  border-color: var(--color-secondary-darker);
}

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

.btn-accent:hover:not(:disabled) {
  background-color: var(--color-accent-dark);
  box-shadow: 0 4px 12px rgba(253, 184, 51, 0.2);
  transform: translateY(-2px);
}

.btn-accent:active:not(:disabled) {
  background-color: var(--color-accent-darker);
  transform: translateY(0);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-neutral-900);
  border: 1px solid var(--color-neutral-500);
}

.btn-ghost:hover:not(:disabled) {
  background-color: var(--color-neutral-300);
  border-color: var(--color-neutral-600);
}

.btn:disabled {
  background-color: var(--color-neutral-500);
  color: var(--color-neutral-600);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-height: 36px;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  min-height: 48px;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}

/* ==================== CARDS ==================== */
.card {
  background: var(--color-neutral-100);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  border: 1px solid var(--color-neutral-400);
  transition: all var(--transition-base);
}

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

.card--primary {
  border-left: 4px solid var(--color-primary);
}

.card--accent {
  border-left: 4px solid var(--color-accent);
}

.card--secondary {
  border-left: 4px solid var(--color-secondary);
}

/* ==================== EVENT CARDS ==================== */
.event-card {
  background: var(--color-neutral-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.event-header {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.event-header::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
}

.event-icon {
  font-size: 3rem;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.event-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--color-accent);
  color: var(--color-neutral-900);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 3;
}

.event-badge--live {
  background: var(--color-error);
  color: white;
}

.event-badge--past {
  background: var(--color-neutral-400);
  color: var(--color-neutral-600);
}

.event-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

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

.event-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-neutral-900);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.event-description {
  font-size: 0.95rem;
  color: var(--color-neutral-700);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.event-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  text-decoration: none;
}

.event-cta:hover {
  color: var(--color-primary-dark);
  transform: translateX(4px);
}

/* ==================== SERMON CARDS ==================== */
.sermon-card {
  background: var(--color-neutral-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

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

.sermon-image {
  position: relative;
  padding-top: 56.25%;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-secondary-darker) 0%, var(--color-secondary) 100%);
}

.sermon-image-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.sermon-play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  background: var(--color-primary);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: all var(--transition-base);
  z-index: 2;
  padding: 0;
}

.sermon-card:hover .sermon-play-button {
  opacity: 1;
  background: var(--color-primary-dark);
  transform: translate(-50%, -50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(230, 57, 70, 0.3);
}

.sermon-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sermon-category {
  display: inline-block;
  background: var(--color-secondary-lightest);
  color: var(--color-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  width: fit-content;
}

.sermon-speaker {
  color: var(--color-accent);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  letter-spacing: 0.02em;
}

.sermon-title {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--color-neutral-900);
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

.sermon-date {
  color: var(--color-neutral-600);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.sermon-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all var(--transition-base);
  margin-top: auto;
  width: fit-content;
}

.sermon-cta:hover {
  color: var(--color-primary-dark);
  transform: translateX(4px);
}

/* ==================== HERO SECTION ==================== */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--color-secondary-darker) 0%, var(--color-neutral-900) 100%);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(230, 57, 70, 0.1) 0%, transparent 50%);
  z-index: 1;
  pointer-events: none;
}

.hero-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1400px;
  width: 100%;
  z-index: 10;
  position: relative;
  margin: 0 auto;
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
  background: var(--color-accent);
  color: var(--color-neutral-900);
  display: inline-block;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  animation: slideInLeft 0.6s ease-out;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 3.75rem;
  font-weight: 900;
  line-height: 1.1;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
  max-width: 90%;
}

.hero-subtext {
  font-size: 1.25rem;
  color: var(--color-accent);
  font-weight: 500;
  line-height: 1.6;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.3s both;
  max-width: 85%;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-visual {
  position: relative;
  min-height: 500px;
  animation: fadeIn 0.8s ease-out 0.4s both;
}

.hero-visual svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* ==================== GRIDS ==================== */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.sermons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

/* ==================== UTILITY CLASSES ==================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

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

/* ==================== REDUCED MOTION ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .hero-subtext {
    font-size: 1rem;
    max-width: 100%;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-visual {
    min-height: 300px;
  }

  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  h3 { font-size: 1.5rem; }

  .events-grid,
  .sermons-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .event-header {
    height: 100px;
  }

  .event-icon {
    font-size: 2rem;
  }
}

