@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@700;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --primary: #7B42BC;
  --secondary: #00CA8E;
  --dark: #000000;
  --light: #FFFFFF;
  --peru-red: #D91023;
  --text: #000000;
  --yellow: #FFFF00;
  --blue: #0000FF;
  --border: #E5E7EB;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Space Mono', monospace;
  line-height: 1.5;
  color: #FFFFFF;
  background: #0A0A0A;
  min-height: 100vh;
}

/* Módulos: Forzar texto oscuro */
body.slides-mode {
  color: var(--dark) !important;
}

body.slides-mode * {
  color: var(--dark) !important;
}

body.slides-mode .header,
body.slides-mode .footer {
  color: #FFFFFF !important;
}

body.slides-mode .header *,
body.slides-mode .footer * {
  color: #FFFFFF !important;
}


.header {
  background: var(--dark);
  color: var(--light);
  padding: 1rem 0;
  border-bottom: 2px solid var(--primary);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 1.75rem;
}

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

.hero {
  text-align: left;
  padding: 4rem 3rem;
  margin-bottom: 3rem;
  background: var(--light);
  border: 2px solid var(--dark);
  transform: rotate(-1deg);
  box-shadow: 8px 8px 0 var(--primary);
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--dark);
}

.hero p {
  font-size: 1.25rem;
  color: var(--dark);
  max-width: 600px;
  margin-bottom: 2rem;
  font-weight: 700;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: var(--dark);
  color: var(--light);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--dark);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 1px;
  transition: all 0.1s;
  box-shadow: 4px 4px 0 var(--primary);
}

.btn:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--primary);
}

.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0 0 0 var(--primary);
}

.btn-primary {
  background: var(--primary);
  box-shadow: 4px 4px 0 var(--dark);
}

.btn-primary:hover {
  box-shadow: 2px 2px 0 var(--dark);
}

.btn-primary:active {
  box-shadow: 0 0 0 var(--dark);
}

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

.card {
  background: #1A1A1A;
  padding: 2rem;
  border: 2px solid #FFFFFF;
  transition: all 0.2s;
  position: relative;
  color: #FFFFFF;
}

.card:nth-child(odd) {
  transform: rotate(1deg);
}

.card:nth-child(even) {
  transform: rotate(-1deg);
}

.card:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 8px 8px 0 #7B42BC;
}

.card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: #FFFFFF;
  text-transform: uppercase;
}

.card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #7B42BC;
  text-transform: uppercase;
}

.card p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--dark);
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid var(--dark);
}

.footer {
  background: var(--dark);
  color: var(--light);
  text-align: center;
  padding: 3rem 2rem;
  margin-top: 5rem;
  border-top: 2px solid var(--peru-red);
}

.footer p {
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.footer a {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid var(--yellow);
}

.footer a:hover {
  background: var(--yellow);
  color: var(--dark);
}

.btn-logout {
  padding: 0.5rem 1rem;
  background: var(--light);
  border: 1px solid var(--light);
  color: var(--dark);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.1s;
  font-family: 'Space Mono', monospace;
}

.btn-logout:hover {
  background: var(--yellow);
  border-color: var(--yellow);
}

.btn-login {
  padding: 0.5rem 1rem;
  background: var(--yellow);
  border: 1px solid var(--dark);
  color: var(--dark);
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.1s;
  font-family: 'Space Mono', monospace;
  text-decoration: none;
  display: inline-block;
}

.btn-login:hover {
  background: var(--light);
  transform: translate(2px, 2px);
}

#user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Prevent flash of unauthenticated content (FOUC) */
#user-info.auth-loading {
  opacity: 0;
  pointer-events: none;
}

#user-info span {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
}


/* Utility Classes */
.badge-disabled {
  background: #666;
}

.card-disabled {
  opacity: 0.6;
  pointer-events: none;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: #6B7280;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mt-neg-1 {
  margin-top: -0.5rem;
}

