/*
  Global stylesheet for the Altar Life Ministries site.
  This file defines the core layout and colour scheme of the site.
  The design takes inspiration from the motivation.church website with
  a minimalist palette, generous spacing and large typography.  It
  supports light and dark modes via CSS variables; the dark mode is
  toggled by adding the `dark` class to the `<html>` element.
*/

/* Import a modern sans‑serif typeface for headings and body copy */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Colour palette variables for ALTAR Life Ministries theme.
   Subtle warm gradient background with white logo backdrop for optimal contrast. */
html {
  --primary-bg: linear-gradient(135deg, #faf9f6 0%, #f5f3ef 100%); /* warm white gradient */
  --secondary-bg: #f8f6f2; /* warm off-white */
  --primary-text: #2c3e50; /* dark blue-gray for readability */
  --secondary-text: #5a6c7d; /* medium blue-gray */
  --accent: #d4a574; /* warm gold from logo */
  --highlight: #8b4513; /* rich brown for highlights */
  --nav-bg: #f8f6f2; /* warm off-white for subtle contrast */
  --nav-text: #2c3e50; /* dark text on light nav */
  --card-bg: #ffffff; /* pure white cards */
  --logo-backdrop: #ffffff; /* pure white backdrop specifically for logo */
  --light-border: #d0d7de; /* Enhanced border for light mode separation */
  --light-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); /* Subtle shadow for depth */
  --section-border: #e8e5e1; /* Section separation border */
  --border-radius: 12px;
  font-family: 'Poppins', sans-serif;
  color: var(--primary-text);
  background-color: var(--primary-bg);
  scroll-behavior: smooth;
}

html.dark {
  --primary-bg: #1a202c; /* dark blue-gray */
  --secondary-bg: #2d3748; /* medium dark blue-gray */
  --primary-text: #f7fafc; /* light gray */
  --secondary-text: #a0aec0; /* medium light gray */
  --nav-bg: #2d3748; /* consistent with secondary bg */
  --nav-text: #f7fafc; /* light text */
  --card-bg: #2d3748; /* medium dark cards */
}

body {
  margin: 0;
  padding: 0;
  background: var(--primary-bg);
  color: var(--primary-text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Livestream and Community Enhancements */
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.live-indicator {
  animation: pulse 2s infinite;
}

.livestream-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

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

.community-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.community-card {
  background: var(--card-bg);
  padding: 25px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  border: 1px solid var(--border-color);
  margin: 0 auto;
  max-width: 100%;
}

/* Enhanced light mode card visibility */
body:not(.dark-mode) .community-card,
body:not(.dark-mode) .giving-card,
body:not(.dark-mode) .event-card,
body:not(.dark-mode) .discover-card {
  border: 1px solid var(--light-border);
  box-shadow: var(--light-shadow);
}

body:not(.dark-mode) .community-card:hover,
body:not(.dark-mode) .giving-card:hover,
body:not(.dark-mode) .event-card:hover,
body:not(.dark-mode) .discover-card:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border-color: var(--accent);
}

.community-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.giving-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.giving-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease;
  margin: 0 auto;
  max-width: 100%;
}

.giving-card:hover {
  transform: translateY(-3px);
}

.amount-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.amount-btn {
  padding: 0.75rem;
  border: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
}

.amount-btn:hover, .amount-btn.selected {
  background: var(--accent);
  color: white;
}

.chat-messages {
  max-height: 300px;
  overflow-y: auto;
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
}

