/* Design System Variables */
:root {
  --bg: #0A0A0B;
  --surface: #111215;
  --surface-2: #16181C;
  --text: #EDEEF1;
  --muted: #C9CAD1;
  --line: #24262B;
  --red: #D90429;
  --red-600: #B10321;
  --glow: 0 10px 30px rgba(217, 4, 41, 0.25);
  --shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --radius-sm: 10px;
  --transition: 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: clamp(16px, 1.8vw, 18px);
  line-height: 1.6;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

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

h1 {
  font-size: clamp(28px, 4.5vw, 48px);
}

h2 {
  font-size: clamp(22px, 3.2vw, 30px);
}

.section__title {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
}

.section__action {
  text-align: center;
  margin-top: 40px;
}

/* Header & Navigation */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(17, 18, 21, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  z-index: 1000;
  transition: var(--transition);
}

.nav__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.logo span {
  color: var(--red);
}

.nav__list {
  display: flex;
  list-style: none;
  gap: 24px;
  align-items: center;
}

.nav__link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  padding: 8px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--red);
  transition: var(--transition);
}

.nav__link:hover::after,
.nav__link:focus::after {
  width: 100%;
}

.nav__link:hover,
.nav__link:focus {
  color: var(--red);
}

.btn--small {
  padding: 10px 20px;
  min-height: 44px;
  font-size: 14px;
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger__bar {
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 2px 0;
  transition: var(--transition);
  transform-origin: center;
}

/* Drawer */
.drawer {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  z-index: 1002;
  transition: var(--transition);
}

.drawer__content {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--surface);
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
  z-index: 2;
  padding: 80px 24px 24px;
  overflow-y: auto;
}

.drawer__nav {
  margin-top: 32px;
}

.drawer__list {
  list-style: none;
}

.drawer__item {
  margin-bottom: 16px;
}

.drawer__link {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  padding: 12px 0;
  transition: var(--transition);
}

.drawer__link:hover,
.drawer__link:focus {
  color: var(--red);
}

.drawer__donate {
  color: var(--red) !important;
  font-weight: 600 !important;
}

.drawer__backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1;
}

/* Drawer Open State */
body.nav-open .drawer {
  right: 0;
}

body.nav-open .drawer__backdrop {
  opacity: 1;
  visibility: visible;
}

body.nav-open .hamburger__bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .hamburger__bar:nth-child(2) {
  opacity: 0;
}

body.nav-open .hamburger__bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Announcement Banner */
.announcement {
  background: var(--red);
  color: white;
  padding: 12px 0;
  margin-top: 76px;
}

.announcement__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.announcement__title {
  font-size: 18px;
  margin: 0;
  font-weight: 600;
}

.announcement__text {
  margin: 0;
  flex: 1;
}

.announcement__link {
  color: white;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.announcement__link:hover,
.announcement__link:focus {
  text-decoration: underline;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 0 80px;
  background: var(--surface);
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero__title {
  margin-bottom: 24px;
  color: var(--text);
}

.hero__subtitle {
  font-size: clamp(18px, 2.5vw, 22px);
  color: var(--muted);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.hero__badge {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(217, 4, 41, 0.2);
  color: var(--red);
  border-radius: var(--radius);
  font-weight: 600;
}

.hero__glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  height: 80vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(circle, rgba(217, 4, 41, 0.15) 0%, transparent 70%);
  z-index: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  min-height: 54px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 16px;
}

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

.btn--primary:hover,
.btn--primary:focus {
  background: var(--red-600);
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(217, 4, 41, 0.35);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

.btn--outline:hover,
.btn--outline:focus {
  background: rgba(237, 238, 241, 0.1);
  transform: translateY(-2px);
}

/* Features Section */
.features {
  padding: 80px 0;
  background: var(--bg);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  height: 100%;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
  border-color: rgba(217, 4, 41, 0.3);
}

.card__accent {
  height: 6px;
  background: var(--red);
  width: 100%;
}

.card__content {
  padding: 32px;
  text-align: center;
  position: relative;
}

.card__icon {
  font-size: 40px;
  color: var(--red);
  margin-bottom: 24px;
}

.card__title {
  font-size: 22px;
  margin-bottom: 16px;
}

.card__text {
  color: var(--muted);
  margin-bottom: 20px;
}

.card__link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.card__link:hover,
.card__link:focus {
  gap: 12px;
}

/* Events Section */
.events {
  padding: 80px 0;
  background: var(--surface-2);
}

.events__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.event {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--line);
}

.event:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--red);
}

.event--empty {
  opacity: 0.7;
  text-align: center;
  padding: 40px 24px;
}

.event__content {
  padding: 24px;
}

.event__title {
  font-size: 20px;
  margin-bottom: 12px;
}

.event__meta {
  color: var(--muted);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event__meta i {
  margin-right: 8px;
  width: 16px;
}

.event__location {
  display: flex;
  align-items: center;
}

.event__link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.event__link:hover,
.event__link:focus {
  gap: 12px;
}

/* Sermons Section */
.sermons {
  padding: 80px 0;
  background: var(--bg);
}

.sermons__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.sermon {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--line);
}

.sermon:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--red);
}

.sermon--empty {
  opacity: 0.7;
  text-align: center;
  padding: 40px 24px;
}

.sermon__content {
  padding: 24px;
}

.sermon__title {
  font-size: 20px;
  margin-bottom: 12px;
}

.sermon__preacher {
  color: var(--muted);
  margin-bottom: 12px;
  font-style: italic;
}

.sermon__desc {
  margin-bottom: 20px;
  color: var(--muted);
}

.sermon__link {
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.sermon__link:hover,
.sermon__link:focus {
  gap: 12px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--red);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.badge--secondary {
  background: var(--surface-2);
  color: var(--text);
}

/* Footer */
.footer {
  background: var(--surface);
  padding: 64px 0 24px;
  border-top: 1px solid var(--line);
}

.footer__content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 48px;
}

.footer__title {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--text);
}

.footer__text {
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.footer__socials {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.footer__social-link:hover,
.footer__social-link:focus {
  background: var(--red);
  color: white;
  transform: translateY(-3px);
}

.footer__form {
  display: flex;
  margin-top: 12px;
}

.footer__input {
  flex: 1;
  padding: 12px 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  color: var(--text);
  outline: none;
}

.footer__input:focus {
  border-color: var(--red);
}

.footer__button {
  padding: 12px 16px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  transition: var(--transition);
}

.footer__button:hover,
.footer__button:focus {
  background: var(--red-600);
}

.footer__bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  text-align: center;
}

.footer__copy {
  color: var(--muted);
  font-size: 14px;
}

/* Focus Styles */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .nav__list {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .announcement__content {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .features__grid,
  .events__grid,
  .sermons__grid {
    grid-template-columns: 1fr;
  }
  
  .footer__content {
    grid-template-columns: 1fr;
  }
  
  .footer__form {
    flex-direction: column;
  }
  
  .footer__input {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }
  
  .footer__button {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }
  
  .hero {
    padding: 80px 0 60px;
  }
  
  .features,
  .events,
  .sermons {
    padding: 60px 0;
  }
  
  .card__content {
    padding: 24px;
  }
  
  .event__content,
  .sermon__content {
    padding: 20px;
  }
}