/* Custom styles for Tennis Lore website */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.6;
  color: #333;
  background: #ffffff url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="%23f0fdf4" opacity="0.3"/></svg>');
  background-size: 50px 50px;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(67, 160, 71, 0.02) 2px, transparent 2px),
    radial-gradient(circle at 75% 75%, rgba(67, 160, 71, 0.02) 2px, transparent 2px);
  background-size: 60px 60px, 80px 80px;
  pointer-events: none;
  z-index: -1;
}

/* Custom gradient background with tennis court image */
.bg-gradient-to-r {
  background: linear-gradient(to right, rgba(240, 253, 244, 0.9), rgba(220, 252, 231, 0.9)),
              url('https://images.unsplash.com/photo-1551698618-1dfe5d97d256?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* Featured story image placeholder with tennis theme */
.featured-story-image {
  background: linear-gradient(135deg, rgba(229, 231, 235, 0.8) 0%, rgba(209, 213, 219, 0.8) 100%),
              url('https://images.unsplash.com/photo-1622279457486-62dcc4a431d6?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80');
  background-size: cover;
  background-position: center;
  position: relative;
}

.featured-story-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(67, 160, 71, 0.1);
  border-radius: 8px;
}

/* Smooth transitions */
button,
a {
  transition: all 0.3s ease;
}

/* Hover effects */
button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.story-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .text-5xl {
    font-size: 2.5rem;
  }

  .px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .py-20 {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  .py-16 {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #16a34a;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #15803d;
}

/* Focus states for accessibility */
button:focus,
a:focus {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

/* Animation for story cards */
.story-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* Loading animation for images with tennis theme */
.bg-gray-200 {
  background: linear-gradient(90deg, rgba(229, 231, 235, 0.8) 25%, rgba(243, 244, 246, 0.8) 50%, rgba(229, 231, 235, 0.8) 75%),
              url('https://images.unsplash.com/photo-1554068865-24cecd4e34b8?ixlib=rb-4.0.3&auto=format&fit=crop&w=400&q=80');
  background-size: 200% 100%, cover;
  background-position: 0 0, center;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Typography improvements */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
}

p {
  line-height: 1.6;
}

/* Tennis-themed section backgrounds */
.tennis-bg-1 {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(226, 232, 240, 0.95) 100%),
              url('https://images.unsplash.com/photo-1542144582-1ba00456b5e3?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.tennis-bg-2 {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%),
              url('https://images.unsplash.com/photo-1595435934249-5df7ed86e1c0?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.tennis-form-bg {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.98) 0%, rgba(240, 253, 244, 0.98) 100%),
              url('https://images.unsplash.com/photo-1526406915894-7bcd65f60845?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
}

/* Header with tennis net pattern */
.bg-white.border-b {
  background: linear-gradient(90deg, transparent 0%, rgba(67, 160, 71, 0.05) 50%, transparent 100%),
              repeating-linear-gradient(0deg, transparent, transparent 8px, rgba(67, 160, 71, 0.1) 8px, rgba(67, 160, 71, 0.1) 9px);
}

/* Button styles */
.btn-primary {
  background-color: #16a34a;
  color: white;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #15803d;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-secondary {
  background-color: white;
  color: #16a34a;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 2px solid #16a34a;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #f0fdf4;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.2);
}

/* Tennis Ball Rotation Animation (All Pages) */
.tennis-ball-rotate {
  animation: tennis-spin 3s linear infinite;
  display: inline-block;
  transform-origin: center;
}

@keyframes tennis-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Featured Story Slideshow */
.featured-story-slideshow {
  position: relative;
  overflow: hidden;
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(67, 160, 71, 0.1);
}

/* Slideshow Indicators */
.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.indicator.active {
  background-color: rgba(255, 255, 255, 0.9);
}

.indicator:hover {
  background-color: rgba(255, 255, 255, 0.8);
}
