/**
 * Festify - Home Page Improvements
 * Enhanced styling for the homepage with better spacing and section differentiation
 */

/* Section styling with backgrounds */
.hero-section {
    padding: 3rem 0 2.5rem;
    position: relative;
    overflow: hidden;
    min-height: 100vh; /* Full viewport height initially */
  }

  /* Content below hero initially hidden */
    .features-section,
    .cta-section,
    .stats-section,
    .events-section {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
  }

  /* Class to show sections once scrolled */
    .show-sections .features-section,
    .show-sections .cta-section,
    .show-sections .stats-section,
    .show-sections .events-section {
    opacity: 1;
    visibility: visible;
  }
  
  .features-section {
    padding: 3rem 0;
    background-color: rgba(255, 107, 107, 0.05);
    margin-top: 2rem;
    border-radius: 1.5rem;
    position: relative;
    border: 1px solid rgba(255, 107, 107, 0.1);
  }
  
  .cta-section {
    padding: 3rem 0;
    margin: 2rem 0;
    background-color: rgba(116, 192, 252, 0.05);
    border-radius: 1.5rem;
    position: relative;
    border: 1px solid rgba(116, 192, 252, 0.1);
  }
  
  .stats-section {
    padding: 3rem 0;
    background-color: rgba(32, 201, 151, 0.05);
    border-radius: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
    border: 1px solid rgba(32, 201, 151, 0.1);
  }
  
  .events-section {
    padding: 3rem 0;
    background-color: rgba(251, 188, 5, 0.05);
    border-radius: 1.5rem;
    margin-bottom: 3rem;
    position: relative;
    border: 1px solid rgba(251, 188, 5, 0.1);
  }
  
  /* Improved spacing for elements */
  .section-title {
    margin-bottom: 2rem;
    font-size: 1.75rem;
    font-weight: 700;
  }
  
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    margin-top: 10vh; /* Default for desktop */
  }
  
  .hero-logo {
    margin-bottom: 1.5rem;
  }
  
  .hero-description {
    margin: 1.5rem 0;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
  }
  
  .hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* Feature cards with improved spacing */
  .features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
  }
  
  .feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  .feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
  }
  
  .feature-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
  }
  
  .feature-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
  }
  
  /* CTA section improvements */
  .cta-content {
    text-align: center;
    padding: 0 1rem;
  }
  
  .cta-content h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
  }
  
  .cta-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-secondary);
  }
  
  /* Stats cards with improved layout */
  .stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .stat-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.3s ease;
  }
  
  .stat-card:hover {
    transform: translateY(-5px);
  }
  
  .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
  }
  
  .stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
  }
  
  /* Event cards with improved styling */
  .events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
  }
  
  .event-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--border-color);
    text-align: center;
  }
  
  .event-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .event-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
  }
  
  .event-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
  }
  
  /* Responsive adjustments */
  @media (max-width: 768px) {
    .hero-section {
      padding-top: 1.5rem;
    }
    
    .hero-content {
      margin-top: 3vh;
    }
    
    .hero-logo {
      margin-bottom: 1rem;
      width: 100px; /* Can be adjusted if needed */
      height: auto;
    }
    
    .hero-description {
      margin: 1rem 0;
    }
  }

  @media (max-width: 480px) {
    .hero-buttons {
      flex-direction: column;
      width: 100%;
    }
    
    .hero-buttons .btn {
      width: 100%;
      margin-bottom: 0.5rem;
    }
    
    .hero-section {
      padding-bottom: 4rem; /* Ensure enough space for scroll indicator */
    }

    .hero-content {
      margin-top: 2vh;
    }
  }

  @media (max-height: 700px) {
    .hero-logo {
      margin-bottom: 0.5rem;
      width: 100px; /* Slightly smaller on very small screens */
      height: auto;
    }
    
    .hero-section {
      min-height: 75vh;
    }

    .hero-content {
      margin-top: 1vh;
    }
          
    .hero-description {
      margin: 0.5rem 0;
      font-size: 1rem;
    }
  }

  @media (min-width: 576px) {
    .hero-buttons {
      flex-wrap: nowrap;
    }
  }
  
  @media (min-width: 768px) {
    .features-grid,
    .stats-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .events-grid {
      grid-template-columns: repeat(2, 1fr);
    }

    /* Adjust hero height on larger screens */
    .hero-section.scrolled {
        min-height: 80vh;
    }
  }
  
  @media (min-width: 992px) {
    .features-grid {
      grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid {
      grid-template-columns: repeat(3, 1fr);
    }
    
    .events-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }
  
  /* Entrance animations for sections */
  .animate-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  
  .animate-section.animated {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Staggered animation for grid children */
  .animate-grid-item {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }
  
  .animate-grid-item.animated {
    opacity: 1;
    transform: translateY(0);
  }
  
  /* Add decorative elements to section backgrounds */
  .section-decoration {
    position: absolute;
    z-index: -1;
    opacity: 0.4;
  }
  
  .decoration-dots {
    top: 10%;
    right: 5%;
    width: 120px;
    height: 120px;
    background-image: radial-gradient(var(--primary-color) 2px, transparent 2px);
    background-size: 15px 15px;
  }
  
  .decoration-circle {
    bottom: 10%;
    left: 5%;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 2px dashed var(--primary-hover);
  }
  
  .decoration-lines {
    top: 20%;
    left: 10%;
    width: 100px;
    height: 100px;
    background-image: linear-gradient(90deg, var(--secondary-color) 1px, transparent 1px);
    background-size: 10px 10px;
  }