/* ========== GLOBAL ========== */

* {
    box-sizing: border-box;
}

body {
    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
}


/* CONTENEDOR GENERAL */
.contenedor {
    width: 95%;
    max-width: 1280px;
    margin: 0 auto;
}


/* ========== HEADER (VERSIÓN MOBILE FIRST) ========== */

header {
    padding: 1rem 0;
    justify-content: space-between;
    display: flex;
    flex-direction: row;
    align-items: flex-start;

}

header h1 {
    font-size: 2rem;
    margin: 0;
    font-weight: bold;
}

/* NAV EN MÓVIL: DEBAJO DEL TÍTULO, IZQUIERDA */
.enlaces{
    margin-top: 0.2rem;
    display: flex;
    flex-direction: column ;
    gap: 0.2rem;
}

.enlaces a{
    text-decoration: none;
    color: #000000;
    font-size: 1rem;
}

.enlaces:hover {
    color: #000;
}

/* ========== IMAGEN SUPERIOR ========== */

.headerimg {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: center;
    display: block;
}


/* ========== CONTENEDOR 1 (ARGUMENTO) ========== */

.contenedor1 {
    background-color: #f5f2ee;
    padding: 1rem;
    margin-top: 1.5rem;

}

.contenedor1 h3 {
    margin: 0;
}

.texto1 {
    text-align: justify;
    margin-top: 0.5rem;
}

/* ========== APARTADOS (MOBILE: UNA COLUMNA) ========== */

.apartados {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
    justify-content: space-between;
    align-items: stretch;
}

.contenedores {
    background: #f5f2ee;
    flex: 1;           
    padding: 1rem;
    flex-direction: column;
}

.contenedores h3 {
    margin-top: 0;
}
.contenedores p {
    text-align: justify;
    
}

.imagen {
    width: 150px;
    height: 220px;
    float: left;
    margin: 0 0.5rem 0.5rem;
    object-fit: cover;
    object-position: 5% 5%;
}

/* ========== FOOTER ========== */

footer {
    height: 5%;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.1rem;
    background:#f5f2ee;
    justify-content: space-between;
    color: #282626;
    display: flex;
}

footer p{
    margin-left: 10px;
    margin-right: 10px;
}



/* =========================================================
   ==========   VERSIÓN DESKTOP (BREAKPOINT 850px)   =======
   ========================================================= */

@media (min-width: 850px) {

    .contenedor {
        width: 80%;
        max-width: 1280px;
    }

    /* HEADER EN DESKTOP: TEXTO IZQUIERDA + MENÚ DERECHA */
    header {
        flex-direction: row;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .enlaces {
        margin-top: 0;
        flex-direction: row;
        gap: 1rem;
    }

    .enlaces a {
        font-size: 1rem;
        margin: 0;
    }


    /* APARTADOS EN 3 COLUMNAS */
    .apartados {
        flex-direction: row;
        justify-content: space-between;
    }

    .contenedores {
        width: 32%;
        display: block;
    }
    

    
}