/* Sistema de diseño Ferrer Consulting — examen.ferrerconsulting.cc */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg-dark: #0B0B0C;
  --bg-card: #16181C;
  --bg-card-hover: #1E2026;
  --bg-modal: #121418;
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(245, 130, 11, 0.3);

  --text-main: #F2F2F2;
  --text-muted: #9CA0A8;
  --text-dim: #6B7280;

  --accent-orange-start: #F5820B;
  --accent-orange-end: #FF9A3D;
  --orange-gradient: linear-gradient(135deg, var(--accent-orange-start) 0%, var(--accent-orange-end) 100%);
  --orange-gradient-hover: linear-gradient(135deg, #FF9A3D 0%, #F5820B 100%);

  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  --radius-pill: 9999px;
  --radius-card: 14px;
  --radius-modal: 20px;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Capa de Fondo con Profundidad Atmosférica y Mesh Glows para Glassmorphism Real */
.bg-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  pointer-events: none;
  background-image: url('../assets/hero_bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-no-repeat;
  filter: brightness(0.65) contrast(1.1);
}

.bg-overlay-dark {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, rgba(11, 11, 12, 0.72) 0%, rgba(11, 11, 12, 0.94) 85%);
  z-index: 1;
}

/* Manchas de color difusas (Mesh Glows tipo Aurora Boreal apagada) */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  z-index: 2;
}

.glow-blue {
  top: 15%;
  left: 10%;
  width: 450px;
  height: 450px;
  background: #3B82F6;
}

.glow-amber {
  top: 45%;
  right: 15%;
  width: 500px;
  height: 500px;
  background: #F5B90B;
}

.glow-red {
  bottom: 10%;
  left: 20%;
  width: 420px;
  height: 420px;
  background: #E0402B;
}

.glow-green {
  top: 65%;
  left: 55%;
  width: 380px;
  height: 380px;
  background: #22C55E;
}

/* Typography */
h1, h2, h3, h4, .font-title {
  font-family: var(--font-title);
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--orange-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-tag {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--accent-orange-start);
  margin-bottom: 0.75rem;
  display: block;
}

/* Navbar con Glassmorphism */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(11, 11, 12, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 1.1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-name {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
  margin-left: 0.25rem;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--orange-gradient);
  color: #FFFFFF;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(245, 130, 11, 0.3);
}

.btn-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 130, 11, 0.45);
}

.btn-pill-outline {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
  box-shadow: none;
}

.btn-pill-outline:hover {
  border-color: var(--accent-orange-start);
  color: var(--accent-orange-start);
  box-shadow: 0 0 12px rgba(245, 130, 11, 0.2);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 5;
}

/* Hero Section */
.hero {
  padding: 9rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero-desc {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

/* Steps Indicator */
.steps-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  max-width: 750px;
  margin: 0 auto 3.5rem;
  position: relative;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.step-number {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--accent-orange-start);
  color: var(--accent-orange-start);
  font-family: var(--font-title);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: rgba(11, 11, 12, 0.8);
  backdrop-filter: blur(8px);
}

.step-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Grid System */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  padding-bottom: 6rem;
}

