/* ==========================================================================
   TEC Academic Portal - Swiss Modernism 2.0 Theme Skin & Resource Cards
   Instituto Tecnológico de Costa Rica · Estructuras de Datos y Algoritmos
   ========================================================================== */

:root {
  --tec-navy-900: #0f1d30;
  --tec-navy-800: #1e3a5f;
  --tec-navy-700: #2a4e7f;
  --tec-blue-600: #2563eb;
  --tec-blue-500: #3b82f6;
  --tec-blue-100: #dbeafe;
  --tec-blue-50:  #eff6ff;
  --tec-gold-600: #a16207;
  --tec-gold-500: #d97706;
  --tec-gold-50:  #fef3c7;
  --tec-slate-900:#0f172a;
  --tec-slate-700:#334155;
  --tec-slate-500:#64748b;
  --tec-slate-300:#cbd5e1;
  --tec-slate-200:#e2e8f0;
  --tec-slate-100:#f1f5f9;
  --tec-slate-50: #f8fafc;
  --tec-font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --tec-font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --tec-radius-sm:6px;
  --tec-radius-md:10px;
  --tec-radius-lg:14px;
}

/* Institutional Banner (Top Bar) */
.tec-institutional-bar {
  background: var(--tec-navy-800);
  color: #ffffff;
  font-family: var(--tec-font-sans);
  font-size: 0.8125rem;
  line-height: 1.4;
  padding: 0.45rem 1.5rem;
  border-bottom: 2px solid var(--tec-gold-500);
}

.tec-institutional-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tec-institutional-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.tec-institutional-badge {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
}

.tec-institutional-course {
  color: #e2e8f0;
  font-size: 0.75rem;
}

/* Breadcrumbs Bar */
.tec-breadcrumbs {
  font-family: var(--tec-font-sans);
  font-size: 0.825rem;
  color: var(--tec-slate-500);
  padding: 0.6rem 0;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid var(--tec-slate-200);
}

.tec-breadcrumbs a {
  color: var(--tec-navy-700);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.tec-breadcrumbs a:hover {
  color: var(--tec-blue-600);
  text-decoration: underline;
}

.tec-breadcrumbs .separator {
  color: var(--tec-slate-300);
  font-size: 0.75rem;
}

.tec-breadcrumbs .current {
  color: var(--tec-slate-700);
  font-weight: 600;
}

/* Academic Resource Cards Grid */
.tec-resource-section-title {
  font-family: var(--tec-font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tec-navy-900);
  margin: 1.75rem 0 0.85rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid var(--tec-slate-200);
  padding-bottom: 0.4rem;
}

.tec-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.15rem;
  margin: 1rem 0 2rem 0;
  font-family: var(--tec-font-sans);
}

.tec-card {
  background: #ffffff;
  border: 1px solid var(--tec-slate-200);
  border-radius: var(--tec-radius-md);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.tec-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -2px rgba(15, 23, 42, 0.08), 0 3px 6px -2px rgba(15, 23, 42, 0.04);
  border-color: var(--tec-slate-300);
}

.tec-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.tec-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--tec-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.tec-card-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  line-height: 1.3;
}

/* Type variations */
.tec-type-lesson .tec-card-icon { background: var(--tec-blue-50); color: var(--tec-blue-600); }
.tec-type-lesson .tec-card-badge { background: var(--tec-blue-100); color: var(--tec-navy-800); }
.tec-type-lesson { border-top: 3px solid var(--tec-blue-600); }