.chat-message {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 6px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Enhanced responsiveness for mobile */
@media (max-width: 640px) {
  .giving-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .amount-buttons {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .community-gallery {
    grid-template-columns: 1fr;
  }
}

/* Utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
}
/* Darken accent on hover using a static darker shade */
.btn-primary:hover {
  background-color: #0c5c70;
}

.btn-secondary {
  background-color: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover {
  background-color: var(--accent);
  color: #ffffff;
}

.section {
  padding: 4rem 0;
  text-align: center;
  border-top: 1px solid var(--section-border);
}

/* Enhanced light mode visibility */
body:not(.dark-mode) .section {
  border-top: 1px solid var(--light-border);
}

body:not(.dark-mode) .section:nth-child(even) {
  background-color: var(--secondary-bg);
  box-shadow: inset 0 1px 0 var(--light-border);
}

.section.dark {
  background-color: var(--nav-bg);
  color: var(--nav-text);
}

/* Header and navigation */
header {
  background-color: var(--nav-bg);
  color: var(--nav-text);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.topbar {
  background-color: var(--nav-bg);
  font-size: 0.85rem;
  padding: 0.25rem 0;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--nav-text);
  padding: 0.5rem;
  border-radius: var(--border-radius);
}

.navbar-brand img {
  height: 46px; /* increased by 15% */
  width: auto;
  background: var(--logo-backdrop);
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: var(--nav-text);
  text-decoration: none;
  font-weight: 500;
  position: relative;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--highlight);
  transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
  width: 100%;
}

/* Dark mode toggle */
.toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.toggle-wrapper input {
  appearance: none;
  width: 40px;
  height: 20px;
  background-color: rgba(255,255,255,0.3);
  border-radius: 10px;
  position: relative;
  outline: none;
  transition: background-color 0.2s;
}

.toggle-wrapper input::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #ffffff;
  transition: transform 0.2s;
}

.toggle-wrapper input:checked {
  background-color: var(--accent);
}
.toggle-wrapper input:checked::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.85rem;
  user-select: none;
  color: var(--nav-text);
}

/* Hero section */
.hero {
  height: 75vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, #d2b48c 0%, #8b7355 25%, #a0522d 50%, #8b4513 75%, #654321 100%);
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding: 1rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(139, 69, 19, 0.3);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: 2.75rem;
  margin-bottom: 0.5rem;
}
.hero p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
.hero .button-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* Mission statement */
.mission {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 600;
  padding: 2rem 1rem;
}

/* Events section */
.events {
  background-color: var(--secondary-bg);
  padding: 4rem 1rem;
}
.events h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.event-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.event-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}
.event-card:hover {
  transform: translateY(-4px);
}
.event-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}
.event-card .event-body {
  padding: 1rem;
}
.event-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.event-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}
.event-location {
  font-size: 0.85rem;
  color: var(--secondary-text);
}

.events .all-events {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

/* Discover slider */
.discover {
  padding: 4rem 1rem;
}
.discover h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
}
.discover-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding-bottom: 1rem;
  -webkit-overflow-scrolling: touch;
  justify-content: center;
  max-width: 100%;
}
.discover-card {
  flex: 0 0 300px;
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
  scroll-snap-align: start;
  min-height: 350px;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .discover-slider {
    justify-content: center;
    padding: 0 1rem;
    align-items: center;
  }
  .discover-card {
    flex: 0 0 280px;
    margin: 0 auto;
  }
}
.discover-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
}
.discover-card .discover-content {
  padding: 1rem;
}
.discover-card h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}
.discover-card p {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--secondary-text);
}

