/* ========================================
   WOODVALE CONGREGATION WEBSITE STYLES
   Premium NPO Design System
   ======================================== */

/* CSS Variables - Design Tokens */
:root {
  /* Colors */
  --primary-color: #1e3a8a;
  /* Navy Blue - Trust, spirituality */
  --secondary-color: #d97706;
  /* Warm Gold - Hope, light */
  --accent-color: #059669;
  /* Green - Growth, community */
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --background-light: #f9fafb;
  --background-white: #ffffff;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --overlay-dark: rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Roboto', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--background-white);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
}

ul {
  list-style: none;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--text-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-light);
}

/* ========================================
   PREMIUM NPO HEADER STYLES
   ======================================== */

.header {
  background: var(--background-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
}

/* Utility Bar */
.utility-bar {
  background: linear-gradient(135deg, #1f2937 0%, var(--text-dark) 100%);
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.utility-bar .header-container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.utility-left,
.utility-right {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.utility-link {
  color: rgba(255, 255, 255, 0.85);
  transition: color var(--transition-base);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.utility-link:hover {
  color: var(--secondary-color);
}

.utility-link .icon {
  font-size: 1rem;
}

/* Main Header */
.header-main {
  background: var(--background-white);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

/* Logo Section */
.logo-section {
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.logo-image {
  width: 70px;
  height: 70px;
  object-fit: contain;
  transition: transform var(--transition-base);
}

.logo-link:hover .logo-image {
  transform: scale(1.05);
}

.logo-text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Search Box */
.search-box {
  display: flex;
  align-items: center;
  background: var(--background-light);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.search-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.search-input {
  border: none;
  background: transparent;
  padding: 0.625rem 1rem;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  outline: none;
  width: 200px;
  color: var(--text-dark);
}

.search-input::placeholder {
  color: var(--text-light);
}

.search-btn {
  background: transparent;
  border: none;
  padding: 0.625rem 1rem;
  cursor: pointer;
  font-size: 1.1rem;
  transition: background var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Header Buttons */
.btn-header {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  white-space: nowrap;
  display: inline-block;
}

.btn-primary-header {
  background: linear-gradient(135deg, var(--secondary-color), #f59e0b);
  color: white;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.btn-primary-header:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

.btn-secondary-header {
  background: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-secondary-header:hover {
  background: var(--primary-color);
  color: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 0.35rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger {
  width: 28px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Bar */
.main-nav {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
  border-top: 3px solid var(--secondary-color);
}

.nav-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nav-list::-webkit-scrollbar {
  display: none;
}

.nav-list li {
  flex-shrink: 0;
}

.nav-link {
  display: block;
  padding: 1rem 1.5rem;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition-base);
  position: relative;
  border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--background-white);
  border-bottom-color: var(--secondary-color);
}

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 3px;
  background: var(--secondary-color);
  transition: transform var(--transition-base);
}

.nav-link:hover::before,
.nav-link.active::before {
  transform: translateX(-50%) scaleX(1);
}

/* ========================================
   MAIN CONTENT STYLES
   ======================================== */

.main-content {
  min-height: 60vh;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section {
  padding: var(--spacing-2xl) 0;
}

.section-alt {
  background: var(--background-light);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 50%, var(--accent-color) 100%);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.2;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  padding: var(--spacing-xl);
  animation: fadeInUp 1s ease-out;
}

.hero h1 {
  color: white;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--spacing-lg);
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color), #f59e0b);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.btn-secondary {
  background: transparent;
  border-color: white;
  color: white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary-color);
}

/* Cards */
.card {
  background: var(--background-white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  height: 100%;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.card-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--spacing-md);
}

.card-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ========================================
   FOOTER STYLES
   ======================================== */

.footer {
  background: linear-gradient(135deg, #1f2937 0%, var(--text-dark) 100%);
  color: rgba(255, 255, 255, 0.9);
  padding: var(--spacing-2xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md) var(--spacing-xl);
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: var(--spacing-md);
}

.footer-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: brightness(1.1);
  flex-shrink: 0;
}

.footer-logo-section h3 {
  margin: 0;
  line-height: 1.3;
  font-size: 1rem;
}

.footer-column h3,
.footer-column h4 {
  color: white;
  font-size: 1.1rem;
  margin-bottom: var(--spacing-md);
}

.footer-column p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-bottom: var(--spacing-xs);
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.footer-column a {
  color: rgba(255, 255, 255, 0.8);
  transition: all var(--transition-base);
  display: inline-block;
}

.footer-column a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-md) var(--spacing-md) 0;
  text-align: center;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  margin-bottom: var(--spacing-xs);
}

/* ========================================
   FORM STYLES
   ======================================== */

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: var(--spacing-sm);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary-color);
}

.text-secondary {
  color: var(--secondary-color);
}

.mb-sm {
  margin-bottom: var(--spacing-sm);
}

.mb-md {
  margin-bottom: var(--spacing-md);
}

.mb-lg {
  margin-bottom: var(--spacing-lg);
}

.mb-xl {
  margin-bottom: var(--spacing-xl);
}

.mt-sm {
  margin-top: var(--spacing-sm);
}

.mt-md {
  margin-top: var(--spacing-md);
}

.mt-lg {
  margin-top: var(--spacing-lg);
}

.mt-xl {
  margin-top: var(--spacing-xl);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

@media (max-width: 1024px) {
  .search-box {
    display: none;
  }

  .btn-secondary-header {
    display: none;
  }

  .logo-title {
    font-size: 1.25rem;
  }

  .logo-subtitle {
    font-size: 0.8rem;
  }
}

@media (max-width: 768px) {
  .utility-bar {
    font-size: 0.75rem;
  }

  .utility-left,
  .utility-right {
    gap: 0.75rem;
  }

  .utility-link {
    font-size: 0.75rem;
  }

  .utility-link .icon {
    display: none;
  }

  .header-main {
    padding: 1rem 0;
  }

  .logo-image {
    width: 50px;
    height: 50px;
  }

  .logo-title {
    font-size: 1.1rem;
  }

  .logo-subtitle {
    font-size: 0.75rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .btn-header {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .main-nav {
    display: none;
  }

  .main-nav.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    padding: var(--spacing-sm) 0;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 0.875rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero {
    min-height: 400px;
  }

  .section {
    padding: var(--spacing-xl) 0;
  }
}

@media (max-width: 480px) {
  :root {
    font-size: 14px;
  }

  .utility-bar {
    padding: 0.375rem 0;
  }

  .utility-left {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }

  .utility-right {
    gap: 0.5rem;
  }

  .logo-image {
    width: 40px;
    height: 40px;
  }

  .logo-title {
    font-size: 0.95rem;
  }

  .logo-subtitle {
    font-size: 0.7rem;
  }

  .btn-primary-header {
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* ========================================
   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: 3px solid var(--secondary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --text-dark: #000000;
    --border-color: #000000;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}