/**
 * Pixels Worship — theme.css
 * Extended styles: animations, page templates, CPT archives, responsive polish.
 */

/* ══════════════════════════════════════
   SCROLL REVEAL ANIMATIONS
══════════════════════════════════════ */

.pw-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.pw-revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger siblings */
.pw-grid > *:nth-child(2) { transition-delay: 0.08s; }
.pw-grid > *:nth-child(3) { transition-delay: 0.16s; }
.pw-grid > *:nth-child(4) { transition-delay: 0.24s; }

/* ══════════════════════════════════════
   HEADER SCROLL STATES
══════════════════════════════════════ */

.pw-header--scrolled {
  box-shadow: 0 4px 32px rgba(0,0,0,0.22) !important;
}

.pw-header--hidden {
  transform: translateY(-100%);
}

/* ══════════════════════════════════════
   PAGE HERO (inner pages)
══════════════════════════════════════ */

.pw-page-hero {
  background: linear-gradient(135deg, var(--pw-primary) 0%, var(--pw-secondary) 100%);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.pw-page-hero::after {
  content: '';
  position: absolute;
  right: -100px;
  top: -100px;
  width: 400px;
  height: 400px;
  background: rgba(233,69,96,0.08);
  border-radius: 50%;
}

.pw-page-hero::before {
  content: '';
  position: absolute;
  left: -80px;
  bottom: -80px;
  width: 300px;
  height: 300px;
  background: rgba(245,166,35,0.06);
  border-radius: 50%;
}

/* ══════════════════════════════════════
   MINISTRY ARCHIVE
══════════════════════════════════════ */

.pw-ministry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 900px) { .pw-ministry-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .pw-ministry-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════
   LEADER ARCHIVE
══════════════════════════════════════ */

.pw-leaders-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 24px;
}

@media (max-width: 1024px) { .pw-leaders-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 768px)  { .pw-leaders-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px)  { .pw-leaders-grid { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════
   GROUP FINDER
══════════════════════════════════════ */

.pw-group-finder__filters {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  padding: 24px;
  background: var(--pw-off-white);
  border-radius: var(--pw-radius-lg);
}

.pw-group-finder__filters select {
  padding: 10px 16px;
  border: 2px solid var(--pw-light-gray);
  border-radius: var(--pw-radius);
  font-size: 0.9rem;
  font-family: var(--pw-font-body);
  background: var(--pw-white);
  cursor: pointer;
  transition: var(--pw-transition);
  min-width: 160px;
}

.pw-group-finder__filters select:focus {
  outline: none;
  border-color: var(--pw-accent);
}

/* ══════════════════════════════════════
   DONATION PROGRESS BAR
══════════════════════════════════════ */

.pw-donation-progress {
  margin: 24px 0;
}

.pw-donation-progress__bar {
  height: 10px;
  background: var(--pw-light-gray);
  border-radius: 50px;
  overflow: hidden;
}

.pw-donation-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pw-accent), var(--pw-gold));
  border-radius: 50px;
  transition: width 1s ease;
}

.pw-donation-progress__stats {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.875rem;
}

.pw-donation-progress__raised {
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--pw-accent);
}

/* ══════════════════════════════════════
   BREADCRUMBS
══════════════════════════════════════ */

.pw-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.825rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
}

.pw-breadcrumb a {
  color: rgba(255,255,255,0.7);
}

.pw-breadcrumb a:hover {
  color: var(--pw-white);
}

.pw-breadcrumb__sep {
  opacity: 0.4;
}

/* ══════════════════════════════════════
   BADGES
══════════════════════════════════════ */

.pw-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pw-badge--open    { background: rgba(39,174,96,0.15); color: #27ae60; }
.pw-badge--closed  { background: rgba(231,76,60,0.15);  color: #e74c3c; }
.pw-badge--new     { background: rgba(233,69,96,0.15);  color: var(--pw-accent); }

/* ══════════════════════════════════════
   PAGINATION
══════════════════════════════════════ */

.nav-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--pw-radius);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--pw-text);
  border: 2px solid var(--pw-light-gray);
  transition: var(--pw-transition);
  text-decoration: none;
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--pw-accent);
  border-color: var(--pw-accent);
  color: var(--pw-white);
}

/* ══════════════════════════════════════
   SINGLE POST / PAGE CONTENT
══════════════════════════════════════ */

.pw-post-content {
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.85;
}

.pw-post-content h2,
.pw-post-content h3 { margin: 2em 0 0.75em; }

.pw-post-content p { margin-bottom: 1.4em; }

.pw-post-content img {
  border-radius: var(--pw-radius);
  max-width: 100%;
}

.pw-post-content blockquote {
  border-left: 4px solid var(--pw-accent);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--pw-off-white);
  border-radius: 0 var(--pw-radius) var(--pw-radius) 0;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--pw-text-light);
}

/* ══════════════════════════════════════
   404 PAGE
══════════════════════════════════════ */

.pw-404 {
  text-align: center;
  padding: 120px 24px;
}

.pw-404__number {
  font-family: var(--pw-font-display);
  font-size: 12rem;
  line-height: 1;
  color: var(--pw-light-gray);
  letter-spacing: 0.04em;
}

/* ══════════════════════════════════════
   SEARCH RESULTS
══════════════════════════════════════ */

.pw-search-header {
  background: var(--pw-off-white);
  padding: 48px 0;
}

/* ══════════════════════════════════════
   CONTACT FORM 7 OVERRIDES
══════════════════════════════════════ */

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--pw-light-gray);
  border-radius: var(--pw-radius);
  font-family: var(--pw-font-body);
  font-size: 1rem;
  color: var(--pw-text);
  transition: var(--pw-transition);
  background: var(--pw-white);
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--pw-accent);
}

.wpcf7-form input[type="submit"] {
  background: var(--pw-accent);
  color: var(--pw-white);
  border: none;
  padding: 14px 36px;
  border-radius: var(--pw-radius);
  font-family: var(--pw-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: var(--pw-transition);
}

.wpcf7-form input[type="submit"]:hover {
  background: var(--pw-accent-light);
  transform: translateY(-2px);
}

/* ══════════════════════════════════════
   ELEMENTOR CANVAS TEMPLATE SUPPORT
══════════════════════════════════════ */

body.elementor-template-canvas .pw-header,
body.elementor-template-canvas .pw-footer {
  display: none;
}

/* ══════════════════════════════════════
   PRINT
══════════════════════════════════════ */

@media print {
  .pw-header, .pw-footer, .pw-hamburger, .pw-mobile-nav { display: none !important; }
  .pw-main { padding: 0; }
  a { color: #000; text-decoration: underline; }
}
