body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff48;
    color: #333;
}


nav {
    background-color: #343a40;
    color: white;
    padding: 15px 0;
    text-align: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav li {
    display: inline;
    margin: 0 20px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: #5a6268;
}

.container {
    width: 95%;
    margin: 30px auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    flex-wrap: wrap;
}


.section h2 {
    color: #007bff;
    margin-bottom: 20px;
}

.section ul {
    list-style-type: disc;
    margin-left: 20px;
}

html {
    scroll-behavior: smooth;
}

.header-content img {
    max-width: 80px;
    height: auto;
    margin-left: 20px;
}

.header-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    color: #ffffff;
    z-index: 1;
    margin-top: -170px;
}

.header-content h1,
.header-content h2,
.header-content h3 {
    margin: 0;
    animation: fadeIn 2s ease-in-out;
}

.header-content h2,
.header-content h3 {
    animation: fadeIn 2s ease-in-out 1s;
}

.header-title {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header-title h0 {
    font-size: 2rem;
    font-weight: bold;
    padding-top: 30px;
    color: blue;
}

.header-wrapper {
    position: relative;
    width: 100%;
}

.header-wrapper img {
    filter: none;
}

.curves {
    position: relative;
    width: 100%;
    height: 200px;
    background: #0078D7;
    overflow: hidden;
    z-index: -3;
}

.curve,
.curve2,
.curve3 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: -3;
}

.curve {
    height: 80px;
    background: #0056A0;
    border-top-left-radius: 90% 30px;
    border-top-right-radius: 90% 40px;
}

.curve2 {
    height: 65px;
    background: red;
    border-top-left-radius: 90% 20px;
    border-top-right-radius: 90% 30px;
}

.curve3 {
    height: 55px;
    background: white;
    border-top-left-radius: 50% 20px;
    border-top-right-radius: 50% 20px;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}














.service-item {
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top center;
    width: 400px;
    height: 515px;
    padding-top: 4px;
    padding-right: 10px;
    padding-bottom: 20px;
    padding-left: 10px;
    box-sizing: border-box;
    border-radius: 30px;
    transition: border-radius 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    color: #000;
    background-color: #5967ff;
    border: 2px solid #000;
}

.service-item:hover {
    border-radius: 50px;
    border: 5px solid #000;
}

.service-item img,
.service-item:hover img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    transform: none;
    transition: none;
}

.service-item button {
    position: absolute;
    padding: 10px 30px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e1c10c;
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.3s ease;
}

.service-item button:hover {
    background-color: #023dff;
    border: 2px solid #000;
}

.service-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    filter: brightness(1.2);
    z-index: 1;
}

.service-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    z-index: 2;
    color: rgba(251, 255, 3, 0);
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-style: italic;
    text-transform: uppercase;
}





.section2 {
    margin-left: 70px;
}




















.service-grid-recursos {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.service-item-recursos {
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: top center;
    width: 400px;
    height: 515px;
    padding-top: 4px;
    padding-right: 10px;
    padding-bottom: 20px;
    padding-left: 10px;
    box-sizing: border-box;
    border-radius: 30px;
    transition: border-radius 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    color: #000;
    background-color: #5967ff;
    border: 2px solid #000;
}

#btn-legales,
#btn-biblioteca {
    position: absolute;
    padding: 10px 30px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1846ff;
    color: rgb(255, 255, 255);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    z-index: 2;
    transition: background-color 0.3s ease;
}

#btn-legales:hover,
#btn-biblioteca:hover {
    background-color: #3966f9;
    border: 2px solid #000;
}


.service-item-recursos:hover {
    border-radius: 50px;
    border: 5px solid #000;
}

.service-item-recursos::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    filter: brightness(1.2);
    z-index: 1;
}

.service-item-recursos h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    z-index: 2;
    color: #fff;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-style: italic;
    text-transform: uppercase;
}

.service-item-recursos .item-content {
    z-index: 2;
}



.servicios-container,
.recursos-container {
    width: 90%;
    margin: 2.5 auto;
    padding: 30px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

h5 {
    font-size: 2rem;
    color: #005d8e;
    font-family: Arial, sans-serif;
    text-align: center;
    margin-bottom: 20px;
}


.invert-colors {
    filter: invert(100%) contrast(100%) brightness(90%);
}

/* Estilo general para ambos contenedores de imágenes */
.images1-container {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    filter: none !important;
}

/* Estilo para las imágenes dentro de ambos contenedores */
.images1-container .image-slide {
    position: absolute;
    width: 100%;
    margin: auto;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    filter: none !important;
}

/* Para mostrar la imagen activa */
.image-slide.active {
    opacity: 1;
}

/* Estilos para otras imágenes fuera de .images1-container */
.image-container {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.image-container img {
    width: 150px;
    height: auto;
    border-radius: 10px;
    object-fit: contain;
    image-rendering: crisp-edges;
    transform: translateZ(0);
    filter: contrast(110%) brightness(105%);
}

/* Para compatibilidad con diferentes navegadores */
.image-container img {
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimizeQuality;
}



footer {
    background-color: #0078D7;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    width: 100%;
    margin: 0;
    height: 45px;
    margin-top: 20px;
}

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    gap: 15px;
}

.social-item {
    text-align: center;
    margin: 0;
}

.social-link {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0;
}

.social-name {
    font-size: 12px;
    margin: 2px 0;
}

.social-image img {
    width: 40px;
    height: 40px;
    margin: 0;
}

/* Animación de deslizamiento */
@keyframes slideUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.accessibility-menu {
    position: fixed !important;
    top: 280px;
    right: 10px;
    z-index: 1000;
    cursor: move;
}

#toggleAccessibility {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;

}

