/* ==========================================================================
   ESTILOS PREMIUM TABLET - NAVEGACIÓN POR ICONOS Y GENERADOR PDF
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark-bg: #0f172a;
  --card-bg: #ffffff;
  --card-bg-subtle: #f8fafc;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 22px rgba(37, 99, 235, 0.28);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-sans);
  background-color: #f1f5f9;
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(6, 182, 212, 0.08) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: none;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ==========================================================================
   HEADER SUPERIOR TABLET
   ========================================================================== */
.top-header {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.brand-info h1 {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.brand-info p {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.promo-badge {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-cart-trigger {
  background: var(--dark-bg);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.15s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.btn-cart-trigger:active {
  transform: scale(0.96);
}

.cart-counter {
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   BANNER HERO & MOSAICO DE ICONOS DE NAVEGACIÓN
   ========================================================================== */
.tablet-banner {
  padding: 16px 24px 8px 24px;
}

.banner-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px 26px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.banner-text h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
  background: linear-gradient(90deg, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.banner-text p {
  color: #94a3b8;
  font-size: 13.5px;
}

/* Tiras de Iconos de Navegación Rápida por Temas */
.icon-nav-strip {
  padding: 12px 24px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.icon-nav-card {
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-sm);
}

.icon-nav-card:active {
  transform: scale(0.95);
}

.icon-nav-card.active {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: var(--shadow-glow);
}

.icon-circle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.icon-nav-card .nav-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.2;
}

.icon-nav-card .nav-sub {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   GRILLA PRINCIPAL DE CURSOS TÁCTIL
   ========================================================================== */
.courses-section {
  padding: 12px 24px 120px 24px;
  flex: 1;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}

@media (min-width: 960px) {
  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1260px) {
  .courses-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.course-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}

.course-card.is-selected {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.card-header-stripe {
  padding: 18px 20px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.course-code-badge {
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.card-icon-floating {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  margin-bottom: 8px;
}

.course-short-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  line-height: 1.45;
}

/* Iconos de características destacadas */
.icon-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  list-style: none;
}

.feature-icon-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg-subtle);
  border: 1px solid var(--border-color);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}

.feature-icon-item i {
  font-size: 15px;
  color: var(--primary);
  flex-shrink: 0;
}

/* Selector de Modalidad y Horario con Botones de Iconos */
.touch-selection-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
}

.section-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-buttons-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 10px;
}

.icon-buttons-row::-webkit-scrollbar {
  display: none;
}

.btn-icon-choice {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-icon-choice i {
  font-size: 14px;
}

.btn-icon-choice.active {
  background: var(--dark-bg);
  color: #ffffff;
  border-color: var(--dark-bg);
}

/* Caja de Precios */
.card-price-box {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px dashed #cbd5e1;
  margin-bottom: 16px;
}

.price-item .price-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

.price-item .price-val {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.price-item .price-val span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Acciones Táctiles */
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 10px;
}

.btn-detail {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-add-order {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  transition: all 0.15s ease;
}

.btn-add-order:active {
  transform: scale(0.97);
}

.btn-add-order.added {
  background: var(--success);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   DRAWER DE PEDIDOS / COTIZACIÓN Y ACCIONES PDF
   ========================================================================== */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -560px;
  width: 540px;
  max-width: 95vw;
  height: 100vh;
  background: #ffffff;
  z-index: 210;
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  padding: 18px 24px;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-close-cart {
  background: rgba(255, 255, 255, 0.18);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.cart-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.order-item-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
  position: relative;
}

.btn-remove-item {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #fee2e2;
  color: var(--danger);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.order-item-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  padding-right: 30px;
  margin-bottom: 8px;
}

.order-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 8px;
}

.order-item-meta span {
  background: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.client-info-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 16px;
}

.client-info-box h4 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-field {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13.5px;
  margin-bottom: 10px;
  font-family: inherit;
  outline: none;
}

.input-field:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.cart-footer {
  padding: 18px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: #64748b;
  margin-bottom: 6px;
}

.cart-summary-line.total {
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
}

.cart-actions-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.btn-pdf-download {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
}

.btn-whatsapp-order {
  background: #10b981;
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

.btn-clear-order {
  background: #fee2e2;
  color: #b91c1c;
  border: none;
  padding: 11px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  grid-column: span 2;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* ==========================================================================
   MODAL DE TEMARIOS DETALLADO CON ICONOS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.3);
}

.modal-header-hero {
  padding: 22px 28px;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.btn-close-modal {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-scroll-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}

.syllabus-item-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.syllabus-module-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e0e7ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.syllabus-module-content h4 {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.syllabus-module-content ul {
  list-style: none;
  font-size: 13px;
  color: #475569;
}

.syllabus-module-content ul li {
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.syllabus-module-content ul li i {
  color: var(--primary);
  font-size: 12px;
}

.modal-footer {
  padding: 16px 28px;
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Barra Flotante Tablet */
.tablet-floating-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  padding: 12px 24px;
  border-radius: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 90;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-floating-view {
  background: #10b981;
  color: #ffffff;
  border: none;
  padding: 9px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Responsivo para tablets en vertical */
@media (max-width: 850px) {
  .icon-nav-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 550px) {
  .icon-nav-strip {
    grid-template-columns: repeat(2, 1fr);
  }
  .cart-drawer {
    width: 100vw;
  }
}
