/*
 * DJR Cursos Modern Website Styles
 *
 * Este arquivo define o estilo para a nova interface do site
 * com tema escuro e elementos modernos. Variáveis CSS são
 * utilizadas para facilitar a customização das cores.
 */

/* Variáveis de cor e tipografia */
:root {
  --primary-color: #13aa52; /* tom verde para chamadas de ação */
  --secondary-color: #0b8457; /* verde escuro para destaques */
  --background-color: #0d0f12; /* fundo principal escuro */
  --surface-color: #1a1d22; /* superfícies e cartões */
  --text-color: #f5f5f5; /* texto principal claro */
  --muted-color: #aaaaaa; /* texto secundário */
  --accent-color: #f9aa33; /* cor para botões de destaque */
  --danger-color: #e74c3c; /* cor para alertas e promoções */
  --font-family: 'Montserrat', sans-serif;
}

/* Ajuste global de layout */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-color);
}

/* Cabeçalho e navegação */
header {
  background-color: var(--surface-color);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

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

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  left: 0;
  bottom: -4px;
  transition: width 0.3s;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Seção hero */
/* Hero com imagem de fundo e sobreposição escura para leitura */
.hero {
  /* Utiliza uma imagem randomizada do Picsum como pano de fundo do herói */
  background-image: url('https://picsum.photos/seed/education/1600/900');
  background-size: cover;
  background-position: center;
  position: relative;
  padding: 4rem 1rem 5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Sobreposição para escurecer a imagem de fundo do herói */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(13, 27, 42, 0.85), rgba(27, 38, 59, 0.85));
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.5rem;
  max-width: 800px;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero p {
  max-width: 600px;
  margin-bottom: 2rem;
  color: var(--muted-color);
}

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

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: #fff;
}

/* Seção de indicadores */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: -3rem auto 4rem; /* sobe para sobrepor hero */
  padding: 2rem 1rem;
  background-color: var(--surface-color);
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.stat {
  text-align: center;
}

.stat h3 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat p {
  color: var(--muted-color);
  font-weight: 500;
}

/* Seção de portfólio */
.portfolio {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio h2,
.modalities h2,
.about h2,
.testimonials h2,
.faq h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.portfolio p.subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--muted-color);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background-color: var(--surface-color);
  border-radius: 8px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
}

/* Imagem dentro do cartão de curso */
.card-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* Imagem dentro das slides de promoções */
.slide-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.card:hover {
  transform: translateY(-5px);
}

.card i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
}

.card p {
  color: var(--muted-color);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card .btn-card {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  background-color: var(--primary-color);
  color: #fff;
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.card .btn-card:hover {
  background-color: var(--secondary-color);
}

/* Seção de modalidades */
.modalities {
  padding: 3rem 1rem;
  background-color: var(--surface-color);
}

.modalities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.modality {
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  border: 1px solid var(--surface-color);
}

.modality h3 {
  margin-bottom: 0.5rem;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.modality p {
  font-size: 0.9rem;
  color: var(--muted-color);
}

/* Seção sobre nós */
.about {
  padding: 3rem 1rem;
  max-width: 1000px;
  margin: 0 auto;
}

.about-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.about p {
  color: var(--muted-color);
  font-size: 1rem;
  line-height: 1.6;
}

/* Seção de depoimentos */
.testimonials {
  padding: 3rem 1rem;
  background-color: var(--surface-color);
}

/* Slider de promoções */
.slider-container {
  position: relative;
  /* altura mínima suficiente para comportar imagens e conteúdo */
  min-height: 400px;
  overflow: hidden;
}

.slide {
  opacity: 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
  position: relative;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.testimonial {
  background-color: var(--background-color);
  border-radius: 8px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.testimonial p {
  font-style: italic;
  margin-bottom: 1.5rem;
  color: var(--muted-color);
}

.testimonial .author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.testimonial .author img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary-color);
}

.testimonial .author span {
  font-weight: 600;
  color: var(--text-color);
}

/* Seção FAQ */
.faq {
  padding: 3rem 1rem;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--surface-color);
  padding: 1rem 0;
}

.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  outline: none;
  position: relative;
  padding-right: 1.5rem;
  list-style: none;
}

.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-size: 1.5rem;
  transition: transform 0.3s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin-top: 0.5rem;
  color: var(--muted-color);
  font-size: 0.95rem;
}

/* Seção de chamada para ação */
.cta {
  background: linear-gradient(45deg, #13aa52, #0b8457);
  color: #fff;
  text-align: center;
  padding: 3rem 1rem;
}

.cta h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.cta .btn-cta {
  background-color: #fff;
  color: var(--secondary-color);
  padding: 0.75rem 1.5rem;
  border-radius: 30px;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s;
}

.cta .btn-cta:hover {
  background-color: var(--surface-color);
  color: #fff;
}

/* Rodapé */
footer {
  background-color: var(--surface-color);
  color: var(--muted-color);
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

footer a {
  color: var(--primary-color);
}

/* Responsividade */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .stat h3 {
    font-size: 2rem;
  }
}

/* ===== Estilos do Painel Administrativo ===== */
.admin-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 240px;
  background-color: var(--surface-color);
  padding: 1.5rem;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin-bottom: 0.8rem;
}

.sidebar a {
  color: var(--text-color);
  font-size: 0.95rem;
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.sidebar a:hover {
  background-color: var(--background-color);
}

.content-admin {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;
}

.admin-card {
  background-color: var(--surface-color);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.admin-card h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.admin-card label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.admin-card input[type="text"],
.admin-card input[type="url"],
.admin-card textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  border: 1px solid #444;
  background-color: var(--background-color);
  color: var(--text-color);
  margin-bottom: 1rem;
}

.admin-card input[type="file"] {
  margin-bottom: 1rem;
}

.admin-card button {
  padding: 0.6rem 1.2rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.admin-card button:hover {
  background-color: var(--secondary-color);
}