/* Componentes específicos del grid de semanas */

/* El link ocupa todo el bloque y no se subraya */
.week-link{
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Tarjeta principal con imagen de fondo */
.week-tile{
  position: relative;
  height: 160px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
  transform: translateY(0);
  transition: transform .2s ease, box-shadow .2s ease;
  background-size: cover;
  background-position: center;
}

/* Capa suave para mejorar legibilidad del texto */
.week-overlay{
  position: absolute;
  inset: 0;
  background: rgba(255, 253, 251, 0.55);
  backdrop-filter: blur(0px);
  transition: backdrop-filter .25s ease, background .25s ease;
}

/* Contenido encima */
.week-content{
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* Tipografía de semana */
.week-number{
  font-size: .75rem;
  font-weight: 700;
  color: #F4A261;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.week-title{
  margin: .35rem 0 0 0;
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.2;
}

/* Hover: elevación + blur + ligero zoom de imagen */
.week-link:hover .week-tile{
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,0,0,.09);
}

.week-link:hover .week-overlay{
  background: rgba(255, 253, 251, 0.45);
  backdrop-filter: blur(6px);
}

/* Accesibilidad: foco con teclado */
.week-link:focus-visible .week-tile{
  outline: 3px solid rgba(233, 196, 106, .7);
  outline-offset: 3px;
}

:root{
  --bg: #FFFDFB;
  --text: #2F2F2F;
  --muted: #6B6B6B;

  --accent: #F4A261;
  --accent2: #E9C46A;

  --doneBg: rgba(46, 204, 113, .14);
  --progressBg: rgba(233, 196, 106, .22);
  --pendingBg: rgba(140, 140, 140, .12);
}

body{
  background: var(--bg);
  color: var(--text);
}

.section{
  padding: 2.5rem 0;
}

.soft-block{
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 10px 24px rgba(0,0,0,.05);
}

/* Mobile TOC button */
.toc-mobile-btn{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 1050;
  border-radius: 999px;
  padding: .6rem .9rem;
  box-shadow: 0 10px 20px rgba(0,0,0,.12);
}

/* Status boxes (with color + left border) */
.status-box{
  border: 1px solid rgba(0,0,0,.06);
}
.status-done{ background: var(--doneBg); border-left: 6px solid #2ecc71; }
.status-progress{ background: var(--progressBg); border-left: 6px solid var(--accent2); }
.status-pending{ background: var(--pendingBg); border-left: 6px solid rgba(0,0,0,.25); }

/* Table look */
.table-soft{
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  overflow: hidden;
}
.table-soft thead th{
  background: rgba(233, 196, 106, .20);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.table-soft td, .table-soft th{
  border-color: rgba(0,0,0,.06) !important;
}

/* Carousel */
.soft-carousel{
  background: rgba(233, 196, 106, .16);
}

/* Desktop Floating TOC (small + responsive safe) */
.toc-float{
  position: fixed;
  right: 16px;
  top: 92px;
  width: 210px;          /* smaller */
  z-index: 1030;
}
.toc-card{
  border-radius: 16px;
}
.toc-list{
  display: grid;
  gap: .25rem;
  max-height: 54vh;
  overflow: auto;
  padding-right: .25rem;
}
.toc-link{
  display: block;
  text-decoration: none;
  color: var(--muted);
  font-size: .86rem;
  padding: .25rem .45rem;
  border-radius: 10px;
}
.toc-link:hover{
  background: rgba(233, 196, 106, .18);
  color: var(--text);
}
.toc-list .active{
  background: rgba(244, 162, 97, .18);
  color: var(--text);
  border-left: 3px solid var(--accent);
}

/* Collapsed TOC state */
.toc-collapsed .toc-list{
  display: none;
}


/* Contenedor de imagen del carrusel + caja de texto encima */

/* Carousel image container: keep a fixed visual height but center images
   and preserve their aspect ratio without distortion. Use `contain` so
   SolidWorks screenshots won't be cropped awkwardly. */
.carousel-img-wrap{
  position: relative;
  height: 360px;            /* visual box height for carousel slides */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(250,250,250,0.8);
}

.carousel-img-wrap img{
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* avoid cropping; preserve full image */
  display: block;
}

/* Caja de texto suave sobre la imagen */
.carousel-caption-soft{
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
}

/* Responsive: en pantallas pequeñas baja un poco la altura */
@media (max-width: 576px){
  .carousel-img-wrap{
    height: 260px;
  }
}


/* =========================
   IMAGEN ÚNICA
   Ocupa todo el ancho del bloque
========================= */
#single-image img {
  width: 100%;          /* Ocupa todo el ancho disponible */
  max-height: 520px;    /* Evita que se vuelva gigante */
  object-fit: cover;    /* Recorta sin deformar */
  display: block;
}



/* =========================
   IMAGEN + TEXTO
   Imagen dominante visualmente
========================= */
#img-left img,
#img-right img {
  max-height: 420px;
  object-fit: cover;
}

/* El texto se siente más compacto */
#img-left p,
#img-right p {
  font-size: 0.95rem;
  line-height: 1.5;
}


/* =========================
   DOS IMÁGENES MISMO TAMAÑO
========================= */
#two-images .img-box {
  width: 100%;
  height: 260px;        /* Ambas exactamente igual */
  overflow: hidden;
  border-radius: 1rem; /* Igual a rounded-4 */
}

#two-images .img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;   /* Recorta sin deformar */
  display: block;
}