/* ============================================
   Christian Faith Tabernacle - Shared Styles
   Blue Theme
   ============================================ */

:root {
  --primary-dark: #1a3a5c;
  --primary: #2b6cb0;
  --primary-light: #3b82c4;
  --accent-bg: #eef4fb;
  --page-bg: #f0f4f8;
  --text: #222;
  --text-light: #555;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Navigation ── */
nav {
  background: var(--primary-dark);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0.9rem 0;
  letter-spacing: 0.5px;
  text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }

.nav-links {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.nav-links a {
  color: #c9ddf0;
  text-decoration: none;
  padding: 0.9rem 0.85rem;
  display: block;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  text-decoration: none;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 5rem 1.5rem 4rem;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.hero .subtitle {
  font-size: 1.15rem;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

.hero .tagline {
  font-size: 1rem;
  opacity: 0.75;
  font-style: italic;
}

/* ── Page Header (used on inner pages instead of full hero) ── */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: var(--white);
  text-align: center;
  padding: 3rem 1.5rem;
}

.page-header h1 {
  font-size: 2rem;
  letter-spacing: 0.5px;
}

/* ── Sections ── */
section {
  padding: 3.5rem 1.5rem;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

section h2 {
  text-align: center;
  color: var(--primary-dark);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  position: relative;
}

section h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background: var(--primary);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* ── Cards ── */
.card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

/* ── Service Cards ── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.service-card {
  background: var(--accent-bg);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: transform 0.15s, box-shadow 0.15s;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.service-card .day {
  font-weight: 700;
  color: var(--primary-dark);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.service-card .time {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.service-card .name {
  color: #444;
  font-size: 0.95rem;
  margin-top: 0.15rem;
}

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-item h3 {
  color: var(--primary-dark);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.contact-item p,
.contact-item a {
  color: var(--text-light);
  font-size: 0.9rem;
  text-decoration: none;
}

.contact-item a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ── Calendar ── */
.calendar-wrapper {
  max-width: 700px;
  margin: 0 auto;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.cal-header h3 {
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.cal-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.cal-btn:hover {
  background: var(--primary-dark);
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-day-name {
  background: var(--primary-dark);
  color: var(--white);
  padding: 0.5rem 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.cal-day {
  background: #f7fafd;
  padding: 0.55rem 0.25rem;
  font-size: 0.85rem;
  min-height: 48px;
  cursor: pointer;
  border-radius: 4px;
  position: relative;
  transition: background 0.15s;
}

.cal-day:hover {
  background: #dce8f5;
}

.cal-day.today {
  background: var(--primary);
  color: var(--white);
  font-weight: 700;
}

.cal-day.empty {
  background: transparent;
  cursor: default;
}

.cal-day .event-dot {
  width: 6px;
  height: 6px;
  background: #e53e3e;
  border-radius: 50%;
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
}

.cal-day.today .event-dot {
  background: #fbd38d;
}

/* Event popup */
.event-popup {
  display: none;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow);
}

.event-popup.show {
  display: block;
}

.event-popup h4 {
  color: var(--primary-dark);
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.event-popup .event-item {
  background: var(--accent-bg);
  border-left: 3px solid var(--primary);
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.event-popup .ev-title {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 0.9rem;
}

.event-popup .ev-time {
  color: var(--text-light);
  font-size: 0.8rem;
}

.event-popup .ev-desc {
  color: #666;
  font-size: 0.8rem;
  margin-top: 0.15rem;
}

.event-popup .no-events {
  color: #888;
  font-size: 0.85rem;
  font-style: italic;
}

/* ── Welcome / About section ── */
.welcome {
  text-align: center;
}

.welcome p {
  max-width: 700px;
  margin: 0 auto 1rem;
  color: var(--text-light);
  font-size: 1rem;
}

.welcome .pastors {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: 1.05rem;
  margin-top: 1.5rem;
}

/* ── Quick Info Cards (Home page) ── */
.quick-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.quick-card {
  background: var(--white);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-align: center;
}

.quick-card h3 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.quick-card p {
  color: var(--text-light);
  font-size: 0.9rem;
}

.quick-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* ── Logo placeholder ── */
.logo-img {
  max-width: 150px;
  margin: 0 auto 1.5rem;
  display: block;
}

/* ── Hero with background image ── */
.hero-img {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.hero-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 58, 92, 0.8) 0%, rgba(43, 108, 176, 0.7) 60%, rgba(59, 130, 196, 0.65) 100%);
}

.hero-img > * {
  position: relative;
  z-index: 1;
}

/* ── Pastor Photo (Welcome / About) ── */
.pastor-photo {
  width: 280px;
  height: 340px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  margin: 0 auto 1.5rem;
  display: block;
}

/* ── Photo Gallery (Services page) ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.gallery-item {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--white);
}

.gallery-item img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  display: block;
}

.gallery-item .caption {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--primary-dark);
  font-weight: 600;
  text-align: center;
}

/* ── Page header with background image ── */
.page-header-img {
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 4rem 1.5rem;
}

.page-header-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 58, 92, 0.85) 0%, rgba(43, 108, 176, 0.75) 100%);
}

.page-header-img h1 {
  position: relative;
  z-index: 1;
}

/* ── Section image beside text ── */
.pastor-section {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.pastor-section img {
  width: 260px;
  height: 320px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

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

/* ── Footer ── */
footer {
  background: var(--primary-dark);
  color: #a0b8d0;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.85rem;
  margin-top: auto;
}

footer strong {
  color: var(--white);
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .page-header h1 {
    font-size: 1.5rem;
  }

  .hamburger {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    padding: 0.5rem 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.75rem 1.5rem;
  }

  .nav-inner {
    flex-wrap: wrap;
  }

  section {
    padding: 2.5rem 1rem;
  }

  .card {
    padding: 1.25rem;
  }
}
