body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    width: calc(100% - 48px);
    max-width: 1600px;
    margin: 36px auto;
    padding: 0;
    text-align: center;
}

h1 {
    margin-bottom: 18px;
    font-size: 24px;
    line-height: 1.25;
}

h4 {
    margin: 0 0 22px;
    font-size: 16px;
}

.search-box {
    margin: 0 auto 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}

#search-term {
    padding: 12px 14px;
    width: 100%;
    max-width: 560px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    padding: 12px 26px;
    font-size: 16px;
    border: none;
    background-color: #007bff;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

.volver-inicio {
    display: inline-block;
    margin: 20px 0 0 20px;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.volver-inicio:hover {
    background-color: #0056b3;
    color: #fff;
}

#results {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: #fff;
    table-layout: auto;
}

th, td {
    padding: 11px 12px;
    border: 1px solid #ccc;
    font-size: 14px;
    line-height: 1.25;
    vertical-align: middle;
}

thead {
    background-color: #007bff;
    color: #fff;
}

tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Anchos sugeridos por columna para aprovechar la pantalla */
#results-table th:nth-child(1),
#results-table td:nth-child(1) {
    width: 8%;
    white-space: nowrap;
}

#results-table th:nth-child(2),
#results-table td:nth-child(2),
#results-table th:nth-child(3),
#results-table td:nth-child(3) {
    width: 14%;
}

#results-table th:nth-child(4),
#results-table td:nth-child(4) {
    width: 7%;
    white-space: nowrap;
}

#results-table th:nth-child(5),
#results-table td:nth-child(5) {
    width: 13%;
}

#results-table th:nth-child(6),
#results-table td:nth-child(6) {
    width: 15%;
}

#results-table th:nth-child(7),
#results-table td:nth-child(7),
#results-table th:nth-child(8),
#results-table td:nth-child(8) {
    width: 9%;
    white-space: nowrap;
}

#results-table th:nth-child(9),
#results-table td:nth-child(9) {
    width: 11%;
    white-space: nowrap;
}

#no-results {
    margin-top: 20px;
    color: red;
}

.ayuda-fija {
    margin-top: 30px;
    font-size: 14px;
    color: #333;
    text-align: center;
    padding: 10px;
    background-color: transparent;
    border-radius: 4px;
}

.ayuda-fija a {
    color: #007bff;
    text-decoration: underline;
}

.btn-whatsapp {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.btn-whatsapp:hover {
    background-color: #0056b3;
    color: #fff;
}

@media (max-width: 900px) {
    .container {
        width: calc(100% - 24px);
        margin: 28px auto;
    }

    h1 {
        font-size: 19px;
    }

    h4 {
        font-size: 14px;
    }

    .search-box {
        flex-direction: column;
        gap: 10px;
    }

    #search-term,
    button {
        max-width: 100%;
        width: 100%;
    }

    th, td {
        padding: 10px;
        font-size: 13px;
    }

    table {
        min-width: 1120px;
    }

    .volver-inicio {
        width: calc(100% - 80px);
        text-align: center;
    }
}
