/* ===== UHIBA Residencias Design System - Turnera ===== */

body {
  background: #f4f6f5 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

/* --- Hero Banner --- */
.t-banner {
  background: url('https://static.iuhiba.org/external-assets/design_system/encabezado_back_img_40op.png'), linear-gradient(135deg, #009C4D 0%, #007339 100%);
  background-blend-mode: multiply, normal;
  background-size: cover;
  padding: 5rem 2rem 4.5rem !important;
  position: relative;
  overflow: hidden;
}


.t-banner {
  .titles {
    display: flex;
    flex-direction: column;

    h2 {
      font-size: 1rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: #008944;
      background-color: #ffffffc2;
      padding: 0.5rem 1.5rem;
      width: fit-content;
      margin: 0 auto 1rem;
      border-radius: 50px;
      order: 1;
    }

    h1 {
      font-size: 2.6rem;
      font-weight: 700;
      color: #fff;
      line-height: 1.15;
      margin: 0;
      order: 2;
    }
  }
}

/* --- Main container (wider) --- */
.container.my-5 {
  max-width: 1500px !important;
  width: 94% !important;
  padding: 2rem 0 !important;
}

/* --- Day Header Grid --- */

.sd-calendar {

  .header-grid {

    background: linear-gradient(135deg, #009C4D 0%, #007339 100%);
    border-radius: 12px 12px 0 0;
    border: none;
    position: sticky;
    top: 2rem;
    background-color: #f9f8f8;
    z-index: 1;
    height: 3rem;
    isolation: isolate;

    &::before {
      content: '';
      position: absolute;
      top: 0;
      background: linear-gradient(135deg, #009C4D 0%, #007339 100%);
      border-radius: 12px 12px 0 0;
      width: 100%;
      z-index: 1;
      height: 1rem;
    }

    &::after {
      content: '';
      position: absolute;
      top: -2rem;
      background: #f4f6f5;
      width: 100%;
      height: 3rem;
    }

    .title-row {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      position: relative;
      z-index: 2;

      >div {
        background: transparent;
        color: #fff;
        font-weight: 700;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 0.9rem 0.5rem;
        text-align: center;
        border: none;
      }

    }

  }

}



/* --- Schedule Grid --- */
.sd-grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  gap: 0 !important;
  border: 1px solid #b0b5b3 !important;
  border-top: none !important;
  border-radius: 0 0 12px 12px !important;
  overflow: hidden;
  background: #e8ebe9 !important;
}

/* All grid cells base */
.sd-grid>div {
  padding: 0.75rem !important;
  background: #fff !important;
  border-right: 1px solid #b0b5b3 !important;
  border-bottom: 1px solid #b0b5b3 !important;
  min-height: 60px;
}

.sd-grid>div:nth-child(5n) {
  border-right: none !important;
}

/* Empty cells */
.sd-grid>div.sd-empty-cell {
  background: #e9eceb !important;
}

/* --- Date headings --- */
.sd-grid h3 {
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: #009C4D !important;
  text-align: center !important;
  margin: 0.4rem 0 0.7rem !important;
  padding-bottom: 0.55rem !important;
  border-bottom: 3px solid #009C4D !important;
}

/* --- Event Cards --- */
.sd-event {
  background: #d2ecdb !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.2s ease !important;
  overflow: hidden !important;
  margin-bottom: 0.6rem !important;
  padding: 0 !important;
}

.sd-event:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Rotate card colors - max contrast between vertical neighbors */
.sd-event:nth-child(1) {
  background: #c6e6cf !important;
}

.sd-event:nth-child(2) {
  background: #b8ddd5 !important;
}

.sd-event:nth-child(3) {
  background: #cce6c4 !important;
}

.sd-event:nth-child(4) {
  background: #b5d9cc !important;
}

/* Time badge - flush with card edges */
.sd-event>span {
  display: block !important;
  background: linear-gradient(135deg, #009C4D, #00b35a) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  padding: 0.35rem 0.75rem !important;
  text-align: center !important;
  letter-spacing: 0.03em !important;
  border-radius: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Content list - white, inset with equal padding and rounded corners */
.sd-event .list-group {
  background: #fff !important;
  margin: 0.4rem !important;
  border-radius: 8px !important;
  border: none !important;
}

.sd-event .list-group-item {
  border: none !important;
  border-bottom: 1px solid #d0d0d0 !important;
  padding: 0.6rem 0.75rem !important;
  background: transparent !important;
}

.sd-event .list-group-item:last-child {
  border-bottom: none !important;
}

.sd-event .list-group-item p {
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  margin-bottom: 0.3rem !important;
  line-height: 1.3 !important;
}

/* "Anotarme" Buttons */
.sd-event .btn-primary.ts {
  background: transparent !important;
  border: 2px solid #009C4D !important;
  color: #009C4D !important;
  font-weight: 600 !important;
  font-size: 0.7rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 0.18rem 0.9rem !important;
  border-radius: 6px !important;
  transition: all 0.2s ease !important;
  width: auto !important;
  margin: 0.8rem auto 0.2rem !important;
}

.sd-event .btn-primary.ts:hover {
  background: #009C4D !important;
  color: #fff !important;
}

/* --- Modal --- */
#attendanceModal .modal-content {
  border-radius: 12px !important;
  border: none !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
  overflow: hidden;
}

#attendanceModal .modal-header {
  background: linear-gradient(135deg, #009C4D 0%, #007339 100%) !important;
  color: #fff !important;
  border: none !important;
  padding: 1.25rem 1.5rem !important;
}

#attendanceModal .modal-header h5,
#attendanceModal .modal-header .modal-title {
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1.15rem !important;
}

#attendanceModal .modal-header .btn-close,
#attendanceModal .modal-header .close {
  color: #fff !important;
  opacity: 0.8 !important;
  filter: brightness(0) invert(1) !important;
}

#attendanceModal .modal-body {
  padding: 1.5rem !important;
}

#attendanceModal .modal-body label {
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: #333 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  margin-bottom: 0.3rem !important;
}

#attendanceModal .modal-body input,
#attendanceModal .modal-body select {
  border: 2px solid #009C4D !important;
  border-radius: 8px !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.9rem !important;
  transition: all 0.2s ease !important;
}

#attendanceModal .modal-body input:focus,
#attendanceModal .modal-body select:focus {
  border-color: #007a3d !important;
  box-shadow: 0 0 0 3px rgba(0, 156, 77, 0.15) !important;
  outline: none !important;
}

#attendanceModal .btn[type="submit"],
#attendanceModal .btn-primary {
  background: #009C4D !important;
  border: 2px solid #009C4D !important;
  color: #fff !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  border-radius: 8px !important;
  padding: 0.6rem 2rem !important;
  font-size: 0.9rem !important;
  transition: all 0.2s ease !important;
}

#attendanceModal .btn[type="submit"]:hover,
#attendanceModal .btn-primary:hover {
  background: transparent !important;
  color: #009C4D !important;
}

/* --- Footer --- */
footer.container-fluid {
  background: #475555 !important;
  padding: 1.5rem 0 !important;
  margin-top: 2rem !important;
}

footer img {
  max-height: 60px !important;
}

/*AUX*/
.gap-3 {
  gap: 1rem;
}