/*
 * Propshaft — estilos globais + tema curso
 */

:root {
  --cdi-gold: #a34c26;
  --cdi-gold-dim: #7a3818;
  --cdi-bg: #0a0a0a;
  --cdi-card: #141414;
  --cdi-border: #2a2a2a;
}

.course-gold {
  color: var(--cdi-gold);
}

.course-gold-bg {
  background-color: var(--cdi-gold);
}

.banner-carousel {
  position: relative;
  overflow: visible;
  min-height: 380px;
}

@media (min-width: 768px) {
  .banner-carousel {
    min-height: 480px;
  }
}

.banner-slide {
  display: none;
  animation: bannerFade 0.45s ease;
}

.banner-slide.is-active {
  display: block;
}

@keyframes bannerFade {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}

.progress-ring circle {
  fill: none;
  stroke-width: 6;
}

.progress-ring .bg {
  stroke: #333;
}

.progress-ring .fg {
  stroke: var(--cdi-gold);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.dialog-panel::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

/* Modal close: no browser default (blue) focus ring */
.dialog-close {
  outline: none;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}

.dialog-close:focus,
.dialog-close:focus-visible,
.dialog-close:active {
  outline: none;
  box-shadow: none;
}

.whatsapp-fab {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.whatsapp-fab:hover {
  filter: brightness(1.08);
}

/* Banner Carousel - 1 item per view */
.banner-carousel-single {
  position: relative;
}

.banner-wrapper {
  position: relative;
}

.banner-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.banner-controls .carousel-btn {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.3);
}

.banner-controls .carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.5);
}

.banner-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  padding: 4px 0;
}

.banner-track::-webkit-scrollbar {
  display: none;
}

.banner-track,
.carousel-track {
  cursor: grab;
}

.banner-track.grabbing,
.carousel-track.grabbing {
  cursor: grabbing;
}

.banner-item {
  scroll-snap-align: center;
  flex-shrink: 0;
  width: 100%;
}

.banner-image {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  aspect-ratio: 1280 / 720;
  object-fit: cover;
}

/* Module Carousels */
.module-carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  padding: 4px 0;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-item {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Responsive sizing: 2 items on mobile/tablet, 5 on desktop */
.carousel-item {
  width: calc((100% - 16px) / 2);
}

@media (min-width: 1024px) {
  .carousel-item {
    width: calc((100% - 64px) / 5);
  }
}

.carousel-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.carousel-btn:active {
  transform: scale(0.95);
}

/* Module Cards */
.module-card {
  display: block;
  text-decoration: none;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:not(.coming-soon):hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.module-image-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 12px;
}

.module-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* Coming Soon Overlay */
.coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.coming-soon-text {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.125rem;
  font-weight: 300;
  color: white;
  letter-spacing: 0;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
  .coming-soon-text {
    font-size: 1.25rem;
  }
}