.hero-subtitle {
  font-size: 0.875rem;
  margin-top: -0.5rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

.hero-image {
  max-width: 300px;
  margin-bottom: 2rem;
}

.hero-image-sm {
  max-width: 180px;
  margin-bottom: 1rem;
}

.hero-image-md {
  max-width: 280px;
  margin-bottom: 2rem;
}

.product-image {
  height: 80px;
  margin-bottom: 1.5rem;
}

.list-styled {
  margin: 1rem 0;
}

.list-indented {
  margin-left: 2rem;
}

/* Announcement Banner (FEAT-020) */
.announcement-banner {
  background: var(--yellow);
  border-bottom: 1px solid var(--text);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.announcement-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex: 1;
  flex-wrap: wrap;
}

.announcement-text {
  font-weight: 700;
  font-size: 1rem;
  color: #000000;
}

.announcement-cta {
  background: var(--text);
  color: var(--light);
  padding: 0.5rem 1.5rem;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--text);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.1s;
}

.announcement-cta:hover {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.announcement-close {
  background: transparent;
  border: none;
  font-size: 2rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}

.announcement-close:hover {
  transform: scale(1.2);
}

@media (max-width: 768px) {
  .announcement-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .announcement-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .announcement-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }
}

/* Progress Indicator (FEAT-009) */
.module-progress {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 2px solid var(--text);
}

.progress-bar {
  width: 100%;
  height: 24px;
  background: var(--light);
  border: 1px solid var(--text);
  position: relative;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--secondary);
  border-right: 1px solid var(--text);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text);
}

.progress-fill:empty {
  justify-content: flex-start;
}

.progress-text {
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-text .completed-icon {
  color: var(--secondary);
  font-size: 1.25rem;
}

.progress-text .in-progress-icon {
  color: var(--accent);
  font-size: 1.25rem;
}

.progress-text .not-started-icon {
  color: #999;
  font-size: 1.25rem;
}

/* Module card hover effect with progress */
.card:has(.module-progress):hover .progress-fill {
  background: var(--primary);
}

/* ============================================
   RESPONSIVE DESIGN (WEB-001)
   ============================================ */

/* Hamburger Menu Button */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 28px;
  height: 3px;
  background: var(--light);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Navigation Overlay */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* Mobile Navigation Menu */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background: var(--dark);
  z-index: 1000;
  transition: right 0.3s ease;
  overflow-y: auto;
  border-left: 1px solid var(--primary);
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-nav-header img {
  height: 30px;
}

.mobile-nav-header span {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--light);
}

.mobile-nav-links {
  padding: 1rem 0;
}

.mobile-nav-links a {
  display: block;
  padding: 1rem 1.5rem;
  color: var(--light);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  border-left: 1px solid transparent;
  transition: all 0.2s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a:active {
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--primary);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  /* Show hamburger, hide desktop nav links (but keep user-info visible) */
  .hamburger {
    display: flex;
  }
  
  .header-content nav > a {
    display: none !important;
  }
  
  /* Keep user-info visible in mobile */
  .header-content nav {
    display: flex !important;
  }
  
  #user-info {
    display: flex !important;
  }
  
  /* Hero adjustments */
  .hero {
    padding: 2rem 1.5rem !important;
    transform: rotate(0deg) !important;
  }
  
  .hero h1 {
    font-size: 2rem !important;
  }
  
  .hero p {
    font-size: 1rem !important;
  }
  
  .hero img {
    max-width: 200px !important;
  }
  
  /* Grid to single column */
  .grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  /* Cards */
  .card {
    transform: rotate(0deg) !important;
    padding: 1.5rem !important;
  }
  
  .card:hover {
    transform: scale(1.02) !important;
  }
  
  /* Container padding */
  .container {
    padding: 2rem 1rem !important;
  }
  
  /* Footer */
  .footer {
    padding: 2rem 1rem !important;
  }
  
  /* Buttons */
  .btn {
    padding: 0.875rem 1.5rem !important;
    font-size: 0.875rem !important;
  }
  
  /* Announcement banner */
  .announcement-banner {
    flex-direction: column !important;
    padding: 1rem !important;
    gap: 0.75rem !important;
  }
  
  .announcement-content {
    flex-direction: column !important;
    gap: 0.75rem !important;
  }
  
  .announcement-text {
    font-size: 0.875rem !important;
  }
  
  .announcement-cta {
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Tablet: 2 columns */
  .grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Adjust hero */
  .hero h1 {
    font-size: 2.5rem !important;
  }
  
  /* Container padding */
  .container {
    padding: 2.5rem 1.5rem !important;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .hero h1 {
    font-size: 1.75rem !important;
  }
  
  .hero p {
    font-size: 0.875rem !important;
  }
  
  .card h3 {
    font-size: 1.5rem !important;
  }
  
  .card p {
    font-size: 0.8rem !important;
  }
}

