/* ============================================================
   A.M.E. ST. Joseph's Church — Main Stylesheet
   ============================================================ */

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

:root {
  --purple-dark:   #2D0A4E;
  --purple-mid:    #5B2A8A;
  --purple-light:  #8B5BB1;
  --purple-xlight: #EDE0F7;
  --gold-primary:  #C9A84C;
  --gold-light:    #E8C96E;
  --gold-dark:     #9E7B2A;
  --white:         #FFFFFF;
  --off-white:     #FAF7F2;
  --text-dark:     #1A1A2E;
  --text-mid:      #4A4A6A;
  --text-light:    #8A8AAA;
  --border:        #E0D6EC;
  --shadow-sm:     0 2px 8px rgba(45,10,78,0.10);
  --shadow-md:     0 4px 20px rgba(45,10,78,0.15);
  --shadow-lg:     0 8px 40px rgba(45,10,78,0.20);
  --radius:        8px;
  --radius-lg:     16px;
  --radius-xl:     24px;
  --transition:    all 0.3s ease;
  --font-heading:  'Playfair Display', Georgia, serif;
  --font-body:     'Open Sans', 'Segoe UI', sans-serif;
  --max-width:     1200px;
  --nav-height:    72px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--off-white);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--text-dark);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
p  { color: var(--text-mid); }

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 80px 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gold-primary);
  color: var(--purple-dark);
  border-color: var(--gold-primary);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--purple-dark);
  transform: translateY(-2px);
}
.btn-purple {
  background: var(--purple-mid);
  color: var(--white);
  border-color: var(--purple-mid);
}
.btn-purple:hover {
  background: var(--purple-dark);
  border-color: var(--purple-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-sm { padding: 8px 20px; font-size: 0.875rem; }

/* ---- Navigation ---- */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--purple-dark);
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
  transition: var(--transition);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.nav-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  line-height: 1.1;
}
.nav-logo {
  height: 44px;
  width: 44px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}
.nav-brand .brand-ame {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.nav-brand .brand-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  color: rgba(255,255,255,0.85);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--gold-primary);
  background: rgba(201,168,76,0.12);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ---- Hero ---- */
.hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-mid) 50%, #3D1060 100%);
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(201,168,76,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; padding: 40px 24px; }
.hero-badge {
  display: inline-block;
  background: rgba(201,168,76,0.2);
  color: var(--gold-primary);
  border: 1px solid var(--gold-primary);
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.hero .tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255,255,255,0.85);
  margin-bottom: 40px;
  font-style: italic;
  font-family: var(--font-heading);
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: bounce 2s infinite;
}
.hero-scroll::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---- Section Header ---- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-label {
  display: inline-block;
  color: var(--gold-dark);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-header h2 { color: var(--purple-dark); margin-bottom: 16px; }
.section-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  max-width: 80px;
  height: 1px;
  background: var(--gold-primary);
}
.section-divider-cross {
  color: var(--gold-primary);
  font-size: 1.1rem;
}

/* ---- Service Times ---- */
.service-times { background: var(--white); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--off-white);
  border: 1px solid var(--border);
  border-top: 4px solid var(--gold-primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  transition: var(--transition);
}
.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.service-icon {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--purple-mid), var(--purple-dark));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
}
.service-card h3 { color: var(--purple-dark); font-size: 1.1rem; margin-bottom: 8px; }
.service-time { font-size: 1.5rem; font-weight: 700; color: var(--gold-dark); font-family: var(--font-heading); }
.service-day { color: var(--text-light); font-size: 0.875rem; }

/* ---- Cards ---- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }

.card-image {
  height: 200px;
  background: linear-gradient(135deg, var(--purple-mid), var(--purple-dark));
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-image-placeholder { font-size: 3rem; color: rgba(255,255,255,0.4); }

.card-body { padding: 24px; }
.card-type {
  display: inline-block;
  background: var(--purple-xlight);
  color: var(--purple-mid);
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.card-type.sermon  { background: #EDE0F7; color: var(--purple-mid); }
.card-type.event   { background: #FFF3DC; color: #9E7B2A; }
.card-type.update  { background: #E8F5E9; color: #2E7D32; }
.card-type.program { background: #E3F2FD; color: #1565C0; }
.card-type.gallery { background: #FCE4EC; color: #C2185B; }

.card-body h3 { color: var(--purple-dark); margin-bottom: 8px; font-size: 1.15rem; }
.card-body p  { color: var(--text-mid); font-size: 0.9rem; margin-bottom: 16px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-light);
}
.card-meta span { display: flex; align-items: center; gap: 4px; }

/* Event date badge */
.event-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, var(--purple-mid), var(--purple-dark));
  color: var(--white);
  border-radius: var(--radius);
  padding: 8px 14px;
  min-width: 56px;
  text-align: center;
  margin-right: 16px;
  flex-shrink: 0;
}
.event-date-badge .month {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-light);
}
.event-date-badge .day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

/* ---- Post Grid ---- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

/* ---- Scripture Banner ---- */
.scripture-banner {
  background: linear-gradient(135deg, var(--purple-dark), var(--purple-mid));
  padding: 80px 0;
  text-align: center;
}
.scripture-text {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  color: var(--white);
  font-style: italic;
  max-width: 800px;
  margin: 0 auto 16px;
  line-height: 1.6;
}
.scripture-ref {
  color: var(--gold-primary);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple-mid) 100%);
  padding: 120px 0 60px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p  { color: rgba(255,255,255,0.8); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ---- Tabs / Filters ---- */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-tab {
  padding: 8px 20px;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--white);
  color: var(--text-mid);
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}
.filter-tab:hover { border-color: var(--purple-light); color: var(--purple-mid); }
.filter-tab.active {
  background: var(--purple-mid);
  border-color: var(--purple-mid);
  color: var(--white);
}

/* ---- Footer ---- */
.site-footer {
  background: var(--purple-dark);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .brand-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--white);
  margin-bottom: 12px;
}
.footer-brand p { font-size: 0.875rem; line-height: 1.7; }
.footer-col h4 {
  color: var(--gold-primary);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.75);
  font-size: 0.875rem;
  transition: var(--transition);
}
.footer-col ul li a:hover { color: var(--gold-primary); }
.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 0.875rem;
}
.footer-contact-icon { color: var(--gold-primary); flex-shrink: 0; margin-top: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  flex-wrap: wrap;
  gap: 12px;
}
.social-links { display: flex; gap: 12px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: var(--transition);
}
.social-link:hover {
  background: var(--gold-primary);
  border-color: var(--gold-primary);
  color: var(--purple-dark);
}

/* ---- Forms ---- */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--purple-mid);
  box-shadow: 0 0 0 3px rgba(91,42,138,0.12);
}
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---- Alert ---- */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 20px;
  border-left: 4px solid;
}
.alert-success { background: #E8F5E9; color: #2E7D32; border-color: #4CAF50; }
.alert-error   { background: #FFEBEE; color: #C62828; border-color: #EF5350; }
.alert-info    { background: #E3F2FD; color: #1565C0; border-color: #42A5F5; }

/* ---- Empty State ---- */
.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-light);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { color: var(--text-mid); margin-bottom: 8px; }

/* ---- Loading Spinner ---- */
.spinner {
  display: inline-block;
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--purple-mid);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.loading-container { text-align: center; padding: 60px 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  section { padding: 60px 0; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: var(--purple-dark); padding: 16px; gap: 4px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
