*{
    font-family: "Quicksand", sans-serif;
    font-weight: 400;
    font-style: normal;
    box-sizing: border-box;
}

body {
    margin: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-top: 8px solid #cc0000;
}

hr {
    background-color: #dbdbdb;
    height: 1px;
    border: 0;
    margin: 20px;
}

.principal {
    max-width: 1020px;
    width: 100%;
    margin: 0 auto 30px auto;
}

.nav{
    margin-top: 40px;
    margin-bottom: 20px;
}

.nav .logo{
    height: 50px;
}

.buscador {
    margin-bottom: 50px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.buscador .txt-buscador {
    font-size: 20px;
    flex: 1;
    padding: 12px;
    background-color: #ededed;
    border: none;
    border-bottom: 1px solid #cccccc;
    border-radius: 10px 0 0 10px;
}

.buscador select {
    background-color: #cc0000;
    color: #FFFFFF;
    font-size: 16px;
    padding: 5px;
}

.buscador select option{
    background-color: #ffffff;
    color: #000000;
}

.buscador .btn-buscar {
    padding: 0 30px;
    font-size: 16px;
    background-color: #000000;
    color: #FFFFFF;
    font-weight: bold;
    border-radius: 0 10px 10px 0;
}

/*AUTO COMPLETAR*/

.buscador {
    position: relative;
}

.autocomplete-lista {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 3px solid #cc0000;
    border-radius: 10px;
    list-style: none;
    margin: 6px 0 0 0;
    padding: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 260px;
    overflow-y: auto;
}

    .autocomplete-lista li {
        padding: 0.5rem 1rem;
        cursor: pointer;
        font-size: 1.25rem;
    }

        .autocomplete-lista li:hover,
        .autocomplete-lista li.activo {
            background: #f0f0f0;
        }

        .autocomplete-lista li mark {
            background: none;
            font-weight: 700;
        }

/**/

h2 {
    padding: 0 20px;
    margin: 20px;
    font-weight: bold;
    border-left: 4px solid #cc0000;
}

h3, h4 {
    font-weight: bold;
    font-size: 100%;
}

.col-2 {
    column-count: 2;
}

.portada {
    display: flex;
    flex-direction: row;
}

.cont-portada {
    padding: 20px;
    font-size: 1.10em;
    text-align: justify;
}

.botones_portada {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn {
    text-align: center;
    margin: 30px 5px 40px 5px;
}

.btn a {
    background-color: #939393;
    padding: 10px 20px;
    border-radius: 5px;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
}

.btn a:hover {
    background-color: #7d7d7d;
}

.palabras ul {
    list-style: none;
    display: flex;
    padding: 20px;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
}

.palabras ul li {
    margin: 2px;
}

.palabras ul li a{
    padding: 4px 8px;
    display: block;
    border-radius: 4px;
    background-color: #efeded;
    text-decoration: none;
    color:#000000;
}

.palabras ul li a:hover {
    background-color: #cccccc;
}

.cita {
    margin: 20px;
    font-size: 85%;
    color: #000000;
}

.cita strong {
    font-weight: bold;
}

.pie-cont {
    width: 100%;
    background-color: #cc0000;
}

.pie {
    display: flex;
    max-width: 1020px;
    justify-content: flex-start;
    padding: 20px;
    border-top: 1px solid #cccccc;
    flex-direction: row;
    align-items: flex-start;
    margin: 0 auto;
    color: #FFFFFF;
}

img.cc {
    margin-right: 8px;
    height: 25px;
}

span.lemma {
    font-weight: bold;
    background-color: #ffe066;
    padding: 0 2px;
    border-radius: 3px;
}

/*TABLA ABREVIATURAS*/

table {
    margin: 20px auto; /* Centrar en la página */
    border-collapse: collapse;
}

th, td {
    padding: 6px 10px; /* Padding interno */
    border: 0;
}

thead th {
    background-color: #cc0000;
    color: white;
    font-weight: bold;
}

tbody td:first-child {
    font-weight: bold;
}

tbody tr:nth-child(odd) {
    background-color: #f2f2f2; /* Gris muy claro */
}

/*RESULTADOS*/

.resultado{
    margin-bottom:30px;
}

.resultado h3 {
    font-weight: bold;
    font-size: 110%;
    color: #000000;
}

.resultado h4 {
    font-weight: bold;
    font-size: 110%;
    color: #000000;
    text-transform:capitalize;
}

.resultado h2.termino {
    font-weight: bold;
    color: #000000;
    font-size: 170%;
    text-transform: capitalize;
    padding: 0;
    border: 0;
}

.resultado ul.propiedades {
    list-style: none;
    margin: 0;
    padding-left: 20px;
}

li.categoria{
    margin-bottom: 20px;
    font-style: italic;
    color: #00afb9;
}

p.cita {
    padding: 10px;
    background-color: #f5f5f5;
    font-style: italic;
    border-radius: 4px;
}

.botonera {
    margin-top: 10px;
    display: flex;
    flex-direction: row-reverse;
}

.botonera a, .botonera a:active, .botonera a:visited, .botonera a:link {
    text-decoration: none;
    padding: 4px 10px;
    background-color: #f1f1f1;
    border-bottom: 1px solid #cccccc;
    border-radius: 5px;
    margin-left: 4px;
    color:#000000;
}

.botonera a:hover {
    background-color: #cccccc;
}

mark {
    background-color: #ffe066;
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}


/*ACORDEON RESULTADOS*/


.termino {
    scroll-margin-top: 1rem;
    cursor: pointer;
    user-select: none;
}

.termino::before {
    content: '▶';
    font-size: 0.4em;
    vertical-align: middle;
    display: inline-block;
    transition: transform 0.3s ease;
    margin-right: 0.4em;
    margin-bottom: 0.4em;
    color: #cc0000;
    /* padding: 5px; */
    /* background-color: #0000; */
}

.palabra.abierta .termino::before {
    transform: rotate(90deg);
}

/* grid-template-rows anima de 0 a auto */
.propiedades {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
    overflow: hidden;
    margin: 0;
}

    .propiedades > * {
        min-height: 0; /* necesario para que el colapso funcione */
    }

.palabra.abierta .propiedades {
    grid-template-rows: 1fr;
}

/*MOVIL*/

@media (max-width: 768px) {

    .nav {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .nav .logo {
        height: 40px;
    }

    .buscador {
        flex-direction: column;
        margin-bottom: 30px;
    }

    .col-2 {
        column-count: 1;
    }

    .portada {
        flex-direction: column;
    }

    .buscador .txt-buscador {
        border-radius: 10px 10px 0 0;
    }

    .buscador select {
        border-radius: 0 0 10px 10px;
        height: 40px;
    }

    .buscador .btn-buscar {
        padding: 10px;
        border-radius: 10px;
        margin-top: 10px;
    }

    .resultado ul.propiedades {
        padding: 10px;
    }

    .resultado h2.termino {
        font-size: 300%;
        padding: 0 10px;
        margin: 0 0 20px 0;
    }

    .pie {
        width: 100%;
        left: 0;
        transform: initial;
        flex-direction: column;
        text-align: center;
    }
}
