body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    
}

.contenedor {
    width: 50%;
    margin: auto;
    padding: 20px;
    border: 2px dotted #646464;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background-image: url(img/fondo.jpg);
}

.encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
}

.subtitulo {
    font-weight: bold;
    text-decoration: underline;
    font-size: 25px;
    margin-bottom: 8px;
}

.titulo h1 {
    color: #0078d7;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 32px;
    margin: 0;
    text-shadow: 8px 6px 12px rgba(0,0,0,0.3),
                 5px 5px 10px rgba(0,0,0,0.4);
}

.linea-titulo,
hr {
    border: none;
    border-top: 4px solid #333;
    margin: 15px 0;
}

.autor {
    text-align: right;
    font-size: 14px;
    margin: 0 0 20px 0;
    background: white;
    display: block;
    width: fit-content;
    margin-left: auto;
    padding: 5px 15px;
    border-radius: 6px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
    font-weight: bold;
    color: #333;
}

.definiciones .tarjetas,
.analogia .tarjetas {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin: 12px 0 8px 0;
    border: 5px solid #000000;
    padding: 10px;
}

.tarjeta {
    flex: 1 1 190px;
    background: #fff;
    border: 2.5px solid #e0e0e0;
    box-shadow: 0 4px 18px rgba(23,146,208,0.12);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px 18px 10px;
    min-width: 170px;
    max-width: 220px;
     word-break: break-word;
    overflow-wrap: break-word;
}


.tarjeta img {
    width: 80px;
    margin-top: 10px;
}

.html { border-color: orangered; background-color: rgb(233, 231, 229); }
.css { border-color: #0078d7; background-color: rgb(224, 231, 234); }
.js { border-color: forestgreen; background-color: rgb(220, 230, 220); }

.cajas {
    display: flex;
    flex: 1;
    justify-content: space-around;
    margin-top: 15px;
}

.cajas img {
    width: 120px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.resumen .cita {
    background: #f5f5f5;
    border-left: 5px solid #0078d7;
    padding: 15px;
    font-style: italic;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.2);
}

.h3_html,
.h3_css,
.h3_js {
    color: white;
    font-weight: bold;
    text-align: center;
    font-size: 1.2em;
    padding: 5px 0;
    width: 100%;
    border: 1px;
    
}

.h3_html { background-color: coral; }
.h3_css { background-color: #0078d7; }
.h3_js { background-color: yellowgreen; }

.casa {
    width: 600px;
    height: 300px;
    display: block;
    margin: auto;
    box-shadow: 8px 7px 6px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .tarjetas {
        flex-direction: column;
    }

    .tarjeta {
        max-width: 100%; 
    }
}
