/* ============================================
   Living Faith Fellowship Church
   Shared Stylesheet
   ============================================ */

/* --- CSS Variables / Theme --- */
:root {
  --purple-deep: #4a3c99;
  --purple-mid: #6b5ce7;
  --purple-light: #a78bfa;
  --blue-accent: #38a3d6;
  --blue-light: #7dd3fc;
  --gray-warm: #6b7280;
  --gray-light: #faf9f7;
  --navy: #1c2545;
  --white: #fffffe;
  --text-dark: #1f2937;
  --text-body: #3d3a3a;
  --text-muted: #6e6a6a;
  --border: #ede9e3;
  --shadow-sm: 0 1px 3px rgba(60,40,10,0.07);
  --shadow-md: 0 4px 16px rgba(60,40,10,0.09);
  --shadow-lg: 0 8px 32px rgba(60,40,10,0.11);
  --radius: 10px;
  --radius-lg: 18px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --warm-cream: #fdf8f2;
  --warm-gold: #c9a85c;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text-body);
  background: var(--warm-cream);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  color: var(--purple-deep);
  line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }

p {
  margin-bottom: 1rem;
  max-width: 72ch;
}

blockquote {
  font-style: italic;
  color: var(--text-muted);
  margin: 1.25rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid #c9a85c;
  background: rgba(201, 168, 92, 0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* --- Header --- */
.site-header {
  background: var(--white);
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}

.logo img {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: var(--purple-deep);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

/* Navigation */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 110;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--navy);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

.main-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.main-nav a {
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
  letter-spacing: 0.01em;
}

.main-nav a:hover,
.main-nav a.active {
  background: rgba(74, 60, 153, 0.08);
  color: var(--purple-deep);
}

.main-nav a.nav-cta {
  background: var(--purple-deep);
  color: white;
  padding: 8px 20px;
}

.main-nav a.nav-cta:hover {
  background: var(--purple-mid);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 24px;
  overflow: hidden;
  background: var(--navy);
}

/* Animated cloud/sky background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(26, 39, 68, 0.55) 0%,
    rgba(74, 60, 153, 0.5) 40%,
    rgba(56, 163, 214, 0.35) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.3);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
}

.hero-subtitle {
  color: rgba(255,255,255,0.85);
  font-size: 1.15rem;
  margin-bottom: 36px;
  font-weight: 400;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 50px;
  letter-spacing: 0.04em;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.btn-primary {
  background: var(--white);
  color: var(--purple-deep);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  background: var(--purple-light);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  transform: translateY(-2px);
}

/* --- Page Content Sections --- */
.page-content {
  background: var(--white);
  padding: 60px 40px;
  max-width: 960px;
  margin: 0 auto;
  border-top: 3px solid rgba(201,168,92,0.25);
}

.page-banner {
  background: linear-gradient(
    160deg,
    rgba(26, 39, 68, 0.75),
    rgba(74, 60, 153, 0.7)
  ), url('images/clouds-bg.png');
  background-size: cover;
  background-position: center;
  padding: 80px 24px 60px;
  text-align: center;
}

.page-banner h1 {
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, #c9a85c, transparent);
}

/* Giving cards */
.giving-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.giving-card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.giving-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(201,168,92,0.35);
}

.giving-card h3 {
  margin-bottom: 10px;
  color: var(--purple-deep);
}

.giving-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.giving-card a {
  color: var(--purple-mid);
  font-weight: 600;
}

.giving-card a:hover {
  color: var(--purple-deep);
}

/* Pastor section */
.pastor-layout {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.pastor-image {
  width: 280px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.pastor-image .placeholder-img {
  width: 100%;
  height: 340px;
  background: linear-gradient(135deg, var(--purple-deep), var(--blue-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: rgba(255,255,255,0.4);
}

.pastor-text {
  flex: 1;
  min-width: 280px;
}

/* Map iframes */
.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

.map-container iframe {
  width: 100%;
  height: 350px;
  border: 0;
  display: block;
}

/* --- Calendar Section --- */
.calendar-section {
  background: var(--white);
  max-width: 960px;
  margin: 0 auto;
  padding: 60px 40px;
  border-top: 1px solid var(--border);
}

.calendar-wrapper {
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.calendar-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: var(--purple-deep);
}

.calendar-nav {
  display: flex;
  gap: 8px;
}

.calendar-nav button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: var(--text-dark);
}

.calendar-nav button:hover {
  background: var(--purple-deep);
  color: white;
  border-color: var(--purple-deep);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day-label {
  text-align: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  background: var(--white);
  border: 1px solid transparent;
}

.calendar-day:hover {
  border-color: var(--purple-light);
  box-shadow: var(--shadow-sm);
}

.calendar-day.empty {
  background: transparent;
  cursor: default;
  border: none;
}

.calendar-day.empty:hover {
  border-color: transparent;
  box-shadow: none;
}

.calendar-day.today {
  background: var(--purple-deep);
  color: white;
  font-weight: 700;
}

.calendar-day.has-event::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-accent);
  position: absolute;
  bottom: 6px;
}

.calendar-day.today.has-event::after {
  background: var(--white);
}

/* Event list */
.events-panel {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.events-panel h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--purple-deep);
}

.event-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: var(--white);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.event-item:hover {
  box-shadow: var(--shadow-sm);
}

.event-date-badge {
  background: var(--purple-deep);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  min-width: 50px;
  flex-shrink: 0;
}

.event-date-badge .month {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.event-date-badge .day {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
}

.event-info h5 {
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 2px;
  font-size: 0.95rem;
}

.event-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.event-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.event-actions button {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.event-actions button:hover {
  background: var(--gray-light);
}

.event-actions button.delete-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Add event form */
.add-event-form {
  margin-top: 20px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  border: 2px dashed var(--border);
}

.add-event-form h4 {
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.form-row input,
.form-row select,
.form-row textarea {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  background: var(--gray-light);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(107, 92, 231, 0.12);
  background: var(--white);
}

.form-row textarea {
  resize: vertical;
  min-height: 70px;
}

.btn-add-event {
  background: var(--purple-deep);
  color: white;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
}

.btn-add-event:hover {
  background: var(--purple-mid);
  transform: translateY(-1px);
}

.no-events {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-style: italic;
}

/* --- Service Times Banner --- */
.service-times {
  background: linear-gradient(170deg, var(--navy) 0%, #231c50 100%);
  color: white;
  text-align: center;
  padding: 56px 24px;
  border-top: 3px solid rgba(201,168,92,0.4);
}

.service-times h2 {
  color: white;
  margin-bottom: 8px;
}

.service-times p {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  margin: 0 auto;
}

.times-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.time-card {
  text-align: center;
}

.time-card .day-label {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f0d090;
  margin-bottom: 6px;
}

.time-card .time-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 600;
}

/* --- Footer --- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding: 48px 40px 32px;
}

.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-info {
  max-width: 360px;
}

.footer-info .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer-info .footer-logo img {
  height: 36px;
}

.footer-info .footer-logo span {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700;
  color: white;
  font-size: 1.1rem;
}

.footer-contact div {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.footer-contact a {
  color: rgba(255,255,255,0.8);
}

.footer-contact a:hover {
  color: var(--blue-light);
}

.footer-social {
  display: flex;
  gap: 14px;
  align-items: center;
}

.footer-social a {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1.2rem;
}

.footer-social a:hover {
  background: var(--purple-mid);
  transform: translateY(-2px);
}

.footer-bottom {
  max-width: 960px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* --- Animations --- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.8s ease-out both;
}

.fade-up-delay-1 { animation-delay: 0.15s; }
.fade-up-delay-2 { animation-delay: 0.3s; }
.fade-up-delay-3 { animation-delay: 0.45s; }

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
  .site-header {
    padding: 12px 18px;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 80px 32px 32px;
    gap: 4px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.35s ease;
    z-index: 105;
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav a {
    padding: 12px 16px;
    font-size: 1rem;
    width: 100%;
  }

  .hero {
    min-height: 70vh;
    padding: 40px 18px;
  }

  .page-content,
  .calendar-section {
    padding: 40px 20px;
  }

  .pastor-layout {
    flex-direction: column;
  }

  .pastor-image {
    width: 100%;
  }

  .giving-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
  }

  .site-footer {
    padding: 36px 20px 24px;
  }

  .calendar-day {
    aspect-ratio: auto;
    padding: 8px 2px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .calendar-grid {
    gap: 2px;
  }

  .calendar-day {
    font-size: 0.8rem;
  }
}
