body {
    font-family: Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    padding-top: 40px; /* Height of the index to prevent overlap */
    box-sizing: border-box;
}

/* agrega */


h1, h2, h3 {
    font-family: 'Optima', 'Segoe UI', Tahoma, sans-serif;
}

h1 {
    
    font-size: 2em;
}

h2 {
    text-align: justify;
    font-size: 1.5em;
}

h3 {
    text-align: justify;
    font-size: 1.2em;
}

p {
    text-align: justify;
    font-size: 1em;    
}

/* fin de agrega */


#indice {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #f0f0f0;
    height: 40px;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    z-index: 1000;
}

#indice ul {
    list-style: none;
    padding: 0;
    display: flex;
    margin: 0;
}

#indice li {
    margin: 0 10px;
}

#indice li a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 5px 10px;
}

/* sustituye */

main {
    padding: .25em;
}


    
/* Sección PTM */
    

#ptm {
    margin-bottom: 2em;
}

.ptm-content {
    position: relative;
    width: 98%;
    margin: 0 auto;
}

.ptm-content img {
    width: 100%;
    border-radius: 40px;
}

.ptm-text {
    
    position: absolute;
    bottom: 20%;
    left: 10%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px;
    border-radius: 5px;
}

.ptm-text h1 {
    font-size:  2vw;
}

/* fin sustituye */


/* se sustituye 
.ptm-container {
    position: relative;
    width: calc(100% - 10%);
    margin: 0 auto;
    box-sizing: border-box;
}

.ptm-container img {
    width: 90%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.ptm-text {
    position: absolute;
    bottom: 10px;
    left: 5%;
    font-size: 1.5em;
    color: white;
    font-family: Verdana, Geneva, sans-serif;
}

 fin de se sustituye */

#seccion-nosotros {
    padding: 20px;
}

.articulo-principal {    
    width: 98%;
    margin: 5px 2%;
}

.articulos-secundarios {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}

.articulos-secundarios article {
    width: 48%;
    margin: 3px 0;
}

#seccion-proyectos {
    padding: 20px;
}

.carousel {

    /*width: 100%;*/ 
    width: 80%;
    /* se agrega */
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.carousel-images {
    display: flex;
    transition: transform 0.5s ease;
    /*se agrega*/
    border-radius: 10px;
    margin-bottom: 1em;
    
}

.carousel-images img {
    width: 100%;
    height: auto;
    flex: 0 0 100%;
    cursor: pointer;
}

footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 10px;
    font-size: 0.8em;
}

@media (orientation: portrait) {
    .ptm-container img {
        width: auto;
        height: 50vh;
    }

    .ptm-text {
        position: static;
        margin-top: 20px;
        text-align: center;
        
    }
    
    .ptm-text h1 {
    font-size:   5vw;
}

    .articulos-secundarios article {
        width: 90%;
        margin: 3px 5%;
    }
    
    
    h1 {
    
    font-size: 1em;
    }
    
    
}

footer {
    background-color: #333;
    color: white;
    text-align: center;
    padding: 1em 0;
    margin-top: 2em;
}

#tarjeta {
    border: 0.25vw solid black;
}

.imagen-tarjeta {
    max-width: 12.5%; /* 1/8 del ancho de la ventana gráfica */
    height: auto;
    float: left;
    margin-right: 1em;
    color: black;
}    
.texto-tarjeta {
    padding: 1em;
    overflow: hidden;
}

.imagen-tarjeta {
    position: relative;
    
    top: 50%;
    transform: translate(10%, -50%);
    
}
    
.texto-tarjeta h3 a {
    color: white;
}

#tarjeta h1 {
  text-align: left;
    font-family: 'Optima', 'Segoe UI', Tahoma, sans-serif;
}    