/* ============================= */
/* ESTILOS BASE */
/* ============================= */

.body-fr3-inv {
  font-family: Arial, sans-serif;
  font-size: 18px;
  background-color: #ffffff;
  color: #000000;
  margin: 40px;
  padding: 0;
}

.section-fr3-inv {
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.section-fr3-inv h2 {
  text-align: center;
  font-size: 26px;
  margin-bottom: 40px;
  border-bottom: 2px solid #ccc;
  padding-bottom: 10px;
  font-family: 'Alexandria', sans-serif;
  line-height: 1.3;
}

.section-fr3-inv h2 .parte-superior {
  background-color: #ff2ca0;
  color: white;
  font-size: 28px;
  font-weight: 100;
  padding: 14px 20px;
  transform: rotate(-5deg);
  display: inline-block;
}

.section-fr3-inv h2 .parte-inferior {
  display: block;
  margin-top: 10px;
  font-size: 0.9em;
  font-weight: 500;
}

.columns-fr3-inv {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.column-fr3-inv {
  flex: 1;
  min-width: 300px;
}

.table-fr3-inv {
  width: 100%;
  border-collapse: collapse;
}

.th-fr3-inv,
.td-fr3-inv {
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.th-fr3-inv {
  background-color: #f2f2f2;
  font-weight: bold;
}

.info-box-fr3-inv {
  padding: 20px;
  margin-bottom: 20px;
  background-color: #fafafa;
  border-radius: 8px;
}

.full-width-box-fr3-inv {
  padding: 25px;
  margin-top: 30px;
  border-radius: 6px;
  background-color: #fff0f6;
}

.full-width-box-fr3-inv h3,
.info-box-fr3-inv h3 {
  font-family: 'Visby Round CF', Arial, sans-serif;
  margin-top: 0;
}

.full-width-box-fr3-inv p,
.info-box-fr3-inv p {
  font-family: Arial, sans-serif;
  font-size: 18px;
  text-align: justify;
}

/* ============================= */
/* MEDIA QUERIES RESPONSIVAS */
/* ============================= */

/* Teléfonos pequeños - portrait */
@media (max-width: 480px) and (orientation: portrait) {
  .body-fr3-inv {
    margin: 10px;
    font-size: 16px;
  }

  .section-fr3-inv {
    padding: 20px;
  }

  .section-fr3-inv h2 {
    font-size: 22px;
  }

  .section-fr3-inv h2 .parte-superior {
    font-size: 22px;
    padding: 10px 14px;
  }

  .columns-fr3-inv {
    flex-direction: column;
    gap: 20px;
  }

  .column-fr3-inv {
    width: 100%;
  }

  .info-box-fr3-inv,
  .full-width-box-fr3-inv {
    font-size: 16px;
    padding: 15px;
  }
}

/* Teléfonos pequeños - landscape */
@media (max-width: 480px) and (orientation: landscape) {
  .columns-fr3-inv {
    flex-direction: column;
  }
}

/* Tablets verticales (portrait) */
@media (max-width: 768px) and (orientation: portrait) {
  .body-fr3-inv {
    margin: 20px;
    font-size: 17px;
  }

  .columns-fr3-inv {
    flex-direction: column;
    align-items: center;
  }

  .column-fr3-inv {
    width: 100%;
  }

  .section-fr3-inv h2 {
    font-size: 24px;
  }
}

/* Tablets horizontales (landscape) */
@media (max-width: 1024px) and (orientation: landscape) {
  .columns-fr3-inv {
    flex-wrap: wrap;
    justify-content: center;
  }

  .column-fr3-inv {
    flex: 1 1 45%;
  }
}

/* Dispositivos medianos (máx 912px) */
@media (max-width: 912px) {
  .columns-fr3-inv {
    flex-direction: column;
    align-items: center;
  }

  .column-fr3-inv {
    width: 100%;
  }
}

/* Tablets verticales grandes (hasta 1024px) */
@media (max-width: 1024px) and (orientation: portrait) {
  .columns-fr3-inv {
    flex-direction: column;
  }

  .column-fr3-inv {
    width: 100%;
  }
}

/* Pantallas grandes (mínimo 1440px) */
@media (min-width: 1440px) {
  .section-fr3-inv {
    max-width: 1300px;
  }

  .section-fr3-inv h2 {
    font-size: 32px;
  }

  .section-fr3-inv h2 .parte-superior {
    font-size: 32px;
  }

  .table-fr3-inv th,
  .table-fr3-inv td {
    font-size: 20px;
  }

  .info-box-fr3-inv p,
  .full-width-box-fr3-inv p {
    font-size: 20px;
  }
}

/* ============================= */
/* TRANSFORMAR TABLA EN TARJETAS MODERNAS EN MÓVILES */
/* ============================= */
@media (max-width: 480px) {
  .table-fr3-inv,
  .table-fr3-inv thead,
  .table-fr3-inv tbody,
  .table-fr3-inv th,
  .table-fr3-inv td,
  .table-fr3-inv tr {
    display: block;
    width: 100%;
  }

  .table-fr3-inv thead {
    display: none; /* ocultamos encabezado */
  }

  .table-fr3-inv tr {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
  }

  .table-fr3-inv td:first-child {
    font-weight: bold;
    color: #ff2ca0;
    margin-bottom: 10px;
    display: block;
    font-size: 16px;
  }

  .table-fr3-inv td:nth-child(2),
  .table-fr3-inv td:nth-child(3) {
    display: block;
    font-size: 14px;
    margin-bottom: 5px;
    padding-left: 10px;
    position: relative;
  }

  .table-fr3-inv td:nth-child(2)::before {
    content: "EnglishJoy: ";
    font-weight: bold;
    color: #333;
  }

  .table-fr3-inv td:nth-child(3)::before {
    content: "Otras academias: ";
    font-weight: bold;
    color: #333;
  }

  .table-fr3-inv td {
    border-bottom: none;
  }
}
