/* ============================================
   HOMEPAGE STYLES
============================================ */

.homepage {
  padding-top: 80px; /* Header height */
}

/* ============================================
   HERO SECTION
============================================ */

.hero-section {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: var(--spacing-3xl) 0;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Overlay scuro per migliorare leggibilità */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(10, 14, 20, 0.95) 0%,
    rgba(10, 14, 20, 0.85) 40%,
    rgba(10, 14, 20, 0.6) 70%,
    rgba(10, 14, 20, 0.3) 100%
  );
  z-index: 1;
}

/* Floating Icons Animation */
.floating-icons {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.icon-rocket {
  position: absolute;
  top: 20%;
  right: 15%;
  animation: float 6s ease-in-out infinite;
  opacity: 0.6;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--color-accent-yellow);
  border-radius: 50%;
  animation: twinkle 3s ease-in-out infinite;
  z-index: 2;
}

.star-1 {
  top: 30%;
  left: 10%;
  animation-delay: 0s;
}

.star-2 {
  top: 60%;
  right: 20%;
  animation-delay: 1s;
}

.star-3 {
  top: 80%;
  left: 30%;
  animation-delay: 2s;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.5); }
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
  font-weight: 500;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-description {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-xl);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: var(--spacing-2xl);
}

/* Scroll Indicator */
.scroll-indicator {
  display: flex;
  justify-content: center;
  margin-top: var(--spacing-2xl);
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 15px;
  position: relative;
  animation: mouse-bounce 2s infinite;
}

.wheel {
  width: 4px;
  height: 8px;
  background: var(--color-accent-yellow);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: wheel-scroll 2s infinite;
}

@keyframes mouse-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}

@keyframes wheel-scroll {
  0% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(15px); }
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-section {
    background-position: center;
    background-attachment: scroll;
  }
  
  .hero-overlay {
    background: linear-gradient(
      135deg,
      rgba(10, 14, 20, 0.92) 0%,
      rgba(10, 14, 20, 0.88) 100%
    );
  }
}

@media (max-width: 768px) {
  .hero-section {
    min-height: calc(100vh - 60px);
    background-position: 70% center;
  }
  
  .hero-overlay {
    background: rgba(10, 14, 20, 0.9);
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .floating-icons {
    display: none;
  }
}
/* ============================================
   SECTION COMMONS
============================================ */

section {
  padding: var(--spacing-3xl) 0;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-md);
}

.section-description {
  text-align: center;
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto var(--spacing-2xl);
  line-height: 1.8;
}

/* ============================================
   MISSION SECTION
============================================ */

.mission-section {
  background: linear-gradient(180deg, transparent 0%, rgba(253, 185, 39, 0.02) 100%);
}

.mission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  margin-top: var(--spacing-2xl);
}

.mission-card {
  text-align: center;
  padding: var(--spacing-xl);
}

.mission-icon {
  margin: 0 auto var(--spacing-lg);
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mission-title {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
}

.mission-description {
  color: var(--color-text-secondary);
  line-height: 1.8;
}

/* ============================================
   SERVICES SECTION
============================================ */

.services-section {
  background: var(--color-bg-secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonne desktop */
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.service-card {
  text-align: center;
  padding: var(--spacing-xl);
  cursor: pointer;
}

.service-icon {
  margin: 0 auto var(--spacing-lg);
  transition: transform var(--transition-base);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

.service-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.service-description {
  color: var(--color-text-secondary);
}

.services-cta {
  text-align: center;
  margin-top: var(--spacing-2xl);
}

/* Responsive Services Grid */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 colonne tablet */
    gap: var(--spacing-lg);
  }
}

@media (max-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr; /* 1 colonna mobile */
    gap: var(--spacing-md);
  }
  
  .service-card {
    padding: var(--spacing-lg);
  }
}

/* ============================================
   BLOG SECTION
============================================ */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.blog-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.blog-card-image {
  width: 100%;
  height: 250px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: var(--spacing-md);
  position: relative;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.1);
}

.blog-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  width: fit-content;
}

.blog-card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

.blog-card-title a {
  transition: color var(--transition-base);
}

.blog-card-title a:hover {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-card-excerpt {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  gap: var(--spacing-md);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-md);
}

.blog-card-meta span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.blog-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-accent-yellow);
  font-weight: 600;
  transition: all var(--transition-base);
}

.blog-card-link:hover {
  gap: 0.75rem;
}