#toggleAccessibility img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}


#accessibilityOptions {
    width: 200px;
    position: fixed;
    top: 180px;
    right: 50px;
    background: white;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    display: none;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

#accessibilityOptions.show {
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 1;
    visibility: visible;
}

#accessibilityOptions button {
    width: 100%;
    padding: 8px;
    border: none;
    background: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 3px;
    text-align: left;
}

#accessibilityOptions button:hover {
    background: #0056b3;
}



.magnifier {
    zoom: 1.5;
}

.hidden {
    display: none;
}


.high-contrast img {
    filter: invert(100%) !important;
}

.large-text {
    font-size: 1.5em;
}

.highlight-links a {
    background-color: yellow !important;
    color: black !important;
    font-weight: bold;
    padding: 2px 5px;
}

/* ====== DISEÑO RESPONSIVO DEL NAV EN MÓVIL ====== */
/* Nav oculto en móvil inicialmente */
body.mobile nav {
  display: none;
  /* Otros estilos que ya tienes */
}

/* Cuando tenga clase 'show', se muestra */
body.mobile nav.show {
  display: block;
  /* Mantén estilos móviles que pasamos antes */
  margin-top: 50px;
  padding: 20px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
}

body.mobile nav ul {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

body.mobile nav li {
  display: block;
  margin: 0;
}

body.mobile nav a {
  display: block;
  background-color: #ffffff10;
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  font-weight: 500;
  font-size: 18px;
  transition: all 0.3s ease;
}

body.mobile nav a:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateX(5px);
}

body.mobile .form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 110px;
  padding: 0 60px 50px;
  width: 100%;
  box-sizing: border-box;
}

body.mobile .form-container h5 {
  color: #000000;
  font-size: 68px;
  margin-bottom: 30px;
  animation: fadeInDown 0.8s ease-in-out;
  text-align: center;
}

body.mobile {
  padding-top: 1px;
}

#menuToggle {
  transition: background-color 0.3s ease;
}

#menuToggle:hover {
  background-color: #0056b3;
}

/* === ESTILOS RESPONSIVOS PARA MOVILES === */
body.mobile {
  padding: 0;
  margin: 0;
  overflow-x: hidden;
  font-size: 16px;
}

body.mobile .header-wrapper,
body.mobile .header-content,
body.mobile .header-title {
  text-align: center;
  padding: 0 10px;
  width: 100%;
  box-sizing: border-box;
}

body.mobile .header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

body.mobile .header-content img {
  max-width: 120px;
  height: auto;
}

body.mobile h1,
body.mobile h2,
body.mobile h0,
body.mobile h4,
body.mobile h5 {
  font-size: clamp(18px, 5vw, 24px);
  word-break: break-word;
  text-align: center;
  margin: 10px 0;
}

/* Menú de navegación móvil */
body.mobile nav {
  margin: 20px 10px;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 10px;
  text-align: center;
}
body.mobile nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
body.mobile nav ul li {
  margin: 10px 0;
}
body.mobile nav ul li a {
  font-size: 18px;
  color: #007bff;
  text-decoration: none;
  display: block;
}

/* Contenedores de imágenes */
body.mobile .images1-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
}

body.mobile .image-slide {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Servicio: tarjetas y grillas */
body.mobile .service-grid,
body.mobile .service-grid-recursos {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px;
}

body.mobile .service-item,
body.mobile .service-item-recursos {
  width: 100%;
  background-size: cover;
  background-position: center;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  box-sizing: border-box;
  border-radius: 12px;
  text-align: center;
}

body.mobile .service-item h4 {
  color: #fff;
  font-size: 18px;
  margin-bottom: 10px;
  text-shadow: 1px 1px 3px #000;
}

body.mobile .service-item button,
body.mobile .service-item-recursos button {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
}

/* Menú de accesibilidad */
body.mobile .accessibility-menu {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
}

body.mobile .accessibility-menu button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  padding: 5px;
  background: #007bff;
  border: none;
}

body.mobile #accessibilityOptions {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

body.mobile #accessibilityOptions button {
  padding: 8px;
  font-size: 14px;
  border-radius: 6px;
}

/* Footer con redes sociales */
body.mobile .social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px;
}

body.mobile .social-item {
  width: 100px;
  text-align: center;
}

body.mobile .social-item img {
  max-width: 60px;
  height: auto;
}
