/* ========================================
   ERIE COMMUNITY CHURCH - STYLESHEET
   ======================================== */

/* CSS Variables */
:root {
  --color-cream: #FAF8F5;
  --color-warm-white: #FFFEFA;
  --color-brick: #8B4A3C;
  --color-brick-dark: #6B3A2E;
  --color-brick-light: #A65D4E;
  --color-forest: #2C4A3E;
  --color-forest-light: #3D6352;
  --color-gold: #C9A962;
  --color-gold-light: #E5D4A1;
  --color-charcoal: #2D2D2D;
  --color-gray: #6B6B6B;
  --color-gray-light: #9B9B9B;
  --color-divider: #E5E0D8;
  
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Merriweather', Georgia, serif;
  
  --shadow-soft: 0 2px 15px rgba(0,0,0,0.08);
  --shadow-medium: 0 4px 25px rgba(0,0,0,0.12);
  --shadow-strong: 0 8px 40px rgba(0,0,0,0.18);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-charcoal);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: var(--color-brick-dark);
}

/* Container */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.3;
  color: var(--color-charcoal);
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 1rem; }
h3 { font-size: 1.4rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
}

.small-muted {
  font-size: 0.9rem;
  color: var(--color-gray);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero-image-container {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* EASTER EGG: Steeple Hotspot */
.steeple-hotspot {
  position: absolute;
  top: 5%;
  left: 5%;
  width: 25%;
  height: 40%;
  background: transparent;
  border: none;
  cursor: default;
  z-index: 5;
  /* outline: 2px dashed red; /* Uncomment to see hotspot area */
}

.steeple-hotspot:focus {
  outline: none;
}

.hero-overlay {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.3) 0%,
    rgba(0,0,0,0.4) 50%,
    rgba(0,0,0,0.6) 100%
  );
}

.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 24px 60px;
  color: #fff;
}

.hero-overline {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.hero-title {
  color: #fff;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  max-width: 600px;
  opacity: 0.95;
  margin-bottom: 2rem;
}

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

.hero-times {
  font-size: 1rem;
  opacity: 0.9;
  padding: 0.75rem 1.5rem;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.2);
}

/* ========================================
   NAVIGATION
   ======================================== */
.nav-floating {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
}

.nav-glass {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.nav-inner {
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

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

.nav-links a {
  display: block;
  padding: 0.5rem 1rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 400;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.nav-links a:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  text-align: center;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-primary {
  background: var(--color-brick);
  color: #fff;
  border-color: var(--color-brick);
}

.btn-primary:hover {
  background: var(--color-brick-dark);
  border-color: var(--color-brick-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}

.btn-secondary {
  background: var(--color-gray-light);
  color: #fff;
  border-color: var(--color-gray-light);
}

.btn-secondary:hover {
  background: var(--color-gray);
  border-color: var(--color-gray);
}

.btn-full {
  width: 100%;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.btn-danger {
  background: #c0392b;
  color: #fff;
  border-color: #c0392b;
}

.btn-danger:hover {
  background: #a33025;
  border-color: #a33025;
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--color-warm-white);
}

.section-intro {
  font-size: 1.1rem;
  color: var(--color-gray);
  margin-bottom: 2rem;
}

/* Two Column Layout */
.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .two-column {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Cards */
.card {
  background: var(--color-cream);
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.section-alt .card {
  background: #fff;
}

/* Info Lists */
.info-list {
  list-style: none;
  margin: 1.5rem 0;
}

.info-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-divider);
}

.info-list li:last-child {
  border-bottom: none;
}

/* ========================================
   ANNOUNCEMENTS
   ======================================== */
.announcements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.announcement-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border-left: 4px solid var(--color-gold);
}

.section-alt .announcement-card {
  background: var(--color-cream);
}

.announcement-card h3 {
  color: var(--color-brick);
  margin-bottom: 0.5rem;
}

.announcement-card .date {
  font-size: 0.85rem;
  color: var(--color-gray);
  margin-bottom: 0.75rem;
}

.announcement-card p {
  margin-bottom: 0;
}

/* ========================================
   GOSPEL SECTION
   ======================================== */
.gospel {
  background: var(--color-forest);
  color: #fff;
}

.gospel h2, .gospel h3 {
  color: #fff;
}

.gospel-list {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.gospel-list li {
  margin-bottom: 1rem;
}

.gospel-prayer {
  font-style: italic;
  background: rgba(255,255,255,0.1);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-gold);
}

.gospel .small-muted {
  color: rgba(255,255,255,0.7);
}

/* ========================================
   GALLERY
   ======================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-soft);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  color: #fff;
  font-size: 0.9rem;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--color-charcoal);
  color: rgba(255,255,255,0.8);
  padding: 2rem 0;
}

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

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

.footer a:hover {
  color: #fff;
}

/* ========================================
   ADMIN MODAL
   ======================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-strong);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}

.modal h2 {
  margin-bottom: 0.5rem;
}

.modal-screen {
  /* Individual screens */
}

.modal-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.modal-buttons .btn {
  flex: 1;
}

.error-message {
  color: #c0392b;
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

/* Admin Header */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-divider);
}

.close-btn {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--color-gray);
  cursor: pointer;
  line-height: 1;
}

