/* Joy Story Enhanced Website CSS */

/* CSS Custom Properties */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  
  /* Joy Story Brand Colors */
  --joy-red: #dc3545;
  --joy-green: #28a745;
  --joy-gold: #ffc107;
  --joy-blue: #007bff;
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-family-heading: 'Playfair Display', Georgia, serif;
  
  /* Spacing */
  --section-padding: 4rem 0;
  --container-max-width: 1200px;
  
  /* Transitions */
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.15s ease;
  
  /* Shadows */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Border Radius */
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
}

/* Base Styles */
body {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  color: #333;
  overflow-x: hidden;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.75rem; }
h5 { font-size: 1.5rem; }
h6 { font-size: 1.25rem; }

.display-1 { font-size: 6rem; font-weight: 700; }
.display-2 { font-size: 5.5rem; font-weight: 700; }
.display-3 { font-size: 4.5rem; font-weight: 700; }
.display-4 { font-size: 3.5rem; font-weight: 700; }

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.6;
  color: #6c757d;
}

/* Container Enhancements */
.container {
  max-width: var(--container-max-width);
}

/* Section Styling */
.section-padding {
  padding: var(--section-padding);
}

.bg-light-custom {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.bg-primary-gradient {
  background: linear-gradient(135deg, var(--joy-blue) 0%, #0056b3 100%);
}

.bg-success-gradient {
  background: linear-gradient(135deg, var(--joy-green) 0%, #1e7e34 100%);
}

.bg-danger-gradient {
  background: linear-gradient(135deg, var(--joy-red) 0%, #bd2130 100%);
}

/* Enhanced Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
  font-weight: 600;
}

.card-img-top {
  transition: var(--transition-base);
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

/* Enhanced Buttons */
.btn {
  font-weight: 500;
  border-radius: var(--border-radius);
  padding: 0.75rem 1.5rem;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  border: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--joy-blue) 0%, #0056b3 100%);
  color: white;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: linear-gradient(135deg, var(--joy-green) 0%, #1e7e34 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #1e7e34 0%, #155724 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Hero Section Enhancements */
.hero-section {
  background: linear-gradient(135deg, var(--joy-blue) 0%, #0056b3 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="90" cy="90" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="30" r="1" fill="white" opacity="0.1"/><circle cx="30" cy="70" r="1" fill="white" opacity="0.1"/><circle cx="70" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.3;
}

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

/* Navigation Enhancements */
.navbar-nav .nav-link {
  position: relative;
  font-weight: 500;
  transition: var(--transition-base);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--joy-red);
  transition: var(--transition-base);
  transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
  width: 80%;
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

.scale-in {
  opacity: 0;
  transform: scale(0.8);
  animation: scaleIn 0.6s ease forwards;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  animation: slideInLeft 0.8s ease forwards;
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  animation: slideInRight 0.8s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

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

/* Enhanced Forms */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  transition: var(--transition-base);
  font-size: 1rem;
}

.form-control:focus {
  border-color: var(--joy-blue);
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
}

/* Gallery Enhancements */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: pointer;
}

.gallery-item img {
  transition: var(--transition-base);
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-base);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  color: white;
  font-size: 2rem;
}

/* Event Cards */
.event-card {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: var(--transition-base);
}

.event-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.event-date {
  background: var(--joy-red);
  color: white;
  text-align: center;
  padding: 1rem;
  position: relative;
}

.event-date .day {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.event-date .month {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Statistics Section */
.stats-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
}

.stat-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--joy-gold);
}

.stat-label {
  font-size: 1.125rem;
  opacity: 0.9;
}

/* Testimonials */
.testimonial {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  position: relative;
  margin-bottom: 2rem;
}

.testimonial::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: var(--joy-blue);
  line-height: 1;
}

.testimonial-author {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 1rem;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.testimonial-role {
  color: #6c757d;
  font-size: 0.875rem;
}

/* Footer Enhancements */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  color: white;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--joy-red) 0%, var(--joy-gold) 50%, var(--joy-green) 100%);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition-base);
}

