.contenedor-cartas {
  height: 100%;
  width: calc(100% - 20px);
  border: var(--azul-claro) 0.5px solid;
  box-shadow: 4px 4px 21px rgba(188, 188, 188, 0.091);
  padding: 10px;
  border-radius: 8px;
  position: relative;
}

#leftPortion .card,
#leftPortion .card-body {
  overflow: visible !important;
}

#leftPortion .card-body .btn {
  border: 2px solid green;
  color: black !important;
  transition: 0.3s;
  font-weight: 900;
}

#lista-planeaciones {
  width: 100%;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-wrap: wrap;
  overflow-y: auto;
}

#lista-planeaciones .card {
  width: calc(100% - 51%);
}

.btn-footer {
  position: relative;
  width: 100%;
  height: 30px;
}

#lista-planeaciones .card-body .btn {
  position: absolute;
  width: 100%;
  bottom: 0;
  border-top-left-radius: 0%;
  border-top-right-radius: 0%;
}

#lista-planeaciones .card-body {
  padding: 0;
}

#lista-planeaciones .card-body-footer,
#list-planeaciones .card-body-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

.seccion-cartas {
  height: calc(100% - 110px);
  overflow-y: auto;
}

.card.active {
  background-color: #9ac33194;
}

.acciones {
  height: 100px;
  width: calc(100% - 10px);
  border-radius: 8px;
  background-color: var(--azul-claro);
  position: absolute;
  bottom: 5px;
  left: 5px;
}

#lista-dimensiones {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
}

.acciones img {
  display: block;
  height: 100%;
  width: 100%;
  object-fit: contain;
  margin: auto;
}

#leftPortion {
  padding-top: 15px;
  padding-bottom: 15px;
  max-height: 100%;
}

#leftPortion div .arrow {
  color: white;
  font-size: 2em;
  transition: 0.3s;
  margin-left: 5px;
}

#leftPortion div .fa-arrow-circle-right:hover {
  font-size: 2.5em;
  margin-left: 1em;
}

.homeCard {
  display: flex !important;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  width: calc(100% - 15px);
}

.municipios {
  display: none;
  margin: auto;
  margin-bottom: 10px;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  width: calc(100% - 15px);
}

.municipios .card-body {
  padding: .5rem;
}

.homeCard .card:hover {
  border: 1px solid var(--verde-claro);
  transition: 0.3s ease;
}

#lista-dimensiones .card:hover {
  border: 1px solid var(--verde-claro);
  transition: 0.3s ease;
  cursor: pointer;
}

.active {
  display: flex !important;
}


/* Calendar */

#calendarTab {
  height: 100%;
}

/* --- BOOTSTRAP STACKING FIX (Essential) --- */
#galleryModal {
  z-index: 1060;
}

/* --- GRID LAYOUT --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  padding: 10px 0;
}

/* --- IMAGES --- */
.gallery-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: transform 0.2s;
}

.gallery-img:hover {
  transform: scale(1.03);
}

/* --- PDF FILE CARDS --- */
.file-card {
  width: 100%;
  height: 150px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-align: center;
  padding: 10px;
  box-sizing: border-box;
  transition: transform 0.2s;
}

.file-card:hover {
  transform: scale(1.03);
  background: #fff;
  border-color: #bbb;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.file-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  fill: #dc3545;
}

.file-name {
  font-size: 13px;
  color: #333;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}