/*
Theme Name: Immanuel City Global
Theme URI: https://immanuelcityglobal.org
Author: ICG Creative
Author URI: https://immanuelcityglobal.org
Description: A premium, world-class WordPress theme for Immanuel City Global Church, Lagos Nigeria. Features full custom admin dashboard, Paystack giving, sermon media management, events, and blazing-fast performance.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Private
Text Domain: icg-theme
Tags: church, ministry, premium, custom-dashboard
*/

/* ============================================================
   DESIGN TOKENS — All visual values live here
   ============================================================ */
:root {
  /* Brand Colours */
  --icg-white:       #FFFFFF;
  --icg-cream:       #FAF8F4;
  --icg-cream-mid:   #F2EDE4;
  --icg-charcoal:    #1A1A1A;
  --icg-charcoal-2:  #2D2D2D;
  --icg-charcoal-3:  #444444;
  --icg-muted:       #6B6B6B;
  --icg-border:      #E5DDD0;
  --icg-gold:        #C9A84C;
  --icg-gold-light:  #E8C97A;
  --icg-gold-dark:   #8B6914;
  --icg-gold-deep:   #6B5010;

  /* Gradients */
  --icg-gradient-gold: linear-gradient(135deg, #C9A84C 0%, #E8C97A 45%, #8B6914 100%);
  --icg-gradient-text: linear-gradient(135deg, #1A1A1A 0%, #C9A84C 55%, #8B6914 100%);
  --icg-gradient-dark: linear-gradient(160deg, #1A1A1A 0%, #2D2D2D 100%);

  /* Typography */
  --font-display:  'Playfair Display', Georgia, serif;
  --font-editorial:'Cormorant Garamond', Georgia, serif;
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs:   0.5rem;
  --space-sm:   1rem;
  --space-md:   2rem;
  --space-lg:   4rem;
  --space-xl:   6rem;
  --space-2xl:  9rem;

  /* Border Radius */
  --radius-sm:  4px;
  --radius-md:  12px;
  --radius-lg:  24px;
  --radius-xl:  48px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(26,26,26,0.07);
  --shadow-md:  0 8px 32px rgba(26,26,26,0.10);
  --shadow-lg:  0 24px 64px rgba(26,26,26,0.14);
  --shadow-gold:0 8px 32px rgba(201,168,76,0.22);

  /* Transitions */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 200ms;
  --duration-mid:  400ms;
  --duration-slow: 700ms;

  /* Container */
  --container-max: 1280px;
  --container-pad: clamp(1.25rem, 5vw, 3rem);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--icg-charcoal-2);
  background: var(--icg-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; }

button { cursor: pointer; border: none; background: none; font-family: inherit; }

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--icg-charcoal);
}

.text-gradient {
  background: var(--icg-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gold {
  color: var(--icg-gold);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--icg-gold);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.icg-container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.icg-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.icg-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.icg-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

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

/* ============================================================
   BUTTONS
   ============================================================ */
.icg-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--duration-mid) var(--ease-smooth);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.icg-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--duration-mid) var(--ease-smooth);
}

.icg-btn:hover::before { opacity: 1; }

.icg-btn-gold {
  background: var(--icg-gradient-gold);
  color: var(--icg-charcoal);
  box-shadow: var(--shadow-gold);
}

.icg-btn-gold::before {
  background: rgba(255,255,255,0.15);
}

.icg-btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(201,168,76,0.35);
}

.icg-btn-outline {
  border: 2px solid var(--icg-charcoal);
  color: var(--icg-charcoal);
  background: transparent;
}

.icg-btn-outline::before {
  background: var(--icg-charcoal);
}

.icg-btn-outline:hover {
  color: var(--icg-white);
  border-color: var(--icg-charcoal);
  transform: translateY(-2px);
}

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

.icg-btn-outline-white:hover {
  background: var(--icg-white);
  color: var(--icg-charcoal);
  border-color: var(--icg-white);
}

/* ============================================================
   SECTION SPACING
   ============================================================ */
.icg-section {
  padding-block: var(--space-xl);
}

.icg-section-sm {
  padding-block: var(--space-lg);
}

.icg-section-xl {
  padding-block: var(--space-2xl);
}

/* ============================================================
   NAVIGATION
   ============================================================ */
#icg-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--duration-mid) var(--ease-smooth);
}

#icg-header.scrolled {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.06), var(--shadow-sm);
}

.icg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.icg-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--icg-charcoal);
  letter-spacing: -0.01em;
}

.icg-logo img {
  height: 48px;
  width: auto;
}

.icg-logo-text span {
  display: block;
  font-size: 0.6rem;
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--icg-gold);
  line-height: 1;
}

.icg-nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.icg-nav-links a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--icg-charcoal-2);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--duration-fast) var(--ease-smooth);
}

.icg-nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--icg-gold);
  transition: width var(--duration-mid) var(--ease-smooth);
}

.icg-nav-links a:hover { color: var(--icg-charcoal); }
.icg-nav-links a:hover::after { width: 100%; }

.icg-nav-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile nav toggle */
.icg-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.icg-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--icg-charcoal);
  border-radius: 2px;
  transition: all var(--duration-mid) var(--ease-smooth);
}

