/* =========================================================
   BASE
========================================================= */
html {
  font-size: calc(1em + 0.5vw);
}

body {
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* =========================================================
   LAYOUT
========================================================= */
.grid-container {
  display: grid;
  grid-template-areas:
    "header header header"
    "main main main"
    "footer footer footer";
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
}

header { grid-area: header; padding: 1rem; }

main {
  grid-area: main;
  padding: 2rem;
  background: #ECF5FF;
}

footer { grid-area: footer; padding: 1rem; }

/* =========================================================
   ENLACES (global)
========================================================= */
a {
  border: 0;
  color: #003366;
  display: inline-block;
  margin-bottom: 1rem;
  margin-top: 0;
  padding: 0.5625rem 0;
}

a:hover {
  color: #000;
  background-color: #FADD4A;
  background-image: linear-gradient(to top, #000 3px, #f9dc4a 3px, #f9dc4a);
}

a:visited {
  color: #920ba6;
}

a:focus {
  background-color: #f9dc4a;
  color: #000;
}

/* enlaces de profes (solo si quieres mantener esa clase) */
.enlaceProfe a {
  color: #003366;
}

/* =========================================================
   SKIP LINK
========================================================= */
.skip-link {
  background-color: #f9dc4a;
  border: solid 3px #000;
  color: #000;
  padding: 0.625em 0.9375em;
  text-decoration: none;
}

.skip-link:active,
.skip-link:focus {
  left: 0;
  position: absolute;
  top: 0;
  z-index: 999;
}

.skip-link + * {
  margin-top: 0 !important;
}

/* =========================================================
   MENÚ PRINCIPAL
========================================================= */
.menuprincipal ul {
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0;
  margin: 0;
}

.menuprincipal li {
  margin: 0 1rem;
}

.menuprincipal a {
  color: #003366;
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.5625rem 0;
}

.menuprincipal a:hover {
  color: #000 !important;
  background-color: #FADD4A;
}

.menuprincipal a:focus {
  background-image: linear-gradient(to top, #000 3px, #f9dc4a 3px, #f9dc4a);
  background-color: #f9dc4a;
  color: #000 !important;
}

/* =========================================================
   HERO / PRESENTACIÓN
========================================================= */
#presentacion {
  background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
              url('../img/portadacc.jpg') no-repeat center center;
  background-size: cover;
  color: #fff;
}

h1 { padding: 3rem 1em; }

/* =========================================================
   ARTÍCULOS
========================================================= */
article {
  border: 1px solid #ddd;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 5px;
  background-color: #fafafa;
}

/* =========================================================
   PROGRAMA (accordion)
========================================================= */
.module-btn {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 600;
}

.accordion-header button:hover {
  color: #024488;
  background-color: #FADD4A;
}

.accordion-header button:focus {
  background-image: linear-gradient(to top, #000 3px, #f9dc4a 3px, #f9dc4a);
  background-color: #f9dc4a;
  color: #000;
}

/* =========================================================
   PROFESORES
========================================================= */
#profesores {
  display: flex;
  flex-flow: row wrap;
  justify-content: space-around;
}

/* =========================================================
   BOTÓN CURSO (para <a> y <button>)
========================================================= */
.botonCurso {
  border: 1px solid #000;
  background-color: #0000EB;
  color: #fff;
  display: inline-block;
  margin: 0 0 1rem 0;
  padding: 0.5625rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
}

/* evitar lila por a:visited */
a.botonCurso:visited {
  color: #fff;
}

.botonCurso:hover {
  color: #000;
  background-color: #FADD4A;
}

/* foco visible y consistente */
.botonCurso:focus,
.botonCurso:focus-visible {
  background-image: linear-gradient(to top, #000 3px, #f9dc4a 3px, #f9dc4a);
  background-color: #f9dc4a;
  color: #000;
  outline: 3px solid #000;
  outline-offset: 3px;
}

/* =========================================================
   BOTÓN FLOTANTE (logo)
========================================================= */
.btn-floating {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .5rem;
  border-radius: .5rem;
}

a.btn-floating:focus-visible {
  outline: 2px solid #000061;
  outline-offset: 4px;
  box-shadow: none;
  background-color: #f9dc4a;
}

a.btn-floating:focus-visible img {
  outline: 2px solid #000061;
  outline-offset: 4px;
  border-radius: .25rem;
}

/* =========================================================
   FORMULARIOS
========================================================= */
form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

input,
textarea {
  padding: 0.5rem;
  border: 1px solid #151515; /* o #ccc si prefieres */
  border-radius: 4px;
  font-size: 1rem;
}

/* =========================================================
   BTN CUSTOM (si lo sigues usando)
========================================================= */
.btn-custom-border {
  color: #fff;
  background-color: #0d6efd;
  border: 1px solid #0d6efd;
  border-radius: 4px;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.btn-custom-border:hover {
  color: #024488;
  background-color: #FADD4A;
  background-image: linear-gradient(to top, #000 3px, #f9dc4a 3px, #f9dc4a) !important;
}

.btn-custom-border:focus,
.btn-custom-border:focus-visible {
  background-image: linear-gradient(to top, #000 3px, #f9dc4a 3px, #f9dc4a) !important;
  background-color: #f9dc4a;
  color: #000;
  outline: 3px solid #000;
  outline-offset: 3px;
}

/* =========================================================
   TABLA CALENDARIO
========================================================= */
.table-calendario {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.table-calendario th,
.table-calendario td {
  padding: 0.75rem;
  border: 1px solid #ccc;
  text-align: left;
}

/* responsive */
@media (max-width: 768px) {
  .table-calendario { border: 0; }

  .table-calendario thead {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .table-calendario tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  }

  .table-calendario th[scope="row"],
  .table-calendario td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: none;
    border-bottom: 1px solid #eee;
  }

  .table-calendario th[scope="row"]::before,
  .table-calendario td::before {
    content: attr(data-label);
    font-weight: bold;
    color: #333;
    flex-basis: 50%;
    text-align: left;
  }

  .table-calendario td:last-child,
  .table-calendario th[scope="row"]:last-child {
    border-bottom: none;
  }
}

/* =========================================================
   MÓVIL: títulos cards
========================================================= */
@media (max-width: 576px) {
  .card-header h3 {
    font-size: 1.2rem;
    line-height: 1.3;
  }
  .pricing-card-title {
    font-size: 1.75rem;
  }
}