* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  text-decoration: none;
  list-style: none;
}
:root {
  --bg-color: #262958;
  --text-color: #fff;
  --main-color: #b5d9ec;
}

/* ============================== */
/* ============ BODY ============ */
/* ============================== */

body {
  min-height: 100vh;
  background: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  scrollbar-color: #b5d9ec #262958;
}

/* ============================== */
/* =========== HEADER =========== */
/* ============================== */

header {
  position: fixed;
  width: 100%;
  top: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-color);
  padding: 28px 12%;
  transition: all 0.5s ease;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  width: 190px;
}

/* Diseño del Navbar */
.navbar {
  display: flex;
}

.navbar a {
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 500;
  padding: 5px 0;
  margin: 0px 30px;
  transition: all 0.5s ease;
}

.navbar a:hover {
  color: var(--main-color);
  border-bottom: 1px solid var(--main-color);
  transition: all 0.5s ease;
}

.navbar a.active {
  color: var(--main-color);
  border-bottom: 2px solid var(--main-color);
  transition: all 0.5s ease;
}

.main {
  display: flex;
  align-items: center;
}

.main a {
  margin-right: 25px;
  margin-left: 10px;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.5s ease;
}

.user {
  display: flex;
  align-items: center;
}

.user button {
  border-style: none;
  padding: 6px;
  width: 120px;
  border-radius: 10px;
  cursor: pointer;
  background-color: var(--main-color);
  font-weight: 600;
  transition: all 0.5s ease;
}

.user button:hover {
  background-color: #5e91ad;
  color: var(--text-color);
  transition: all 0.5s ease;
}

.user i {
  color: var(--main-color);
  font-size: 28px;
  margin-right: 7px;
}

.main a:hover {
  color: var(--main-color);
}

#menu-icon {
  font-size: 35px;
  color: var(--text-color);
  cursor: pointer;
  z-index: 10001;
  display: none;
}

/* Responsividad */
@media (max-width: 1280px) {
  header {
    padding: 28px 2%;
    transition: 0.2s;
  }
  .navbar a {
    padding: 5px 0;
    margin: 0px 20px;
  }
}
@media (max-width: 1090px) {
  #menu-icon {
    display: block;
  }
  .navbar {
    position: absolute;
    top: 100%;
    margin-top: 10px;
    right: -100%;
    width: 270px;
    height: 31vh;
    background-color: var(--main-color);
    display: flex;
    flex-direction: column;
    justify-content: start;
    border-radius: 10px;
    transition: all 0.5s ease;
  }
  .navbar a {
    display: block;
    margin: 12px 0;
    padding: 0px 25px;
    transition: all 0.5s ease;
  }
  .navbar a:hover {
    color: var(--text-color);
    transform: translateY(5px);
    color: #222327;
  }
  .navbar a.active {
    color: var(--text-color);
    color: #222327;
  }
  .navbar.open {
    right: 2%;
  }
}

@media (max-width: 850px) {
  #menu-icon {
    display: block;
  }
  .navbar {
    position: absolute;
    top: 100%;
    margin-top: 10px;
    right: -100%;
    width: 270px;
    height: 31vh;
    background-color: var(--main-color);
    display: flex;
    flex-direction: column;
    justify-content: start;
    border-radius: 10px;
    transition: all 0.5s ease;
  }
  .navbar a {
    display: block;
    margin: 12px 0;
    padding: 0px 25px;
    transition: all 0.5s ease;
  }
  .navbar a:hover {
    color: var(--text-color);
    transform: translateY(5px);
    color: #222327;
  }
  .navbar a.active {
    color: var(--text-color);
    color: #222327;
  }
  .navbar.open {
    right: 2%;
  }
}

@media (max-width: 780px) {
  #menu-icon {
    display: block;
  }
  .navbar {
    position: absolute;
    top: 100%;
    margin-top: 10px;
    right: -100%;
    width: 270px;
    height: 31vh;
    background-color: var(--main-color);
    display: flex;
    flex-direction: column;
    justify-content: start;
    border-radius: 10px;
    transition: all 0.5s ease;
  }
  .navbar a {
    display: block;
    margin: 12px 0;
    padding: 0px 25px;
    transition: all 0.5s ease;
  }
  .navbar a:hover {
    color: var(--text-color);
    transform: translateY(5px);
    color: #222327;
  }
  .navbar a.active {
    color: var(--text-color);
    color: #222327;
  }
  .navbar.open {
    right: 2%;
  }
}