.tec-type-slide .tec-card-icon { background: #f5f3ff; color: #7c3aed; }
.tec-type-slide .tec-card-badge { background: #ede9fe; color: #5b21b6; }
.tec-type-slide { border-top: 3px solid #7c3aed; }

.tec-type-code .tec-card-icon { background: #ecfdf5; color: #059669; }
.tec-type-code .tec-card-badge { background: #d1fae5; color: #065f46; }
.tec-type-code { border-top: 3px solid #059669; }

.tec-type-archive .tec-card-icon { background: var(--tec-gold-50); color: var(--tec-gold-600); }
.tec-type-archive .tec-card-badge { background: var(--tec-gold-50); color: var(--tec-gold-600); }
.tec-type-archive { border-top: 3px solid var(--tec-gold-500); }

.tec-type-doc .tec-card-icon { background: #fef2f2; color: #dc2626; }
.tec-type-doc .tec-card-badge { background: #fee2e2; color: #991b1b; }
.tec-type-doc { border-top: 3px solid #dc2626; }

.tec-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tec-slate-900);
  line-height: 1.35;
  margin: 0 0 0.85rem 0;
}

.tec-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.65rem;
}

.tec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: var(--tec-radius-sm);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  line-height: 1.25;
}

.tec-btn-primary {
  background: var(--tec-navy-800);
  color: #ffffff !important;
  flex: 1;
}

.tec-btn-primary:hover {
  background: var(--tec-blue-600);
  color: #ffffff !important;
  text-decoration: none;
}

.tec-btn-outline {
  background: transparent;
  color: var(--tec-slate-700) !important;
  border-color: var(--tec-slate-300);
}

.tec-btn-outline:hover {
  background: var(--tec-slate-100);
  border-color: var(--tec-slate-500);
  color: var(--tec-navy-900) !important;
  text-decoration: none;
}

/* Modal Overlay & Viewer */
.tec-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(4px);
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tec-modal-overlay.is-active {
  display: flex;
  opacity: 1;
}

.tec-modal-container {
  background: #ffffff;
  width: 100%;
  max-width: 1140px;
  height: 90vh;
  border-radius: var(--tec-radius-lg);
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--tec-slate-300);
}

.tec-modal-header {
  background: var(--tec-navy-800);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--tec-gold-500);
  flex-shrink: 0;
}

.tec-modal-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tec-modal-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tec-modal-nav-group {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.2rem 0.35rem;
  border-radius: var(--tec-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.tec-modal-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.35rem 0.65rem;
  border-radius: var(--tec-radius-sm);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.15s ease;
  text-decoration: none;
  user-select: none;
}

.tec-modal-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.tec-modal-btn:active {
  transform: translateY(1px);
}

.tec-modal-nav-home {
  background: rgba(217, 119, 6, 0.25);
  border-color: rgba(217, 119, 6, 0.45);
}

.tec-modal-nav-home:hover {
  background: rgba(217, 119, 6, 0.4);
}

.tec-modal-close {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
}

.tec-modal-close:hover {
  background: rgba(239, 68, 68, 0.4);
}

.tec-modal-body {
  flex: 1;
  background: #f8fafc;
  overflow: hidden;
  position: relative;
}

.tec-modal-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #ffffff;
}

/* Institutional Footer */
.tec-institutional-footer {
  background: var(--tec-navy-900);
  color: var(--tec-slate-300);
  font-family: var(--tec-font-sans);
  font-size: 0.8125rem;
  line-height: 1.5;
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  border-top: 3px solid var(--tec-gold-500);
}

.tec-institutional-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.tec-footer-column h4 {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
}

.tec-footer-column p {
  margin: 0 0 0.35rem 0;
  color: var(--tec-slate-300);
}

/* ==========================================================================
   Proyecto #1A: Fase Orbital - Card de Proyecto Académico
   ========================================================================== */
.tec-project-card {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid #1e293b;
  border-radius: 18px;
  padding: 2rem 2.25rem;
  box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.4);
  margin: 1.5rem 0 2.5rem 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: relative;
  overflow: hidden;
}

.tec-project-pill {
  display: inline-flex;
  align-items: center;
  background: #064e3b;
  color: #34d399;
  border: 1px solid #059669;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.tec-project-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem 0;
  line-height: 1.15;
}

.tec-project-subtitle {
  font-size: 0.95rem;
  color: #94a3b8;
  margin-bottom: 0.85rem;
  line-height: 1.4;
}

.tec-project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #1e293b;
}

.tec-project-meta span b {
  color: #ffffff;
}

.tec-demo-banner {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid #0284c7;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}

.tec-demo-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 260px;
}

.tec-demo-icon {
  font-size: 2rem;
  line-height: 1;
}

.tec-demo-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 0.25rem 0;
}

.tec-demo-info p {
  font-size: 0.825rem;
  color: #94a3b8;
  margin: 0;
  line-height: 1.35;
}

.tec-demo-btn {
  background: #0284c7;
  color: #ffffff !important;
  border: 1px solid #38bdf8;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.7rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tec-demo-btn:hover {
  background: #0369a1;
  border-color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
  color: #ffffff !important;
  text-decoration: none;
}

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

.tec-box-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
}

.tec-box-card h5 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 1rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tec-box-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tec-box-card ul li {
  font-size: 0.825rem;
  color: #94a3b8;
  line-height: 1.5;
  margin-bottom: 0.85rem;
  position: relative;
  padding-left: 1.1rem;
}

.tec-box-card ul li::before {
  content: "•";
  color: #38bdf8;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.tec-box-card ul li b {
  color: #f1f5f9;
}

.tec-box-card ul li code {
  background: #0f172a;
  color: #38bdf8;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.775rem;
  border: 1px dashed #334155;
}

.tec-controls-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.825rem;
}

.tec-controls-table tr td {
  padding: 0.5rem 0;
  border-bottom: 1px solid #334155;
  vertical-align: middle;
}

.tec-controls-table tr:last-child td {
  border-bottom: none;
}

.tec-controls-table .label {
  color: #cbd5e1;
  font-weight: 600;
  width: 25%;
}

.tec-controls-table .val {
  color: #94a3b8;
  text-align: right;
}

.tec-key-badge {
  display: inline-block;
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #475569;
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0.15rem;
}

.tec-color-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-left: 0.25rem;
}

.tec-pill-cyan {
  background: #083344;
  color: #38bdf8;
  border: 1px solid #0284c7;
}

.tec-pill-magenta {
  background: #500724;
  color: #f472b6;
  border: 1px solid #db2777;
}

.tec-pill-amber {
  background: #451a03;
  color: #fbbf24;
  border: 1px solid #d97706;
}
