/* Termodinámica I — estilos del curso
   Marca: azul #05336B (primario) + naranja quemado #C15B2E (acento/calor) */

:root {
  --td-blue:        #05336B;
  --td-orange:      #C15B2E;
  --td-orange-dark: #6B2508;
  --td-orange-soft: #f3e3da;
}

/* ── Page banner ─────────────────────────────────────────────────────────── */

.page-banner {
  display: block;
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  margin: 0;
}

.page-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.page-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 51, 107, 0.42);
}

.page-banner-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 90px;
  background: linear-gradient(to bottom, transparent, #ffffff);
}

.page-banner-title {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  padding: 0 max(2rem, calc(50vw - 560px));
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.nav-footer {
  background-color: var(--td-blue) !important;
  border-top: none !important;
}

.nav-footer,
.nav-footer p,
.nav-footer a,
.nav-footer .nav-footer-center a {
  color: rgba(255, 255, 255, 0.85) !important;
}

.nav-footer a:hover { color: #ffffff !important; opacity: 1 !important; }

/* Enlaces y acentos */
a {
  color: var(--td-blue);
}
a:hover {
  color: var(--td-orange);
}

/* Encabezados con un toque cálido */
h1, h2, h3 {
  color: var(--td-blue);
}
h2 {
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.2rem;
}

/* Botón de acento (naranja) */
.btn-accent {
  background-color: var(--td-orange);
  border-color: var(--td-orange);
  color: #fff !important;
}
.btn-accent:hover {
  background-color: #a54a22;
  border-color: #a54a22;
  color: #fff !important;
}

/* Botones de una clase (slides / notas) — estilo tipo GWU */
.class-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.class-buttons .label {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--td-blue);
}
.btn-slides, .btn-notes {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.btn-slides {
  background: var(--td-blue);
  color: #fff !important;
}
.btn-slides:hover {
  background: #04275a;
  color: #fff !important;
}
.btn-notes {
  background: var(--td-orange);
  color: #fff !important;
}
.btn-notes:hover {
  background: #a54a22;
  color: #fff !important;
}

/* Iframe de diapositivas embebidas */
.slides-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin: 1rem 0;
}

/* Tarjetas de clases (listing) */
.quarto-grid-item .card-img-top,
.thumbnail-image {
  object-fit: cover;
  background: #fff;
}

/* Tabla del cronograma */
table {
  font-size: 0.95rem;
}

/* Visor de PDF embebido (diapositivas y ejercicios) */
.pdf-viewer iframe {
  width: 100%;
  height: clamp(420px, 68vh, 720px);
  border: 1px solid #d9dde3;
  border-radius: 8px;
  background: #f4f5f7;
}
.pdf-actions {
  display: flex;
  gap: 0.6rem;
  margin: 0.6rem 0 0.25rem;
  flex-wrap: wrap;
}
.btn-open {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--td-blue);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.45rem 0.95rem;
  border-radius: 6px;
}
.btn-open:hover { background: #04275a; color: #fff !important; }
.btn-open.accent { background: var(--td-orange); }
.btn-open.accent:hover { background: #a54a22; color: #fff !important; }

/* ── Module cards ─────────────────────────────────────────────────────────── */

.td-module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  margin: 1.5rem 0 2rem;
}

.td-module-card {
  background: #F2F5F8;
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: 0 3px 16px rgba(0,0,0,0.10);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.td-module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  color: inherit !important;
}

.td-module-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.td-module-body {
  padding: 0.75rem 1rem 0.9rem;
  flex: 1;
}

.td-module-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--td-orange);
  margin-bottom: 0.25rem;
}

.td-module-title {
  font-size: 0.88rem;
  font-weight: 400;
  color: #1a1a1a;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 860px) {
  .td-module-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .td-module-grid { grid-template-columns: 1fr; }
}

/* Placeholder cuando aún no hay PDF cargado */
.pdf-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  border: 2px dashed #cfd4da;
  border-radius: 8px;
  background: #fafbfc;
  color: #8a93a0;
  font-size: 0.95rem;
  padding: 1.5rem;
}
