/* Font Atkinson */

@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('fonts/Atkinson-Hyperlegible-Bold-102.otf') format('truetype');
	font-weight: bold;
	font-style: normal;
}
  
@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('fonts/Atkinson-Hyperlegible-Italic-102.otf') format('truetype');
	font-weight: normal;
	font-style: italic;
}
  
@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('fonts/Atkinson-Hyperlegible-Regular-102.otf') format('truetype');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'Atkinson Hyperlegible';
	src: url('fonts/Atkinson-Hyperlegible-BoldItalic-102.otf') format('truetype');
	font-weight: bold;
	font-style: italic;
}

/* JetBrains Mono */

@font-face {
	font-family: 'JetBrains Mono';
	src: url('fonts/JetBrainsMono-Regular.ttf') format('truetype');
	font-weight: normal;
	font-style: normal;
}


html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* Estilos básicos */
body {
    font-family: 'Atkinson Hyperlegible', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: #333;
    background-color: #f4f4f4;
    padding-top: 60px;
}

/* Header */
header {
    background-color: #800080; /* Violeta oscuro */
    color: #fff;
    text-align: center;
    padding: 2rem 1rem;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

header p {
    margin: 0.5rem 0 1rem;
    font-size: 1.1rem;
}

/* Estilo para el nav */
nav {
    background-color: #800080;
    text-align: center;
    padding: 1rem 0;
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    font-size: 1.1rem;
    display: inline-block;
    margin: 0 15px;
}

nav a:hover {
    background-color: #6a006a;
}

nav ul {
    display: flex;
    justify-content: center; /* Centra los elementos */
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin-right: 15px;
}

nav ul li:last-child {
    margin-right: 0;
}



/* Espaciado entre navbar y header */
.header-content {
    margin-top: 2em;
}

/* docufem */
#que-hacemos {
    background-color: #f0e6f6;
    padding: 4rem 1rem;
    text-align: center;
}

#que-hacemos h2 {
    color: #800080;
    font-size: 2rem;
    margin-bottom: 4rem;
}

.que-hacemos {
    display: inline-block;
    width: 80%;
    padding: 1rem;
    margin: 1rem 0;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: center;
}

.que-hacemos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    justify-items: center;
    max-width: 75%;
    margin: 0 auto;
}

.que-hacemos img {
    display: none;
    width: 100%;
    max-width: 200px;
    height: auto;
    border-radius: 8px;
}

.que-hacemos h3 {
    color: #800080;
}

.que-hacemos p {
    font-size: 1rem;
    color: #333;
    display: -webkit-box;  /* Usamos el prefijo -webkit para compatibilidad */
    -webkit-line-clamp: 3; /* Limita el texto a 3 líneas */
    -webkit-box-orient: vertical; /* Necesario para que funcione el clamping */
    overflow: hidden; 
    text-overflow: ellipsis;
    max-height: 4.5em; 
    line-height: 1.5em; 
}

.goto a {
    color: #800080;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border: 1px solid #800080;
    border-radius: 4px;
    display: inline-block;
}

.que-hacemos a img {
    border: none !important;
    box-shadow: none !important;
    background: none !important;
    padding: 0;
    margin: 0;
}

.goto a:hover {
    background-color: #800080;
    color: #fff;
}

.a-image {
    background: none !important;
    box-shadow: none !important;
    opacity: 1;
}

/* Sección de Noticias */

#noticias {
    background-color: #f8f0fa;
    padding: 4rem 1rem;
    text-align: center;
}

#noticias h2 {
    color: #800080;
    font-size: 2rem;
    margin-bottom: 3rem;
}

.noticias-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 60%;
    margin: 0 auto;
    max-height: 400px;
    overflow-y: auto;
    padding: 2em 0;
    background-color: #e9d4f7;
    border-radius: 5px;
}

.noticia {
    width: 60%;
    margin: 0 auto;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    text-align: left;
}

.noticia h3 {
    color: #800080;
    margin: 0 0 0.5rem;
}

.noticia p {
    font-size: 1rem;
    color: #333;
    line-height: 1.5em;
    margin: 0.5rem 0;
}

.noticia p a {
    color: #800080; /* Morado */
    text-decoration: none; /* Sin subrayado por defecto */
}

.noticia p a:hover {
    text-decoration: underline; /* Subrayado al hacer hover */
}

/* Quiénes Somos */
#quienes-somos {
    background-color: #f0e6f6; /* Color pastel más claro */
    padding: 4rem 1rem;
    text-align: center;
}

#quienes-somos h2 {
    color: #800080;
    font-size: 2rem;
    margin-bottom: 4rem;
}