.footer a:hover {
  color: white;
  transform: translateX(5px);
}

.footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition-base);
}

.footer .social-links a:hover {
  background: var(--joy-blue);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Donation Section */
.donation-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.donation-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
  position: relative;
}

.donation-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.donation-amount {
  font-size: 3rem;
  font-weight: 700;
  color: var(--joy-green);
  margin-bottom: 1rem;
}

.donation-description {
  color: #6c757d;
  margin-bottom: 2rem;
}

/* Progress Bars */
.progress {
  height: 10px;
  border-radius: 5px;
  background-color: #e9ecef;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--joy-green) 0%, var(--joy-blue) 100%);
  transition: width 1s ease;
}

/* Breadcrumbs */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 1rem 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: #6c757d;
}

.breadcrumb-item.active {
  color: #6c757d;
}

/* Alert Enhancements */
.alert {
  border: none;
  border-radius: var(--border-radius);
  border-left: 4px solid;
}

.alert-success {
  background-color: rgba(40, 167, 69, 0.1);
  border-left-color: var(--joy-green);
  color: #155724;
}

.alert-info {
  background-color: rgba(23, 162, 184, 0.1);
  border-left-color: var(--info-color);
  color: #0c5460;
}

.alert-warning {
  background-color: rgba(255, 193, 7, 0.1);
  border-left-color: var(--warning-color);
  color: #856404;
}

.alert-danger {
  background-color: rgba(220, 53, 69, 0.1);
  border-left-color: var(--joy-red);
  color: #721c24;
}

/* Newsletter Signup */
.newsletter-signup {
  background: linear-gradient(135deg, var(--joy-blue) 0%, #0056b3 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}

.newsletter-form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  gap: 1rem;
}

.newsletter-form .form-control {
  flex: 1;
  border: none;
  background: rgba(255, 255, 255, 0.9);
}

.newsletter-form .btn {
  background: var(--joy-red);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--joy-blue);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  z-index: 1000;
  cursor: pointer;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background: #0056b3;
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 1199.98px) {
  .display-1 { font-size: 5rem; }
  .display-2 { font-size: 4.5rem; }
  .display-3 { font-size: 4rem; }
  .display-4 { font-size: 3rem; }
}

@media (max-width: 991.98px) {
  :root {
    --section-padding: 3rem 0;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.75rem; }
  
  .display-1 { font-size: 4rem; }
  .display-2 { font-size: 3.5rem; }
  .display-3 { font-size: 3rem; }
  .display-4 { font-size: 2.5rem; }
  
  .hero-content {
    text-align: center;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
}

@media (max-width: 767.98px) {
  :root {
    --section-padding: 2rem 0;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .display-4 { font-size: 2rem; }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .testimonial {
    padding: 1.5rem;
  }
  
  .donation-cards {
    grid-template-columns: 1fr;
  }
  
  .scroll-to-top {
    bottom: 1rem;
    right: 1rem;
  }
}

@media (max-width: 575.98px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .card {
    margin-bottom: 1rem;
  }
  
  .btn {
    padding: 0.625rem 1.25rem;
  }
  
  .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .fade-in,
  .scale-in,
  .slide-in-left,
  .slide-in-right {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

@media (prefers-contrast: high) {
  .btn {
    border: 2px solid currentColor;
  }
  
  .card {
    border: 1px solid #000;
  }
  
  .navbar-nav .nav-link::after {
    height: 3px;
  }
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--joy-blue);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .navbar,
  .footer,
  .scroll-to-top,
  .btn {
    display: none !important;
  }
  
  .card {
    border: 1px solid #000;
    box-shadow: none;
  }
  
  a {
    text-decoration: underline;
  }
  
  .bg-primary,
  .bg-success,
  .bg-danger {
    background: white !important;
    color: black !important;
  }
}