.icg-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.icg-nav-toggle.open span:nth-child(2) { opacity: 0; }
.icg-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1024px) {
  .icg-nav-links { display: none; }
  .icg-nav-toggle { display: flex; }

  .icg-nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--icg-white);
    padding: 2rem var(--container-pad);
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--icg-border);
  }
}

/* ============================================================
   FOOTER
   ============================================================ */
#icg-footer {
  background: var(--icg-charcoal);
  color: rgba(255,255,255,0.75);
}

.icg-footer-top {
  padding-block: var(--space-xl);
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

@media (max-width: 1024px) {
  .icg-footer-top { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .icg-footer-top { grid-template-columns: 1fr; }
}

.icg-footer-brand .icg-logo { color: var(--icg-white); margin-bottom: 1.25rem; }

.icg-footer-brand p {
  font-size: 0.875rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.55);
  max-width: 280px;
}

.icg-footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.icg-social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.65);
  transition: all var(--duration-mid) var(--ease-smooth);
  font-size: 0.85rem;
}

.icg-social-icon:hover {
  background: var(--icg-gold);
  border-color: var(--icg-gold);
  color: var(--icg-charcoal);
  transform: translateY(-2px);
}

.icg-footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--icg-gold);
  margin-bottom: 1.25rem;
}

.icg-footer-col ul li {
  margin-bottom: 0.7rem;
}

.icg-footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  transition: color var(--duration-fast);
}

.icg-footer-col ul li a:hover { color: var(--icg-white); }

.icg-footer-contact-item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 0.85rem;
  align-items: flex-start;
}

.icg-footer-contact-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--icg-gold);
}

.icg-footer-bottom {
  padding-block: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.icg-footer-bottom p {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.35);
}

/* ============================================================
   PAGE HERO (Inner pages)
   ============================================================ */
.icg-page-hero {
  background: var(--icg-gradient-dark);
  padding-top: calc(80px + 5rem);
  padding-bottom: 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.icg-page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23C9A84C' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.icg-page-hero .eyebrow { margin-bottom: 0.75rem; }

.icg-page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  color: var(--icg-white);
  margin-bottom: 1rem;
}

.icg-page-hero h1 .accent { color: var(--icg-gold); }

.icg-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  margin-top: 1.5rem;
}

.icg-breadcrumb a { color: rgba(255,255,255,0.45); }
.icg-breadcrumb a:hover { color: var(--icg-gold); }

/* ============================================================
   CARDS
   ============================================================ */
.icg-card {
  background: var(--icg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-mid) var(--ease-smooth);
  border: 1px solid var(--icg-border);
}

.icg-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--icg-gold);
}

.icg-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.icg-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-smooth);
}

.icg-card:hover .icg-card-thumb img { transform: scale(1.06); }

.icg-card-body { padding: 1.5rem; }

.icg-card-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--icg-muted);
  margin-bottom: 0.75rem;
}

.icg-card-meta .tag {
  background: var(--icg-cream-mid);
  color: var(--icg-gold-dark);
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.icg-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
}

.icg-card p {
  font-size: 0.875rem;
  color: var(--icg-muted);
  line-height: 1.7;
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.icg-section-header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.icg-section-header .eyebrow { margin-bottom: 0.75rem; }

.icg-section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.icg-section-header p {
  font-size: 1rem;
  color: var(--icg-muted);
  line-height: 1.8;
}

.icg-divider {
  width: 60px;
  height: 3px;
  background: var(--icg-gradient-gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ============================================================
   FORMS
   ============================================================ */
.icg-form-group { margin-bottom: 1.25rem; }

.icg-form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--icg-charcoal-3);
  margin-bottom: 0.5rem;
}

.icg-form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  border: 1.5px solid var(--icg-border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--icg-charcoal);
  background: var(--icg-white);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}

.icg-form-control:focus {
  border-color: var(--icg-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}

.icg-form-control::placeholder { color: var(--icg-muted); }

textarea.icg-form-control { resize: vertical; min-height: 130px; }

/* ============================================================
   ALERTS & NOTICES
   ============================================================ */
.icg-alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.icg-alert-success { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.icg-alert-error   { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.icg-alert-info    { background: #eff6ff; border: 1px solid #93c5fd; color: #1e40af; }

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.icg-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(201,168,76,0.3);
  border-top-color: var(--icg-gold);
  border-radius: 50%;
  animation: icg-spin 0.7s linear infinite;
}

@keyframes icg-spin { to { transform: rotate(360deg); } }

/* ============================================================
   BACK TO TOP
   ============================================================ */
#icg-back-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--icg-gradient-gold);
  color: var(--icg-charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-gold);
  opacity: 0;
  transform: translateY(16px);
  transition: all var(--duration-mid) var(--ease-smooth);
  pointer-events: none;
}

#icg-back-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

#icg-back-top:hover { transform: translateY(-3px); }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: 2px solid var(--icg-gold);
  outline-offset: 3px;
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  #icg-header, #icg-back-top, .icg-nav-cta { display: none !important; }
  body { font-size: 12pt; }
}
