/* Base styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f6f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1 {
    margin: 0;
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    color: #34495e;
    margin-bottom: 20px;
}

/* Layout */
main {
    flex: 1;
    padding: 8px;
    max-width: 800px;
    margin: 0 auto 3rem;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

section {
    text-align: center;
}

/* Header */
header {
    background-color: #2c3e50;
    color: #fff;
    padding: 8px;
}

header nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

header nav ul {
    display: flex;
    list-style-type: none;
    padding: 0;
    margin: 0;
    gap: 1rem; /* Using gap for consistent spacing */
}

header nav ul li {
    margin: 0;
}

header nav ul li a {
    text-decoration: none;
    padding: 0.5rem 1rem;
    background-color: #e2e8f0;
    color: #334155;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

header nav ul li a:hover {
    background-color: #a0aec0;
    color: #2c5282;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header img {
    height: 48px;
    width: auto;
    margin-right: 0.5rem;
}

/* Header styles */
header .max-w-7xl {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

header .max-w-7xl nav {
    margin-top: 1rem;
}

/* Carousel layout */
.carousel-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    overflow-x: visible;
}

.stats-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 100%;
}

.stats-card h3 {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stats-card p {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2563eb;
    margin: 0;
}

/* Footer */
footer {
    width: 100%;
    background-color: #1f2937;
    color: white;
    text-align: center;
    margin-top: auto;
}

footer p {
    font-size: 0.8rem;
    padding: 1rem 0;
    margin: 0;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 0.75rem;
}

.menu-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.menu-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.menu-icon {
    font-size: 1.75rem;
    color: #2563eb;
    margin-bottom: 0.5rem;
}

.menu-card h2 {
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

/* Forms */
.form-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    padding: 1.5rem;
}

/* Keep form-grid as grid for three-column layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}



/* Form inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select {
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem;
    width: 100%;
    transition: border-color 0.2s;
}

input:focus,
select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

label {
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

/* Buttons */
button, .btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn {
    margin: 0 5px; /* Space between buttons if needed */
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-secondary {
    background-color: #a0aec0;
    color: #2d3748;
}

.btn-secondary:hover {
    background-color: #8795a1;
}

.boton-accion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    font-size: 12px;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    width: 80px;
    height: 30px;
    transition: background-color 0.3s ease;
}

.boton-editar {
    background-color: #ffc107;
    color: white;
    border: none;
}

.boton-editar:hover {
    background-color: #e0a800;
}

.boton-eliminar {
    background-color: #dc3545;
    color: white;
    border: none;
}

.boton-eliminar:hover {
    background-color: #c82333;
}

.icono {
    margin-right: 5px;
    font-size: 14px;
}

/* Centering utilities */
.flex.justify-center {
    display: flex;
    justify-content: center;
}

.title-centered {
    text-align: center;
}

/* Form alignment utilities */
.form-row {
    display: contents;
   
}

.form-group {
    flex: 1;
    margin: 0 15px;
    margin-bottom: 1rem;
}


/* General form-group styling */
.form-group input[type="text"] {
    font-family: inherit;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem;
    width: 100%;
    transition: border-color 0.2s;
}

.form-group label {
    color: #4b5563;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}



.button-container {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

.button-container button {
    display: inline-block;
}

/* Tables */
.form-section table {
    width: 100%;
    border-collapse: collapse;
}

.form-section th,
.form-section td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.form-section th {
    background-color: #f3f4f6;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-section tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Responsive */
@media (max-width: 1024px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .carousel-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .menu-grid {
        grid-template-columns: 1fr;
    }
    .input-group {
        flex-direction: column;
    }
    .carousel-container {
        grid-template-columns: 1fr;
    }
}

/* Search form styling */
.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.input-group {
    display: flex;
    width: 100%;
    max-width: 500px;
}

.search-input {
    flex-grow: 1;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.25rem 0 0 0.25rem;
}

.search-form button {
    border: none;
    border-radius: 0 0.25rem 0.25rem 0;
    cursor: pointer;
    background-color: #4299e1;
    color: white;
    padding: 0.5rem 1rem;
}

.search-form button:hover {
    background-color: #2b6cb0;
}

.search-form label {
    margin-bottom: 0.5rem;
}

button[type="submit"] {
    font-size: 1rem;
    transition: background-color 0.3s ease;
}



/* Specific styles for the 'Buscar Estudiante' section */

/* Target only the form-grid within the 'Buscar Estudiante' section */
.form-section:has(h2.title-centered:contains('Buscar Estudiante')) .form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Ensure form-row within this specific section doesn't alter the grid */
.form-section:has(h2.title-centered:contains('Buscar Estudiante')) .form-grid .form-row {
    display: contents;
}

/* Button specific to this section */
.form-section:has(h2.title-centered:contains('Buscar Estudiante')) .form-grid .button-container {
    grid-column: 1 / -1;
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

/* Button inside the container */
.form-section:has(h2.title-centered:contains('Buscar Estudiante')) .button-container button {
    width: auto;
}

/* Styling for the 'Seleccionar' button */
.boton-seleccionar {
    background-color: #4CAF50; /* Green background */
    color: white; /* White text */
    padding: 10px 20px; /* Padding for better touch targets */
    border: none; /* Remove border */
    border-radius: 5px; /* Rounded corners */
    font-size: 16px; /* Adjust font size */
    cursor: pointer; /* Hand cursor on hover */
    transition: background-color 0.3s ease; /* Smooth transition for hover effect */
}

.boton-seleccionar:hover {
    background-color: #45a049; /* Slightly darker green on hover for better interaction feedback */
}