/* home.css - Home Page Styles */

/* ============================================
   HOME PAGE CONTAINER
   ============================================ */

#home {
  min-height: calc(100vh - 140px);
  background: var(--fa-gradient-surface);
  padding: 0;
}

.home-placeholder {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* ============================================
   WELCOME BANNER
   ============================================ */

.welcome-banner {
  text-align: center;
  padding: 60px 20px;
  background: var(--fa-gradient-primary);
  color: white;
  border-radius: 20px;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--fa-primary-20);
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

.welcome-banner h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-banner h1 i {
  margin-right: 15px;
  animation: bounce 2s ease-in-out infinite;
}

.welcome-banner p {
  font-size: 1.25rem;
  margin-bottom: 0;
  opacity: 0.95;
  position: relative;
  z-index: 2;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

@keyframes float {
  0%,
  100% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  50% {
    transform: translate(-50%, -50%) rotate(180deg);
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* ============================================
   FEATURE GRID
   ============================================ */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.feature-card {
  background: white;
  border-radius: 16px;
  padding: 40px 30px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid #f0f0f0;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--fa-primary-10), transparent);
  transition: left 0.5s ease;
}

.feature-card:hover::before {
  left: 100%;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--fa-primary);
}

.feature-card i {
  font-size: 3rem;
  color: var(--fa-primary);
  margin-bottom: 25px;
  display: block;
  transition: all 0.3s ease;
}

.feature-card:hover i {
  transform: scale(1.1);
  color: var(--fa-primary-hover);
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--fa-primary);
  transition: color 0.3s ease;
}

.feature-card:hover h3 {
  color: var(--fa-accent);
}

.feature-card p {
  color: #666;
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Special Feature Cards */
.feature-card:nth-child(1) {
  border-top: 4px solid var(--fa-primary);
}

.feature-card:nth-child(2) {
  border-top: 4px solid var(--fa-accent);
}

.feature-card:nth-child(2) i {
  color: var(--fa-accent);
}

.feature-card:nth-child(2):hover i {
  color: var(--fa-accent-hover);
}

.feature-card:nth-child(2):hover h3 {
  color: var(--fa-accent);
}

.feature-card:nth-child(2):hover {
  border-color: var(--fa-accent);
}

.feature-card:nth-child(3) {
  border-top: 4px solid #ff9800;
}

.feature-card:nth-child(3) i {
  color: #ff9800;
}

.feature-card:nth-child(3):hover i {
  color: #f57c00;
}

.feature-card:nth-child(3):hover h3 {
  color: #ff9800;
}

.feature-card:nth-child(3):hover {
  border-color: #ff9800;
}

.feature-card:nth-child(4) {
  border-top: 4px solid #9c27b0;
}

.feature-card:nth-child(4) i {
  color: #9c27b0;
}

.feature-card:nth-child(4):hover i {
  color: #7b1fa2;
}

.feature-card:nth-child(4):hover h3 {
  color: #9c27b0;
}

.feature-card:nth-child(4):hover {
  border-color: #9c27b0;
}

/* ============================================
   HERO SECTION (Alternative Layout)
   ============================================ */

.hero-section {
  background: var(--fa-gradient-primary);
  color: white;
  padding: 80px 0;
  text-align: center;
  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="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.5;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 40px;
  opacity: 0.9;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-btn {
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 180px;
}

.hero-btn-primary {
  background: white;
  color: var(--fa-primary);
}

.hero-btn-primary:hover {
  background: var(--fa-primary-surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.hero-btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.hero-btn-secondary:hover {
  background: white;
  color: var(--fa-primary);
  transform: translateY(-2px);
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats-section {
  background: white;
  padding: 60px 0;
  margin: 50px 0;
  border-radius: 20px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stats-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  text-align: center;
}

.stat-item {
  padding: 20px;
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--fa-accent);
  margin-bottom: 10px;
  display: block;
  counter-reset: number;
  animation: countUp 2s ease-out;
}

.stat-label {
  font-size: 1rem;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   QUICK ACTIONS SECTION
   ============================================ */

.quick-actions {
  background: var(--fa-bg-alt);
  padding: 50px 20px;
  border-radius: 20px;
  margin-top: 40px;
}

.quick-actions h2 {
  text-align: center;
  margin-bottom: 40px;
  color: var(--fa-primary);
  font-size: 2.5rem;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  max-width: 1000px;
  margin: 0 auto;
}

.action-button {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 20px 25px;
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  text-decoration: none;
  color: var(--fa-primary);
  transition: all 0.3s ease;
  font-weight: 500;
}

.action-button:hover {
  border-color: var(--fa-accent);
  background: var(--fa-accent-surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: var(--fa-accent);
}

.action-button i {
  font-size: 1.5rem;
  color: var(--fa-accent);
  transition: transform 0.3s ease;
}

.action-button:hover i {
  transform: scale(1.2);
}

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

@media (max-width: 768px) {
  .home-placeholder {
    padding: 20px 15px;
  }

  .welcome-banner {
    padding: 40px 20px;
    margin-bottom: 30px;
    border-radius: 15px;
  }

  .welcome-banner h1 {
    font-size: 2.5rem;
  }

  .welcome-banner p {
    font-size: 1.1rem;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }

  .feature-card {
    padding: 30px 20px;
  }

  .feature-card i {
    font-size: 2.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .actions-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .quick-actions h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .welcome-banner h1 {
    font-size: 2rem;
  }

  .welcome-banner p {
    font-size: 1rem;
  }

  .feature-card {
    padding: 25px 15px;
  }

  .feature-card h3 {
    font-size: 1.25rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-btn {
    min-width: auto;
    width: 100%;
    max-width: 300px;
  }

  .action-button {
    padding: 15px 20px;
  }
}

/* ============================================
   APP FEATURES DESCRIPTION
   ============================================ */

.app-features {
  background: white;
  padding: 60px 20px;
  margin-top: 40px;
}

.features-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.feature-item {
  background: var(--fa-bg-alt);
  border-radius: 16px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--fa-accent);
}

.feature-item h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--fa-primary);
}

.feature-item p {
  color: #666;
  line-height: 1.6;
  font-size: 1rem;
  margin: 0;
}

/* Special Feature Items */
.feature-item:nth-child(1) {
  border-top: 4px solid var(--fa-primary);
}

.feature-item:nth-child(2) {
  border-top: 4px solid var(--fa-accent);
}

.feature-item:nth-child(3) {
  border-top: 4px solid #ff9800;
}

.feature-item:nth-child(4) {
  border-top: 4px solid #9c27b0;
}

@media (max-width: 768px) {
  .app-features {
    padding: 40px 20px;
    margin-top: 30px;
  }

  .features-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-item {
    padding: 25px 20px;
  }
}

/* ============================================
   HOME VIEW (lit-html rendered) – no CSS in JS
   ============================================ */
#welcome {
  text-align: center;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#welcome-container {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.home-view .welcome-user,
.home-view .welcome-guest {
  margin-top: 1.5rem;
}

.home-view .user-stats {
  color: #666;
  font-size: 1.1rem;
  margin: 1rem 0;
}

.home-view .quick-actions,
.home-view .auth-buttons,
.home-view .guest-actions {
  margin: 1.5rem 0;
}

.home-view .action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.home-view .auth-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.home-view .btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.home-view .btn-primary { background: var(--fa-primary); color: white; }
.home-view .btn-success { background: #28a745; color: white; }
.home-view .btn-info { background: #17a2b8; color: white; }
.home-view .btn-warning { background: #ffc107; color: #212529; }
.home-view .btn-premium {
  background: linear-gradient(45deg, #ffd700, #ffed4e);
  color: #333;
  font-weight: bold;
}
.home-view .btn-outline {
  background: transparent;
  border: 2px solid var(--fa-primary);
  color: var(--fa-primary);
}
.home-view .btn-large { padding: 1rem 2rem; font-size: 1.2rem; }

.home-view .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.home-view .btn:active { transform: translateY(0); }
.home-view .btn i { margin-right: 0.5rem; }

.home-view .premium-features {
  background: linear-gradient(135deg, #ffd700, #ffed4e);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  color: #333;
}
.home-view .premium-features ul { list-style: none; padding: 0; }
.home-view .premium-features li { margin: 0.5rem 0; font-weight: 500; }

.home-view .upgrade-prompt {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  color: #333;
}
.home-view .features-preview {
  color: #666;
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 1rem 0;
}

#main-content.main-content-visible {
  display: block;
  visibility: visible;
  min-height: 60vh;
}

@media (max-width: 768px) {
  .home-view #welcome { padding: 1rem; min-height: 50vh; }
  .home-view .action-buttons { grid-template-columns: 1fr; gap: 0.5rem; }
  .home-view .auth-buttons { flex-direction: column; align-items: center; gap: 0.5rem; }
  .home-view .btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
  .home-view .btn-large { padding: 0.75rem 1.5rem; font-size: 1rem; }
}