/* Glassmorphism Real en Tarjetas */
.card-course {
  background: rgba(22, 24, 28, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.card-course:hover {
  transform: translateY(-5px);
  background: rgba(26, 29, 35, 0.72);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 25px var(--card-theme, rgba(245, 130, 11, 0.25));
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.category-badge {
  background: rgba(245, 130, 11, 0.12);
  color: var(--accent-orange-start);
  border: 1px solid rgba(245, 130, 11, 0.25);
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

.code-badge {
  color: var(--text-dim);
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 600;
}

.course-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.course-subtitle {
  font-size: 0.85rem;
  color: var(--accent-orange-end);
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.course-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.card-footer .btn-pill {
  width: 100%;
}

/* Modal Iframe */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-modal);
  width: 90%;
  max-width: 900px;
  height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(22, 24, 28, 0.6);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-close:hover {
  color: var(--text-main);
}

.modal-body {
  flex-grow: 1;
  width: 100%;
  height: 100%;
  background: #FFFFFF;
}

.modal-body iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Floating WhatsApp / Action Button */
.floating-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--orange-gradient);
  box-shadow: 0 4px 18px rgba(245, 130, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  cursor: pointer;
  z-index: 90;
  transition: transform 0.3s ease;
}

.floating-btn:hover {
  transform: scale(1.1);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Lock Screen Modal for Admin */
.lock-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-dark);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lock-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.lock-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: #FFF;
  font-family: var(--font-title);
  font-size: 1.1rem;
  text-align: center;
  margin: 1.5rem 0 1rem;
  letter-spacing: 0.2em;
  outline: none;
}

.lock-input:focus {
  border-color: var(--accent-orange-start);
  box-shadow: 0 0 12px rgba(245, 130, 11, 0.2);
}

.error-msg {
  color: #FF4D4D;
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: none;
}

/* Buscador de Cursos */
.search-container {
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: var(--accent-orange-start);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 14px rgba(245, 130, 11, 0.25);
}

/* Estado Deshabilitado de Botón */
.btn-pill.disabled {
  background: #2A2D35 !important;
  color: #6B7280 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.brand-text-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-mobile-color-bar {
  display: none;
}

.card-header-mobile {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

/* Responsive Mobile Rules (<= 768px) */
@media (max-width: 768px) {
  .btn-text-full {
    display: inline;
  }

  .btn-text-short {
    display: none;
  }

  .hide-mobile {
    display: none !important;
  }

  .navbar {
    padding: 0.85rem 1rem;
  }

  .brand-logo {
    gap: 0.65rem;
  }

  .brand-logo img {
    height: 24px !important;
  }

  .brand-text-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    line-height: 1.1;
  }

  .brand-name {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }

  .brand-sub {
    font-size: 0.65rem;
    color: var(--accent-orange-start);
    font-weight: 700;
    margin-left: 0;
    letter-spacing: 0.05em;
  }

  .btn-text {
    display: none;
  }

  .navbar .btn-pill-outline {
    padding: 0.5rem 0.75rem;
  }

  .hero {
    padding: 4.5rem 0 1rem;
  }

  .hero-title {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin-bottom: 0.75rem;
  }

  .search-container {
    margin-bottom: 1.25rem;
  }

  .search-input {
    padding: 0.65rem 1rem 0.65rem 2.6rem;
    font-size: 0.88rem;
    border-radius: 12px;
  }

  .search-icon {
    left: 0.9rem;
    width: 16px;
    height: 16px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding-bottom: 2rem;
  }

  /* Rediseño Mobile Limpio y Vertical: Tarjeta en columna sin apretar elementos */
  .card-course {
    padding: 1.1rem 1.15rem;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-radius: 16px;
    gap: 0.85rem;
    background: rgba(18, 20, 24, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    border-top: none !important;
  }

  .card-mobile-color-bar {
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
  }

  .card-content-wrapper {
    flex: none;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .card-header-mobile {
    margin-bottom: 0.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .card-header-mobile .category-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.65rem;
    letter-spacing: 0.06em;
    font-weight: 700;
  }

  .card-header-mobile .code-badge {
    font-size: 0.75rem;
    opacity: 0.75;
    font-weight: 600;
  }

  .card-course .course-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0.2rem 0 0.1rem;
    white-space: normal;
    word-break: break-word;
    color: #FFFFFF;
    letter-spacing: -0.01em;
  }

  .card-course .card-footer {
    padding-top: 0.4rem;
    border-top: none;
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  .card-course .card-footer .btn-pill {
    padding: 0.65rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    width: 100%;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(245, 130, 11, 0.35);
  }

  .card-course .card-footer .btn-pill svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
  }

  .modal-container {
    width: 95%;
    height: 92vh;
  }

  .floating-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 48px;
    height: 48px;
  }

  .footer {
    padding: 1.75rem 1rem;
    font-size: 0.78rem;
    line-height: 1.5;
  }
}