/* Latest sermon section */
.sermon {
  background-color: var(--nav-bg);
  color: var(--nav-text);
  padding: 4rem 1rem;
  text-align: center;
}
.sermon h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}
.sermon .sermon-video {
  max-width: 800px;
  margin: 1.5rem auto;
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.sermon .sermon-video iframe {
  width: 100%;
  height: 450px;
  border: none;
}
.sermon .sermon-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Call to action */
.cta {
  background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero.jpg');
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
  padding: 4rem 1rem;
}
.cta h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.cta p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
footer {
  background-color: var(--nav-bg);
  color: var(--nav-text);
  padding: 3rem 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2rem;
}
footer h4 {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  color: var(--nav-text);
}
footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
footer ul li a {
  color: var(--secondary-text);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}
footer ul li a:hover {
  color: var(--highlight);
}
footer .social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}
footer .social a img {
  width: 24px;
  height: 24px;
}
.copyright {
  text-align: center;
  font-size: 0.8rem;
  color: var(--secondary-text);
  margin-top: 2rem;
  padding: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.powered-by {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  opacity: 0.8;
  line-height: 1.4;
}

.powered-by a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.powered-by a:hover {
  text-decoration: underline;
}

/* Mobile Navigation Styles */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 1002;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle:focus {
  background: rgba(0,0,0,0.05);
}

.mobile-menu-toggle:active {
  background: rgba(0,0,0,0.1);
  transform: scale(0.95);
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--nav-text);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(45deg) translate(-5px, -6px);
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar {
    justify-content: space-between;
    align-items: center;
    position: relative;
  }
  
  .navbar-brand {
    white-space: nowrap;
    font-size: 1rem;
  }
  
  .navbar-brand img {
    height: 35px;
    padding: 6px 8px;
  }
  
  .mobile-menu-toggle {
    display: flex;
    z-index: 1001;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--nav-bg);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 80px 0 2rem 0;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 15px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow-y: auto;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
    margin: 0;
    padding: 0;
  }
  
  .nav-links li {
    width: 100%;
  }
  
  .nav-links li a {
    display: block;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.1rem;
  }
  
  .nav-links li a:hover,
  .nav-links li a.active {
    background-color: rgba(212, 165, 116, 0.1);
  }
  
  .toggle-wrapper {
    margin: 2rem;
    justify-content: center;
  }
  
  .topbar {
    font-size: 0.7rem;
    padding: 0.4rem 0.5rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .hero {
    height: auto;
    padding: 6rem 1rem 4rem;
    margin-top: 60px;
  }
  
  .hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  .mission {
    font-size: 1.4rem;
    line-height: 1.3;
  }
  
  .sermon .sermon-video iframe {
    height: 250px;
  }
  
  /* Mobile-optimized button styles */
  .btn {
    padding: 0.9rem 1.8rem;
    font-size: 1rem;
    min-height: 44px;
    border-radius: 8px;
    touch-action: manipulation;
  }
  
  .button-group {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }
  
  .button-group .btn {
    width: 100%;
    text-align: center;
  }
  
  /* Improved mobile typography */
  .hero p {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 1rem 0 2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
  }
  
  .section-subtitle {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  /* Mobile card improvements */
  .discover-card {
    padding: 1rem;
    margin-bottom: 1rem;
  }
  
  .discover-card h3 {
    font-size: 1.1rem;
    line-height: 1.3;
  }
  
  .discover-card p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Mobile event card improvements */
  .event-card h3 {
    font-size: 1.2rem;
    line-height: 1.3;
  }
  
  .event-card p {
    font-size: 0.9rem;
    line-height: 1.4;
  }
  
  /* Mobile content alignment fixes */
  .container {
    text-align: center;
  }
  
  .hero {
    text-align: center;
    align-items: center;
    justify-content: center;
  }
  
  .hero h1,
  .hero p {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }
  
  /* Fix all images on mobile */
  img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
  }
  
  .discover-card img,
  .event-card img,
  .community-card img {
    margin: 0 auto;
    display: block;
  }
  
  /* Center all card content */
  .discover-card,
  .event-card,
  .community-card {
    text-align: center;
    margin: 0 auto;
  }
  
  .discover-content,
  .event-content {
    text-align: center;
  }
  
  /* Mission statement alignment */
  .mission {
    text-align: center;
    margin: 0 auto;
  }
  
  /* Section titles and content */
  .section-title {
    text-align: center;
  }
  
  .section-subtitle {
    text-align: center;
    margin: 0 auto;
  }
  
  /* Button groups */
  .button-group {
    justify-content: center;
    align-items: center;
  }
  
  /* Paragraphs and text content */
  p {
    text-align: justify;
    text-justify: inter-word;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero p,
  .mission,
  .section-subtitle {
    text-align: center;
  }
}

/* Additional mobile optimizations for very small screens */
@media (max-width: 480px) {
  .navbar-brand {
    font-size: 0.9rem;
  }
  
  .navbar-brand img {
    height: 30px;
    padding: 4px 6px;
  }
  
  .hero {
    padding: 5rem 1rem 3rem;
  }
  
  .hero h1 {
    font-size: 1.7rem;
    line-height: 1.1;
  }
  
  .hero p {
    font-size: 1rem;
    margin: 0.8rem 0 1.5rem;
  }
  
  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .container {
    width: 95%;
  }
  
  .topbar {
    font-size: 0.65rem;
    padding: 0.3rem 0.5rem;
    text-align: center;
  }
  
  /* Extra small screen alignment */
  .hero {
    text-align: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .discover-slider {
    justify-content: center;
    align-items: center;
  }
  
  .discover-card {
    margin: 0 auto;
    text-align: center;
  }
  
  /* Ensure all content is centered */
  .container {
    margin: 0 auto;
    text-align: center;
  }
}

/* ============================
   Merchandise Page Styles
   ============================ */
.merch-grid {
  max-width: 1200px;
  margin: 0 auto;
}

.merch-category {
  margin-bottom: 3rem;
}

.merch-category h2 {
  color: var(--accent);
  margin-bottom: 2rem;
  font-size: 1.8rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.product-image-placeholder {
  background: var(--secondary-bg);
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  color: var(--secondary-text);
  font-weight: 600;
}

.product-info h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.product-info p {
  color: var(--secondary-text);
  margin-bottom: 1rem;
}

.price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}

.size-options, .color-options {
  margin-bottom: 1rem;
}

.size-options label, .color-options label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-text);
}

