/* Home Page Styles */

/* Header */
.header {
  background: linear-gradient(135deg, #fefce8, #fbbf24);
  color: var(--gray-800);
  padding: 1rem 0;
  position: relative;
  overflow: hidden;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.nav-link {
  color: var(--gray-800);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: var(--gray-600);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

/* Fundo gradiente da seção de apresentação (como no header original) */
.hero-gradient {
  background: linear-gradient(135deg, #fefce8, #fbbf24);
}

/* Reflexo na capa do curso (compartilhado com a home) */
.course-cover {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), 0 8px 20px rgba(0, 0, 0, 0.18);
  filter: drop-shadow(0 10px 24px rgba(0,0,0,0.22));
  transition: transform 0.3s ease, box-shadow 0.25s ease, filter 0.25s ease;
  will-change: transform;
  display: block;
  position: relative;
  z-index: 1;
  border-radius: 16px;
}

.course-cover-wrapper {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
}

.course-cover-wrapper::after {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: 4%;
  height: 34%;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.82), rgba(255,255,255,0.42) 40%, rgba(255,255,255,0.08) 70%, rgba(255,255,255,0) 100%);
  transform: skewX(-12deg);
  filter: blur(6px);
  opacity: 0.88;
  border-radius: 12px;
  z-index: 2;
  animation: reflectShift 4s ease-in-out infinite;
}

@keyframes reflectShift {
  0% { transform: translateY(0) skewX(-12deg); opacity: 0.78; }
  40% { transform: translateY(6px) skewX(-8deg); opacity: 0.98; }
  100% { transform: translateY(0) skewX(-12deg); opacity: 0.78; }
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  text-align: left;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  opacity: 0.95;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.hero-image {
  position: relative;
  z-index: 2;
  padding: 20px;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  border-radius: 24px;
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Variante sem caixa: remove fundo e padding, mantendo apenas a sombra da imagem */
.hero-image.plain {
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.hero-image::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  background: linear-gradient(135deg, rgba(254, 252, 232, 0.3), rgba(251, 191, 36, 0.1));
  border-radius: 20px;
  z-index: -1;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.2),
    0 0 0 2px rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  filter: contrast(1.05) saturate(1.1);
  position: relative;
  z-index: 1;
}

.hero-image img:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.25),
    0 0 0 2px rgba(255, 255, 255, 0.4);
  filter: contrast(1.1) saturate(1.15);
}

/* Course Benefits Section */
.benefits-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, var(--gray-50), white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-orange), var(--primary-orange-light));
  border-radius: 4px;
}

.section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: 4rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.benefit-card {
  background: linear-gradient(135deg, #fefce8, #fbbf24);
  padding: 2rem 2.5rem 2.5rem 2.5rem;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid rgba(251, 191, 36, 0.2);
  position: relative;
  overflow: hidden;
}

.benefit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.benefit-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 0 40px rgba(251, 191, 36, 0.2);
  background: linear-gradient(135deg, #fefce8, #f59e0b);
}

.benefit-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #fefce8, #fbbf24);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 2rem;
  color: var(--gray-800);
  position: relative;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
  transition: all 0.3s ease;
}

.benefit-icon::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, rgba(254, 240, 138, 0.8), rgba(251, 191, 36, 0.6));
  border-radius: 50%;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.benefit-card:hover .benefit-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4);
}

.benefit-card:hover .benefit-icon::before {
  opacity: 1;
  animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; }
}

.benefit-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 1rem;
}

.benefit-description {
  color: var(--gray-600);
  line-height: 1.6;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 16px;
  width: 90%;
  max-width: 400px;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease;
}

/* Fallback visual para a imagem do herói quando houver erro */
.hero-fallback {
  display: none;
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
  border-radius: 20px;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--gray-400);
}

/* Estados e estilos de erro do modal (removendo inline) */
.error-message {
  display: none;
  color: var(--red-600);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.auth-forgot-link {
  color: var(--primary-orange);
  text-decoration: none;
  font-size: 0.875rem;
}

/* Estado inicial dos formulários do modal */
#loginForm { display: block; }
#registerForm { display: none; }

.modal-header {
  text-align: center;
  margin-bottom: 2rem;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.5rem;
}

.modal-subtitle {
  color: var(--gray-600);
  font-size: 0.875rem;
}

.close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--gray-400);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close:hover {
  color: var(--gray-600);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

.form-toggle {
  text-align: center;
  margin-top: 1.5rem;
}

.form-toggle a {
  color: var(--primary-orange);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.form-toggle a:hover {
  color: var(--primary-orange-hover);
}

.teacher-link {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.teacher-link a {
  color: var(--gray-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.teacher-link a:hover {
  color: var(--primary-orange);
}

/* Loading State */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-gradient.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Footer */
.footer {
  background: var(--gray-800);
  color: white;
  padding: 3rem 0 2rem;
  text-align: center;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-text {
  color: var(--gray-300);
  margin-bottom: 2rem;
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 2rem;
  color: var(--gray-400);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero-image {
    order: -1;
    max-width: 480px;
    margin: 0 auto;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.125rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  .benefit-card {
    padding: 2rem;
  }
  
  .modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
  
  .nav {
    flex-direction: column;
    gap: 1rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 0;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .benefits-section {
    padding: 4rem 0;
  }
  
  .benefit-card {
    padding: 1.5rem;
  }
}