.blog-cta {
  text-align: center;
  margin-top: var(--spacing-2xl);
}

/* ============================================
   SHARE SPACE SECTION
============================================ */

.share-space-section {
  background: linear-gradient(180deg, rgba(78, 205, 196, 0.02) 0%, transparent 100%);
}

.share-space-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 colonne desktop */
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.space-card {
  text-align: center;
  padding: var(--spacing-xl);
}

.space-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-lg);
  transition: transform var(--transition-base);
}

.space-card:hover .space-icon {
  transform: scale(1.1) rotate(-5deg);
}

.space-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.space-description {
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.space-count {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gradient-primary);
  color: #000;
  border-radius: var(--radius-xl);
  font-weight: 700;
  font-size: 0.9rem;
}

.share-space-cta {
  text-align: center;
  margin-top: var(--spacing-2xl);
}

/* Responsive Share Space Grid */
@media (max-width: 1024px) {
  .share-space-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 colonne tablet */
    gap: var(--spacing-lg);
  }
}

@media (max-width: 640px) {
  .share-space-grid {
    grid-template-columns: 1fr; /* 1 colonna mobile */
    gap: var(--spacing-md);
  }
  
  .space-card {
    padding: var(--spacing-lg);
  }
  
  .space-icon {
    width: 60px;
    height: 60px;
  }
}

/* ============================================
   BOOK CLUB SECTION
============================================ */

.book-club-section {
  background: var(--color-bg-secondary);
}

.book-club-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--spacing-3xl);
  align-items: center;
  margin-top: var(--spacing-2xl);
}

.book-club-cover {
  position: relative;
}

.book-cover {
  max-width: 400px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-base);
}

.book-cover:hover {
  transform: translateY(-10px) rotate(-2deg);
}

.book-club-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--gradient-primary);
  color: #000;
  border-radius: var(--radius-xl);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: var(--spacing-md);
}

.book-club-title {
  font-size: 1.75rem;
  margin-bottom: var(--spacing-md);
}

.book-club-description {
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-lg);
}

.book-club-stats {
  display: flex;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
}

.stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-text-secondary);
}

.stat svg {
  color: var(--color-accent-yellow);
}

.book-club-actions {
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

/* ============================================
   NEWSLETTER SECTION
============================================ */

.newsletter-section {
  background: radial-gradient(circle at center, rgba(253, 185, 39, 0.05) 0%, transparent 70%);
  padding: var(--spacing-3xl) 0;
}

.newsletter-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-icon {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  animation: newsletter-pulse 3s ease-in-out infinite;
}

@keyframes newsletter-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.sparkle {
  position: absolute;
  font-size: 1.5rem;
  animation: sparkle-float 3s ease-in-out infinite;
}

.sparkle-1 {
  top: -10px;
  right: -10px;
  animation-delay: 0s;
}

.sparkle-2 {
  bottom: -10px;
  left: -10px;
  animation-delay: 1s;
}

.sparkle-3 {
  top: 50%;
  right: -20px;
  animation-delay: 2s;
}

@keyframes sparkle-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-10px) scale(1.2); opacity: 1; }
}

.newsletter-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

.newsletter-description {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: var(--spacing-xl);
}

.newsletter-form {
  display: flex;
  gap: var(--spacing-md);
  max-width: 600px;
  margin: 0 auto var(--spacing-md);
}

.newsletter-input {
  flex: 1;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  color: var(--color-text-primary);
  font-size: 1rem;
  transition: all var(--transition-base);
}

.newsletter-input:focus {
  outline: none;
  border-color: var(--color-accent-yellow);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(253, 185, 39, 0.2);
}

.newsletter-input::placeholder {
  color: var(--color-text-muted);
}

.newsletter-disclaimer {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ============================================
   RESPONSIVE
============================================ */

@media (max-width: 1024px) {
  .hero-astronaut {
    opacity: 0.3;
  }
  
  .book-club-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .book-cover {
    max-width: 300px;
  }
}

@media (max-width: 768px) {
  .homepage {
    padding-top: 60px;
  }
  
  .hero-section {
    min-height: auto;
    padding: var(--spacing-2xl) 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .hero-actions {
    flex-direction: column;
  }
  
  .hero-astronaut {
    display: none;
  }
  
  .mission-grid,
  .services-grid,
  .blog-grid,
  .share-space-grid {
    grid-template-columns: 1fr;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  section {
    padding: var(--spacing-2xl) 0;
  }
}