.size-options select, .color-options select {
  width: 100%;
  padding: 0.5rem;
  border: 2px solid var(--secondary-bg);
  border-radius: var(--border-radius);
  background: var(--card-bg);
  color: var(--primary-text);
}

.cart-section {
  background: var(--secondary-bg);
  padding: 2rem 0;
  margin-top: 2rem;
}

.cart-summary {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cart-total {
  font-size: 1.2rem;
  margin: 1rem 0;
  text-align: right;
}

#cart-items {
  margin-bottom: 1rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--secondary-bg);
}

/* ============================
   Sermon Page Styles
   ============================ */
.page-header {
  background: var(--secondary-bg);
  text-align: center;
  padding: 3rem 0;
}

.featured-sermon {
  background: var(--card-bg);
}

.sermon-player {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.video-container {
  background: var(--secondary-bg);
  border-radius: var(--border-radius);
  padding: 2rem;
  text-align: center;
}

.sermon-info {
  background: var(--secondary-bg);
  padding: 2rem;
  border-radius: var(--border-radius);
}

.sermon-info h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.sermon-archive {
  background: var(--secondary-bg);
}

.sermon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.sermon-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.sermon-card:hover {
  transform: translateY(-3px);
}

/* ============================
   Admin Panel Styles
   ============================ */
.admin-panel {
  background: var(--nav-bg);
  color: var(--nav-text);
  border-top: 3px solid var(--accent);
}

.admin-controls {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.admin-panel .btn {
  background: var(--accent);
  border: none;
  color: var(--nav-text);
}

.admin-panel .btn:hover {
  background: var(--highlight);
  color: var(--primary-text);
}

/* ============================
   Responsive Design Updates
   ============================ */
@media (max-width: 768px) {
  .sermon-player {
    grid-template-columns: 1fr;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-controls {
    flex-direction: column;
    align-items: center;
  }
}
/* User Authentication Styles */
.login-link.logged-in {
  background: var(--highlight);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
}

.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.auth-modal-content {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.auth-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-modal-header h2 {
  margin: 0;
  color: var(--primary-text);
  font-size: 1.5rem;
}

.close-modal {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--secondary-text);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.close-modal:hover {
  background: rgba(0, 0, 0, 0.1);
}

.auth-modal-body {
  padding: 1.5rem;
}

.auth-tabs {
  display: flex;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  color: var(--secondary-text);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: var(--highlight);
  border-bottom-color: var(--highlight);
}

.auth-form {
  transition: opacity 0.2s ease;
}

.auth-form.hidden {
  display: none;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary-text);
}

.form-group input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-size: 1rem;
  background: var(--secondary-bg);
  color: var(--primary-text);
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

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

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
}

.checkbox-group label {
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.auth-btn {
  width: 100%;
  background: var(--highlight);
  color: white;
  border: none;
  padding: 0.875rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 1rem;
}

.auth-btn:hover {
  background: color-mix(in srgb, var(--highlight) 90%, black);
}

.auth-options {
  text-align: center;
}

.forgot-password {
  color: var(--highlight);
  text-decoration: none;
  font-size: 0.9rem;
}

.forgot-password:hover {
  text-decoration: underline;
}

.social-login {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  text-align: center;
}

.social-login p {
  margin: 0 0 1rem 0;
  color: var(--secondary-text);
  font-size: 0.9rem;
}

.social-buttons {
  display: flex;
  gap: 0.5rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  background: var(--secondary-bg);
  color: var(--primary-text);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.social-btn:hover {
  border-color: var(--highlight);
  background: var(--card-bg);
}

.social-btn.facebook:hover {
  border-color: #1877f2;
  color: #1877f2;
}

.social-btn.google:hover {
  border-color: #db4437;
  color: #db4437;
}

.user-menu {
  position: fixed;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  min-width: 220px;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-menu-content {
  padding: 1rem;
}

.user-info {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.user-info h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.1rem;
  color: var(--primary-text);
}

.user-info p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--secondary-text);
}

.user-actions {
  display: flex;
  flex-direction: column;
}

.user-action {
  padding: 0.5rem 0;
  color: var(--primary-text);
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

.user-action:hover {
  background: rgba(0, 0, 0, 0.05);
}

.user-action#logout {
  color: #ef4444;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

/* Mobile responsiveness for auth system */
@media (max-width: 480px) {
  .auth-modal-content {
    width: 95%;
    margin: 1rem;
  }
  
  .auth-modal-header,
  .auth-modal-body {
    padding: 1rem;
  }
  
  .social-buttons {
    flex-direction: column;
  }
  
  .user-menu {
    right: 10px !important;
    left: 10px;
    width: auto;
  }
}

/* Login Button Styling */
.auth-btn {
  margin-left: auto;
  margin-right: 1rem;
  padding: 0.5rem 1.2rem;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white !important;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  display: inline-block;
  border: none;
  cursor: pointer;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.auth-btn.authenticated {
  background: linear-gradient(135deg, #10b981, #059669);
}

.auth-btn.authenticated::before {
  content: "⚡ ";
}

/* Enhanced Mobile Alignment and Content Centering */
@media (max-width: 768px) {
  /* Ensure all grid containers center their children */
  .giving-grid, .community-grid, .events-grid, .discover-grid {
    justify-items: center;
    place-items: center;
  }
  
  /* Center align button containers */
  .button-group, .amount-buttons, .cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  /* Make sure all headings are centered */
  h1, h2, h3, h4, h5, h6 {
    text-align: center !important;
    margin: 0 auto;
  }
  
  /* Center text blocks but keep readable line length */
  .text-block, .description, .sermon-description {
    max-width: 100%;
    margin: 0 auto;
    text-align: justify;
    text-justify: inter-word;
  }
  
  /* Ensure all content containers are centered */
  .content-wrapper, .main-content {
    text-align: center;
  }
  
  /* Center all flex containers */
  .flex-container, .row {
    justify-content: center;
    align-items: center;
  }
  
  /* Fix any left-aligned content */
  .left-align {
    text-align: center !important;
  }
  
  /* Ensure buttons are centered */
  .btn, .button, .cta-btn {
    margin: 0.5rem auto;
    display: block;
  }
}