.close-btn:hover {
  color: var(--color-charcoal);
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-divider);
  padding-bottom: 0.5rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-gray);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.tab-btn:hover {
  background: var(--color-cream);
  color: var(--color-charcoal);
}

.tab-btn.active {
  background: var(--color-brick);
  color: #fff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Form Groups */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 2px solid var(--color-divider);
  border-radius: var(--radius-md);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-brick);
}

.save-status {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.save-status.success {
  color: var(--color-forest);
}

.save-status.error {
  color: #c0392b;
}

/* Admin Announcements List */
.announcements-list {
  margin-bottom: 2rem;
}

.admin-announcement-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1rem;
  background: var(--color-cream);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
}

.admin-announcement-item .content {
  flex: 1;
}

.admin-announcement-item h4 {
  margin-bottom: 0.25rem;
}

.admin-announcement-item .date {
  font-size: 0.8rem;
  color: var(--color-gray);
}

.admin-announcement-item .actions {
  display: flex;
  gap: 0.5rem;
  margin-left: 1rem;
}

.reorder-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-right: 0.75rem;
}

.reorder-btn {
  background: var(--color-divider, #e0d8d0);
  border: 1px solid rgba(85, 57, 34, 0.15);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0.3rem 0.5rem;
  color: var(--color-text, #2c2a29);
  transition: background 0.15s;
}

.reorder-btn:hover:not(:disabled) {
  background: var(--color-warm, #b25a3b);
  color: #fff;
}

.reorder-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.add-announcement,
.add-photo {
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-divider);
}

.add-announcement h4,
.add-photo h4 {
  margin-bottom: 1rem;
}

/* Gallery Admin */
.gallery-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.gallery-admin-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery-admin-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-admin-item .delete-photo {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  background: rgba(192, 57, 43, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-admin-item .delete-photo:hover {
  background: #c0392b;
}

.upload-note {
  font-size: 0.8rem;
  color: var(--color-gray);
  text-align: center;
  margin-top: 0.75rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
  .nav-links {
    gap: 0;
  }
  
  .nav-links a {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .hero-content {
    padding: 100px 16px 40px;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }
  
  .hero-times {
    font-size: 0.9rem;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .modal {
    padding: 1.5rem;
  }
  
  .admin-tabs {
    flex-wrap: wrap;
  }
  
  .steeple-hotspot {
    width: 35%;
    height: 35%;
  }
}

/* ========================================
   LOADING STATE
   ======================================== */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: "Loading...";
  display: block;
  text-align: center;
  padding: 2rem;
  color: var(--color-gray);
}
