:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #5b6775;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --accent: #22c55e;
  --border: rgba(15, 23, 42, 0.08);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

main {
  position: relative;
  z-index: 1;
}

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

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

button,
input,
textarea {
  font: inherit;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: relative;
  background: transparent;
  border-bottom: transparent;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.hero-section {
  margin-top: -6rem;
  padding-top: calc(6rem + 2rem);
  min-height: calc(100vh + 6rem);
}

.header-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.header-login:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.header-login:focus-visible {
  outline: 3px solid rgba(29, 78, 216, 0.3);
  outline-offset: 3px;
}

.brand {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff;
}

.ccc-logo {
  max-width: 60px;
  height: auto;
}

.site-nav {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
}

.site-nav a,
.site-nav .nav-item > a {
  color: #fff;
  transition: color 0.2s ease;
}

.site-nav a:hover,
.site-nav .nav-item > a:hover {
  color: #e2e8f0;
}

.nav-item {
  position: relative;
  padding-bottom: 0.5rem;
}

.nav-item::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
  pointer-events: auto;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
  min-width: 200px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  padding: 0.5rem 0;
  z-index: 40;
  margin-top: 0.25rem;
}

.nav-item:hover .dropdown-menu,
.nav-item:focus-within .dropdown-menu,
.dropdown-menu:hover {
  display: flex;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: rgba(15, 23, 42, 0.05);
}

.youtube-logo {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s ease;
}

.youtube-logo:hover {
  color: var(--text);
}

.facebook-logo {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s ease;
}

.facebook-logo:hover {
  color: var(--text);
}

.social-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.instagram-logo {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s ease;
}

.instagram-logo:hover {
  color: var(--text);
}

button.button,
.button {
  border: none;
  border-radius: 999px;
  padding: 0.9rem 1.6rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
  background: var(--primary);
  color: #fff;
}

.button-primary {
  background: var(--primary);
  color: #fff;
}

.button-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.button-secondary {
  background: #eef2ff;
  color: var(--primary);
}

.button-secondary:hover {
  background: #e0e7ff;
}

.button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.button-grid .button {
  width: 100%;
}
/* 
.hero-section {
  margin-top: -6rem;
  padding-top: calc(6rem + 2rem);
  background-image: url("images/Mipi_worshiping.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
}
 */
.hero-section {
  margin-top: -6rem;
  padding-top: 8rem;
  background-image: url("images/Mipi_worshiping.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: grid;
  align-items: center;
  justify-items: center;
  text-align: center;
  color: #fff;
  font-family: "Times New Roman", Times, serif;
}

.about-hero {
  background-image: url("images/Pastors.jpeg");
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
  justify-items: center;
  width: 100%;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.hero-section h1 {
  color: #fff;
}

.hero-section p {
  color: #fff;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  justify-content: center;
}

.hero-section h1,
.section-header h2 {
  font-size: clamp(2.6rem, 4vw, 4rem);
  margin: 0;
  line-height: 1.2;
}

.hero-section p,
.section-header p,
.feature-card p,
.ministry-card p,
.sermon-card p,
.event-item p,
.contact-list li {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.hero-image-card {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.section {
  padding: 4rem 0;
}

.with-bg {
  background: #ffffff;
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.reverse-grid {
  direction: rtl;
}

.reverse-grid > * {
  direction: ltr;
}

.feature-cards,
.cards-grid,
.sermon-cards,
.event-list {
  display: grid;
  gap: 1.5rem;
}

.feature-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.feature-card,
.ministry-card,
.sermon-card,
.event-item,
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.8rem;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.06);
}

.ministry-card {
  min-height: 190px;
}

.cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2.5rem;
}

.sermon-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
}

.sermon-card h3,
.ministry-card h3,
.event-item h3,
.feature-card h3 {
  margin-top: 0;
}

.link-button {
  display: inline-flex;
  margin-top: 1.2rem;
  color: var(--primary);
  font-weight: 600;
}

.event-image-card {
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.event-image-card img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.events-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.4fr);
  gap: 2rem;
  align-items: start;
}

.calendar-panel,
.year-list-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.panel-header {
  margin-bottom: 1.5rem;
}

.panel-header h2 {
  margin: 0.35rem 0 0;
  font-size: clamp(1.75rem, 2vw, 2.6rem);
}

.calendar-shell {
  display: grid;
  gap: 1.5rem;
}

.calendar-action-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.calendar-title {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.15;
}

.calendar-button,
.text-btn,
.stripped-btn {
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  border-radius: 999px;
}

.calendar-button:hover,
.text-btn:hover,
.stripped-btn:hover {
  background: rgba(15, 23, 42, 0.06);
}

.calendar-button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.calendar-table-wrapper {
  overflow-x: auto;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  table-layout: fixed;
}

.calendar-table th {
  padding: 1rem 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.calendar-table td {
  padding: 0.25rem;
  vertical-align: top;
  width: calc(100% / 7);
}

.calendar-day {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 0.85rem 0.5rem;
  border-radius: 20px;
  text-align: center;
  position: relative;
}

.calendar-day--other {
  color: rgba(15, 23, 42, 0.35);
}

.calendar-day--today {
  background: rgba(29, 78, 216, 0.08);
  color: var(--primary);
  font-weight: 700;
}

.calendar-day--event {
  background: rgba(34, 197, 94, 0.1);
}

.calendar-day--event::after {
  content: '';
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.calendar-day span {
  font-size: 0.95rem;
}

.calendar-item h3,
.year-events .event-item h3 {
  margin: 0;
}

.year-events .event-item p {
  margin: 0.55rem 0 0;
}

@media (max-width: 960px) {
  .events-layout {
    grid-template-columns: 1fr;
  }
}

.image-carousel {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #f0f0f0;
  aspect-ratio: 1 / 1;
}

.carousel-track {
  display: flex;
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.carousel-slide.active {
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 999px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-button:hover {
  background: rgba(255, 255, 255, 1);
  transform: translateY(-50%) scale(1.1);
}

.carousel-button:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
  left: 1rem;
}

.carousel-next {
  right: 1rem;
}

.carousel-indicators {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-indicator.active {
  background: rgba(255, 255, 255, 1);
}

.contact-cta {
  padding: 3rem 0;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.contact-card h2 {
  margin: 0 0 0.6rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  background: #f8fafc;
  border-radius: 24px;
  padding: 2rem;
}

.contact-form label {
  display: grid;
  gap: 0.65rem;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
}

.site-footer {
  padding: 2rem 0;
  background: #0f172a;
  color: #fff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 960px) {
  .hero-grid,
  .split-grid,
  .cards-grid,
  .sermon-cards,
  .feature-cards {
    grid-template-columns: 1fr;
  }

  .site-nav {
    justify-content: center;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .hero-section {
    padding-top: 3rem;
  }

  .hero-section h1,
  .section-header h2 {
    font-size: 2.4rem;
  }

  .contact-card,
  .feature-cards,
  .cards-grid,
  .sermon-cards,
  .event-list {
    gap: 1rem;
  }
}