/* ============================== */
/* =========== SLIDER =========== */
/* ============================== */

.slider {
  width: 100vw;
  height: 100vh;
  margin: auto;
  position: relative;
  overflow: hidden;
  max-width: 100%;
}

.slider .list {
  position: absolute;
  height: 100%;
  left: 0;
  top: 0;
  display: flex;
  transition: 1s;
  width: 100%;
}

.slider .list img {
  width: 100vw;
  height: 100%;
  object-fit: cover;
}

.slider .buttons {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.slider .buttons button {
  width: 50px;
  height: 50px;
  margin: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.5s ease;
}

.slider .buttons button:hover {
  background-color: var(--main-color);
  transition: all 0.5s ease;
}

.slider .dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  color: #fff;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.slider .dots li {
  list-style: none;
  width: 10px;
  height: 10px;
  background-color: #fff;
  margin: 10px;
  border-radius: 20px;
  transition: 0.5s;
  cursor: pointer;
}

.slider .dots li.active {
  width: 30px;
  background-color: var(--main-color);
}

/* Responsividad */
@media screen and (max-width: 768px) {
  .slider {
    height: 50vh;
  }
  .slider .buttons button {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
}

/* ============================== */
/* ========= INFORMATION ======== */
/* ============================== */

.section {
  padding: 60px 20px;
  width: 100%;
  text-align: center;
  background-color: var(--text-color);
}

.full-width {
  width: 100vw;
}

.dark-bg {
  background-color: #191e24;
  color: white;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #333;
}

.section-title p {
  color: #666;
}

.dark-bg .section-title h2,
.dark-bg .section-title p {
  color: white;
}

/* Sección Nosotros */
.about-section {
  padding: 60px 20px;
  width: 100%;
  background-color: var(--text-color);
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.section-title p {
  color: #aaa;
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.about-row {
  display: flex;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.about-text {
  flex: 1;
  padding: 0 20px;
  color: #333;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.values-list {
  list-style: none;
  padding: 0;
}

.values-list li {
  margin-bottom: 10px;
}

.values-list li strong {
  color: var(--bg-color);
  text-decoration-line: underline;
}

.about-image {
  flex: 1;
  max-width: 500px;
  padding: 20px;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.about-image img:hover {
  transform: scale(1.05);
}

/* Responsividad */
@media (max-width: 768px) {
  .about-row {
    flex-direction: column;
  }

  .below {
    flex-direction: column-reverse;
  }

  .about-text,
  .about-image {
    padding: 0;
  }

  .about-image {
    margin-bottom: 20px;
  }
}

/* Sección de Carreras */
.carreras-section {
  width: 100%;
  padding: 60px 20px;
  background-color: var(--text-color);
  color: #333;
}

.section-title {
  text-align: center;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #333;
}

.section-title p {
  color: #5d5d5d;
  margin-bottom: 40px;
  font-size: 1.1rem;
}

.carreras-grid {
  display: flex;
  justify-content: space-around;
  gap: 20px;
}

.carrera-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-size: cover;
  background-position: center;
  border-radius: 15px;
  width: 30%;
  height: 500px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.carrera-card:hover {
  transform: scale(1.05);
}

/* Encabezado de la tarjeta */
.carrera-header {
  background-color: rgba(0, 0, 0, 0.7); /* Fondo semitransparente */
  color: #fff;
  padding: 15px;
  text-align: center;
}

.carrera-header a {
  color: #fff;
  text-decoration: none;
}

.carrera-header a:hover {
  color: #ddd;
}

.carrera-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.carrera-header span {
  font-size: 1rem;
  color: #ddd;
}

/* Contenido inferior de la tarjeta */
.carrera-content {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 20px;
  color: #fff;
  text-align: left;
  box-sizing: border-box;
}

.carrera-content p {
  font-size: 0.8rem;
  margin: 0;
}

/* Imagenes de fondo para cada carrera */
.carrera-card:nth-child(1) {
  background-image: url("../img/cards/image1.jpg");
}

.carrera-card:nth-child(2) {
  background-image: url("../img/cards/image2.jpg");
}

.carrera-card:nth-child(3) {
  background-image: url("../img/cards/image3.jpg");
}

.carrera-card:nth-child(4) {
  background-image: url("../img/cards/image4.jpg");
}

.btn-card {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 5px;
}

.btn-card button {
  border-style: none;
  padding: 6px;
  width: 80px;
  border-radius: 10px;
  cursor: pointer;
  background-color: var(--main-color);
  font-weight: 600;
  transition: all 0.5s ease;
}

.btn-card button:hover {
  background-color: #5e91ad;
  color: var(--text-color);
  transition: all 0.5s ease;
}

/* Responsividad */
@media (max-width: 768px) {
  .carreras-grid {
    flex-wrap: wrap;
  }
  .carrera-card {
    width: 100%;
    height: 400px;
  }
  .carrera-header h3 {
    font-size: 1rem;
  }
  .carrera-content p {
    font-size: 0.7rem;
  }
  .btn-card button {
    padding: 5px;
    width: 75px;
  }
}

/* Postgrados*/
.postgrados-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
}

.postgrado-item {
  background-color: #f8f9fa;
  color: #333;
  padding: 15px;
  width: 80%;
  margin: 10px 0;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.postgrado-item:hover {
  background-color: #e2e6ea;
}

.postgrado-item h3 {
  margin: 0;
}

.postgrado-info {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.postgrado-item:hover .postgrado-info {
  max-height: 200px;
  transition: all 0.5s ease;
}

.postgrado-info p {
  margin-top: 10px;
  color: #666;
}

/* Responsividad */
@media (max-width: 768px) {
  .postgrado-item {
    width: 100%;
  }
}

/* Sección Inscríbete */
.container-form {
  display: flex;
  flex-direction: column;
  width: 700px;
  padding: 20px;
  overflow: visible;
  background-color: #d3d3d3;
  border-radius: 20px;
}

.inscribete-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inscribete-form input,
.inscribete-form select,
.inscribete-form textarea {
  width: 100%;
  max-width: 600px;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  border: 1px solid #ccc;
  resize: vertical;
}

.inscribete-form textarea {
  min-height: 85px;
}

.inscribete-form button {
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.inscribete-form button:hover {
  background-color: var(--main-color);
  color: var(--bg-color);
}

/* Responsividad */
@media (max-width: 768px) {
  .container-form {
    width: auto;
    padding: 20px;
    overflow: visible;
  }
}

@media (max-width: 480px) {
  .container-form {
    width: auto;
    padding: 20px;
    overflow: visible;
  }
}

/* Sección Contacto */
#contacto {
  background-color: var(--bg-color);
}

#contacto h2 {
  color: var(--text-color);
}

.contact-info {
  margin-top: 40px;
  color: var(--text-color);
}

.dark-bg .contact-info {
  color: white;
}

/* Sección Ministerios */
#ministries {
  background-color: var(--text-color);
}

.ministries-img {
  display: flex;
  justify-content: center;
  align-items: center;
}

.ministries-img img {
  width: 280px;
}

/* Responsividad */
@media (max-width: 768px) {
  .ministries-img {
    flex-direction: column;
  }
}

/* ============================== */
/* ========== BACKTOTOP ========= */
/* ============================== */

/* Estilos del botón "Back to Top" */
.back-to-top {
  position: fixed;
  bottom: 5px; /* Colocamos debajo del Chatbox */
  right: 10px; /* Ajuste de separación del borde derecho */
  width: 30px; /* Hacemos el botón más pequeño */
  height: 30px;
  background-color: var(--bg-color);
  color: var(--text-color);
  border-radius: 50%; /* Circular */
  display: none; /* Oculto inicialmente */
  align-items: center;
  justify-content: center;
  font-size: 20px; /* Ajustamos el tamaño del icono */
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.back-to-top i {
  line-height: 30px;
}

.back-to-top:hover {
  background-color: var(--main-color);
  color: var(--bg-color);
}

/* Mostrar el botón cuando se hace scroll */
.show {
  display: flex;
}

/* Responsividad */
@media (max-width: 768px) {
  .back-to-top {
    bottom: 12px;
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  .back-to-top i {
    line-height: 35px;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    bottom: 12px;
    width: 30px;
    height: 30px;
    font-size: 16px;
  }

  .back-to-top i {
    line-height: 30px;
  }
}

/* ============================== */
/* =========== ChatBox =========== */
/* ============================== */

/* Botón para abrir el chatbox */
.chatbox-button {
  position: fixed;
  bottom: 60px;
  right: 15px;
  background-color: var(--main-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-size: 20px;
  z-index: 10000;
  display: block;
  transition: all 0.5s ease;
}

.chatbox-button:hover {
  background-color: #91c4df;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
  font-size: 22px;
}

.chatbox-container {
  position: fixed;
  bottom: 60px;
  right: 20px;
  width: 300px;
  max-width: 90vw;
  display: none;
  flex-direction: column;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  border-radius: 0 0 8px 8px;
}

.chatbox-header {
  background-color: var(--bg-color);
  color: var(--text-color);
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px 8px 0 0;
}

.chatbox-header h4 {
  margin: 0;
  font-size: 1.2rem;
}

.chatbox-header button {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

.chatbox-body {
  background-color: white;
  border: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  max-height: 400px;
  height: 250px;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
}

.chatbox-messages {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px;
}

.message.user {
  background-color: #b5d9ec;
  color: #222327;
  padding: 10px;
  border-radius: 15px;
  margin-bottom: 10px;
  max-width: 80%;
  float: right;
  clear: both;
}

.message.assistant {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  max-width: 80%;
  float: left;
  clear: both;
}

.message.assistant .logo {
  margin-right: 10px;
}

.message.assistant img {
  width: 30px;
  height: 30px;
}

.message.assistant .text {
  background-color: #f1f1f1;
  color: #333;
  padding: 10px;
  border-radius: 15px;
  max-width: 100%;
  word-wrap: break-word;
  word-break: break-all;
}

.chatbox-messages::after {
  content: "";
  display: table;
  clear: both;
}

/* Input del Chat */
.chatbox-input {
  display: flex;
  border-top: 1px solid #ddd;
  border-radius: 0 0 8px 8px;
}

.chatbox-input input {
  flex-grow: 1;
  border: none;
  padding: 10px;
  font-size: 1rem;
  outline: none;
}

.chatbox-input button {
  background-color: var(--bg-color);
  color: var(--text-color);
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.chatbox-input button:hover {
  background-color: #5e91ad;
}

#closeChat:hover {
  color: var(--main-color);
  transition: all 0.3s ease;
}

/* ============================== */
/* =========== FOOTER =========== */
/* ============================== */

footer {
  background-color: #191e24;
  color: white;
  padding: 40px 20px;
  width: 100%;
}

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-logo img {
  width: 280px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.footer-links ul li {
  margin: 5px 0;
}

.footer-container label {
  font-size: 25px;
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  color: var(--main-color);
}

.footer-links ul li a {
  color: white;
  text-decoration: none;
  transition: all 0.5s ease;
}

.footer-links ul li a:hover {
  color: #91c4df;
  border-bottom: 1px solid var(--main-color);
  transition: all 0.5s ease;
}

.footer-contact p {
  margin: 10px 0;
}

.footer-contact p:hover {
  color: #91c4df;
  cursor: pointer;
}

.footer-socials {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px;
}

.footer-socials a {
  margin: 5px;
  border-radius: 100%;
}

.footer-socials i {
  background-color: var(--main-color);
  color: var(--bg-color);
  padding: 10px;
  border-radius: 100%;
}

.footer-socials i:hover {
  background-color: var(--bg-color);
  color: var(--main-color);
  transition: all 0.5s ease;
}

.footer-copyright {
  text-align: center;
  margin-top: 20px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsividad */
@media (max-width: 1200px) {
  .footer-container {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .footer-links {
    margin-top: 20px;
  }

  .footer-links ul {
    flex-direction: column;
    gap: 10px;
  }

  .footer-logo img {
    width: 220px;
  }
  .footer-container label {
    display: flex;
    font-size: 20px;
    font-weight: 400;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    justify-content: center;
  }
  .footer-contact {
    margin-top: 20px;
  }
  .footer-socials {
    display: flex;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .footer-logo img {
    width: 200px;
  }

  .footer-links ul li {
    font-size: 0.9rem;
  }

  .footer-contact p {
    font-size: 0.9rem;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }
}
