/* Custom styles for United Presbyterian Church website */

:root {
  --sky-blue: #87CEEB;
  --heaven-blue: #B6E5F8;
  --cloud-white: #F0F8FF;
  --soft-blue: #E6F3FF;
  --gradient-start: #87CEEB;
  --gradient-mid: #B6E5F8;
  --gradient-end: #F0F8FF;
  --card-shadow: 0 4px 20px rgba(135, 206, 235, 0.15);
  --card-radius: 20px;
  --text-primary: #2C5282;
  --text-secondary: #4A7C7E;
}

/* Background gradient - heavenly sky */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-mid) 50%, var(--gradient-end) 100%);
  min-height: 100vh;
  position: relative;
}

/* Animated clouds background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><g fill="rgba(255,255,255,0.3)"><circle cx="200" cy="150" r="60"/><circle cx="250" cy="150" r="70"/><circle cx="300" cy="150" r="60"/><circle cx="700" cy="100" r="50"/><circle cx="750" cy="100" r="60"/><circle cx="800" cy="100" r="50"/><circle cx="1000" cy="200" r="40"/><circle cx="1040" cy="200" r="50"/><circle cx="1080" cy="200" r="40"/></g></svg>') no-repeat;
  background-size: 100% auto;
  opacity: 0.5;
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes float {
  0%, 100% { transform: translateX(0) translateY(0); }
  33% { transform: translateX(-20px) translateY(-10px); }
  66% { transform: translateX(20px) translateY(5px); }
}

/* Ensure content is above clouds */
body > * {
  position: relative;
  z-index: 2;
}

/* Card styling with soft shadows */
.module-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--card-radius);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(135, 206, 235, 0.25);
}

/* Image cards */
.image-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  height: 200px;
  box-shadow: var(--card-shadow);
}

.image-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.3) 80%, transparent 100%);
  padding: 1.5rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 1), 0 0 20px rgba(0, 0, 0, 0.9);
}

.image-card .overlay h2 {
  color: white !important;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.image-card .overlay p {
  color: rgba(255, 255, 255, 0.95) !important;
  font-weight: 500;
}

/* Sky blue buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--sky-blue) 0%, var(--heaven-blue) 100%);
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  border: none;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.4);
}

.btn-light {
  background-color: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-block;
  text-decoration: none;
  border: 1px solid rgba(135, 206, 235, 0.3);
}

.btn-light:hover {
  background-color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.3);
}

.btn-secondary {
  background-color: #6B7280;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}

.btn-secondary:hover {
  background-color: #4B5563;
  transform: translateY(-1px);
}

/* Admin page specific styles */
.admin-action-btn {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-action-btn:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Mobile navigation */
.mobile-nav {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: 0 -2px 20px rgba(135, 206, 235, 0.2);
  border-radius: 20px 20px 0 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-top: 1px solid rgba(135, 206, 235, 0.2);
}

/* Mobile nav plus button */
.mobile-nav .bg-gradient-to-br {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Time-based greeting card */
.greeting-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 248, 255, 0.9) 100%);
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--card-shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Subtle wiggle animation for greeting card hint */
@keyframes wiggle {
  0%, 100% { 
    transform: rotate(0deg) scale(1); 
  }
  25% { 
    transform: rotate(-1.5deg) scale(1.01); 
  }
  75% { 
    transform: rotate(1.5deg) scale(1.01); 
  }
}

.wiggle-hint {
  animation: wiggle 0.4s ease-in-out;
  animation-iteration-count: 2;
}

/* Event cards */
.event-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(135, 206, 235, 0.2);
}

.event-date {
  background: linear-gradient(135deg, var(--sky-blue) 0%, var(--heaven-blue) 100%);
  color: white;
  border-radius: 10px;
  padding: 0.5rem;
  min-width: 50px;
  text-align: center;
  font-weight: 600;
}

/* Service time card */
.service-card {
  background: linear-gradient(135deg, var(--sky-blue) 0%, var(--heaven-blue) 100%);
  color: white;
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(135, 206, 235, 0.3);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.1);
}

.service-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
  pointer-events: none;
}

/* Responsive video container */
.responsive-video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(135, 206, 235, 0.2);
}

.responsive-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Loading states */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  /* Ensure touch targets are at least 44x44 pixels */
  button, a, input, textarea, select {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Add spacing between interactive elements */
  button + button,
  a + a {
    margin-left: 8px;
  }
  
  .module-card {
    margin-bottom: 1rem;
  }
  
  /* Full-width buttons on mobile */
  .btn-primary, .btn-light {
    width: 100%;
    text-align: center;
  }
}

/* Icon styling with soft colors */
.icon-circle {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--soft-blue) 0%, var(--cloud-white) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 2px 10px rgba(135, 206, 235, 0.2);
}

.icon-circle svg, .icon-circle i {
  width: 30px;
  height: 30px;
  color: var(--text-primary);
}

/* Custom text colors */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
}

.text-gray-600 {
  color: var(--text-secondary) !important;
}

.text-gray-700 {
  color: var(--text-primary) !important;
}

/* Heavenly glow effect for important elements */
.heavenly-glow {
  box-shadow: 0 0 20px rgba(135, 206, 235, 0.3);
}

/* Print styles */
@media print {
  header, footer, nav, .mobile-nav {
    display: none;
  }
  
  main {
    max-width: 100%;
  }
  
  body {
    background: white;
  }
  
  body::before {
    display: none;
  }
}