/* General styling */
.buscador-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns the content to the top */
    align-items: center; /* Centers the content horizontally */
    width: 100%;
    background-color: #5C5B62; /* Dark gray */
    padding: 20px;
    box-sizing: border-box;
    min-height: 100vh; /* Ensures the section takes the full height of the viewport */
}

.buscador-container {
    width: 90%;
    max-width: 800px;
    background-color: #E7E7E7; /* Light gray */
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2);
}

#noResultsMessage {
    display: none; /* Hidden by default */
    color: #5C5B62; /* Match your dark gray text */
    font-family: "Inter", sans-serif;
    font-size: 16px;
    margin-top: 10px;
    text-align: center;
    background-color: #f4f4f4;
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Search bar */
.search-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    margin-bottom: 20px; /* Space between search field and results */
}

.search-container input {
    flex-grow: 1;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #FBC333; /* Yellow */
    border-radius: 50px; /* Fully rounded on both sides */
    outline: none;
    font-family: "Inter", sans-serif;
    margin-right: 10px; /* Padding between search field and button */
}

.search-container button {
    padding: 12px 20px;
    background-color: #FBC333; /* Yellow */
    color: white;
    border: none;
    border-radius: 50px; /* Fully rounded */
    font-family: "DM Serif Display", serif;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-container button:hover {
    background-color: #151416; /* Dark gray on hover */
    color: white; /* Keep white text */
}

/* Table container */
.table-wrapper {
    width: 100%;
    overflow-x: auto; /* Enables horizontal scroll on small screens */
    margin-top: 20px;
}

/* Table styling */
#buscador {
    width: 100%;
    border-collapse: collapse;
}

#buscador th, #buscador td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    font-family: "Inter", sans-serif;
    color: #5C5B62; /* Dark gray text */
}

#buscador th {
    background-color: #FBC333; /* Yellow */
    color: white;
}

#buscador tbody tr:nth-child(odd) {
    background-color: #ffffff;
}

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

.highlight {
    font-weight: bold;
    color: #151416; /* Optional: You can change the highlight color to yellow or another color */
}
/* Center the pagination container */
.pagination {
    display: flex;
    justify-content: center; /* Center the buttons */
    align-items: center;
    gap: 10px; /* Small gap between the buttons */
    margin-top: 20px; /* Optional: add some space between the table and the buttons */
}

/* Style the buttons */
.pagination button {
    background-color: #FBC333; /* Yellow background */
    color: white; /* Text color */
    border: none;
    border-radius: 20px; /* Rounded edges */
    padding: 8px 16px; /* Padding for size */
    font-size: 14px; /* Font size */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

/* Hover effect for buttons */
.pagination button:hover {
    background-color: #5C5B62; /* Medium grey when hovered */
}

/* Disabled buttons (if you want to disable Anterior or Siguiente when needed) */
.pagination button:disabled {
    background-color: #E7E7E7; /* Light grey */
    cursor: not-allowed; /* Disable pointer cursor */
}




/* Responsive Design */
@media screen and (max-width: 600px) {
    .search-container {
        flex-direction: column;
        gap: 10px;
    }

    .search-container input {
        border-radius: 50px;
    }

    .search-container button {
        border-radius: 50px;
        width: 100%;
    }

    .table-wrapper {
        overflow-x: auto;
    }

    #buscador th, #buscador td {
        padding: 8px;
        font-size: 14px;
    }

    /* Mobile: Change table to card-style rows */
    #buscador {
        display: block;
        width: 100%;
    }

    #buscador th {
        display: none; /* Hide headers on mobile */
    }

    /* Mobile: Cards background fixed to a light gray */
    #buscador tr {
        display: block;
        margin-bottom: 15px; /* Space between rows */
        padding: 10px;
        background-color: #f9f9f9 !important; /* Light gray background for all cards */
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

@media (max-width: 768px) {
    #buscador thead {
        display: none;
    }
}

    /* Ensure cards have the same background color */
    #buscador tr:nth-child(odd), 
    #buscador tr:nth-child(even) {
        background-color: #f9f9f9 !important; /* Force uniform background for all cards */
    }

    #buscador td {
        display: block;
        width: 100%;
        text-align: left;
        padding: 8px 12px;
        margin-bottom: 5px;
        background-color: #ffffff; /* Keep the text box white */
        border-radius: 5px;
        box-sizing: border-box;
    }

    /* Add spacing and correct grouping of data in card view */
    #buscador td.term-spanish:before {
        content: "Español: ";
        font-weight: bold;
    }

    #buscador td.term-quichua:before {
        content: "Quichua: ";
        font-weight: bold;
    }
   

	#buscador td.term-source:before {
        content: "Fuente: ";
        font-weight: bold;
    }

    /* Add padding around the whole card */
    #buscador td {
        padding: 12px;
        border-radius: 8px;
        margin: 8px 0;
        background-color: #ffffff;
    }
}