.personas-grid, .personas-grid-colaborando {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Tres columnas */
    gap: 20px; /* Espaciado entre las tarjetas */
    justify-items: center;
    max-width: 75%;
    margin: 0 auto;
}

.colaborando {
    color: #800080;
    font-size: 2rem;
    margin-bottom: 4rem;
    margin-top: 4rem;
}

.persona {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 100%; /* Relativo al contenedor */
    max-width: 280px;
}

.persona img {
    max-width: 150px;
    height: auto;
    border-radius: 50%;
    margin-bottom: 0px;
}

.persona h3 {
    font-size: 1.5rem;
    color: #800080;
}

.persona p {
    font-size: 1rem;
    color: #333;
}

.personas-grid-colaborando > .persona:last-child {
    grid-column: span 3; /* Hace que el último div ocupe las 3 columnas */
    justify-self: center; /* Centra el contenido */
}

.personas-grid-colaborando .persona:nth-child(3) img {
    height: 150px;
    object-fit: cover;
    width: 100%;
  }

/* Estilo para el SVG en perfiles */
.perfiles a {
    display: inline-block;
    width: 24px; /* Ajusta el tamaño del icono */
    height: 24px;
}

/* Footer */
footer {
    background-color: #800080; /* Violeta oscuro */
    color: #fff;
    text-align: center;
    padding: 2rem 1rem;
    font-size: 1rem;
    position: relative;
    margin-top: 50px;
}

footer h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

footer p {
    font-size: 1rem;
    margin: 0.5rem 0;
}

footer p a {
    color: #fff;
    text-decoration: underline;
}

footer p a:hover {
    text-decoration: none;
}

/* Media Queries */
@media (max-width: 768px) {
    /* Ajustar el grid para pantallas medianas */
    .que-hacemos-grid {
        grid-template-columns: 1fr; /* Una columna en pantallas más pequeñas */
        width: 100%; /* Reducir el ancho para móviles medianos */
        margin: 0 auto; /* Centrar el contenido */
        max-width: 90%;
    }

    /* Asegurarse de que los bloques no se desborden */
    .que-hacemos {
        width: 100%; /* Ancho completo */
        box-sizing: border-box;
        margin: 1rem 0; /* Espaciado entre bloques */
    }

    /* Reducir la altura de los bloques */
    .que-hacemos h3 {
        font-size: 1.3rem;
    }

    .que-hacemos p {
        font-size: 0.9rem; /* Reducir el tamaño de fuente para pantallas pequeñas */
    }

    /* Ajustar el grid para pantallas medianas */
    .noticias-grid {
        grid-template-columns: 1fr; /* Una columna en pantallas más pequeñas */
        width: 100%; /* Reducir el ancho para móviles medianos */
        margin: 0 auto; /* Centrar el contenido */
        max-width: 90%;
    }

    /* Asegurarse de que los bloques no se desborden */
    .noticia {
        width: 90%;
        box-sizing: border-box;
        margin: 1rem auto;
    }

    /* Reducir la altura de los bloques */
    .noticia h3 {
        font-size: 1.3rem;
    }

    .noticia p {
        font-size: 0.9rem; /* Reducir el tamaño de fuente para pantallas pequeñas */
    }

    /* Ajustar las personas dentro de los grids para pantallas medianas */
    .personas-grid, .personas-grid-colaborando {
        grid-template-columns: 1fr; /* Una columna en pantallas medianas */
        width: 90%;
        margin: 0 auto; /* Centrado */
        max-width: 90%;
    }

    .persona {
        width: 100%; /* Bloques a ancho completo */
        max-width: none; /* Eliminar el límite de ancho fijo */
        box-sizing: border-box;
        margin: 1rem 0;
        padding: 1rem;
    }

    .persona img {
        width: 100%; /* Imagen ajustable */
    }

    /* Ajuste tipográfico */
    .persona h3 {
        font-size: 1.3rem;
    }

    /* Anular la regla de span 3 en móviles */
    .personas-grid-colaborando > .persona:last-child {
        grid-column: auto; /* Vuelve a la disposición predeterminada */
    }

    nav ul {
        display: flex;
        flex-wrap: wrap;  /* Permite que los elementos se ajusten a varias líneas */
        justify-content: center;  /* Centra los elementos horizontalmente */
        gap: 5px;  /* Espacio entre los elementos */
        padding: 0;
        margin: 0;
        list-style: none;
    }

    nav ul li {
        margin-right: 0; /* Elimina el margen derecho en modo grid */
    }

    nav a {
        font-size: 1.1rem; /* Reducir el tamaño de fuente */
        padding: 0px; /* Ajustar el padding para que no sea tan grande */
        margin: 0 5px;
    }
}
