/* Estilos generales */
body {
    margin: 0;
    background-color: #001f3f;
    min-height: 100vh;
}

/* Encabezados */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

h1 {
    font-size: 2.5em;
    border-bottom: 3px solid #007BFF;
    padding-bottom: 10px;
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 8px;
}

h3 {
    font-size: 1.75em;
}

h4 {
    font-size: 1.5em;
}

h5 {
    font-size: 1.25em;
}

h6 {
    font-size: 1em;
}

/* Párrafos */
p {
    font-size: 1.1em;
    margin-bottom: 15px;
}

/* Listas */
ul, ol {
    margin: 15px 0;
    padding-left: 20px;
}

ul li, ol li {
    margin-bottom: 10px;
    font-size: 1.1em;
}

/* Enlaces */
a {
    color: #00BFFF;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    color: #007BFF;
    text-decoration: underline;
}

/* Tablas */
table {
    width: 100%;
    max-width: 1200px;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #003366;
    table-layout: fixed;
}

table th, table td {
    padding: 12px;
    border: 1px solid #007BFF;
    text-align: left;
    font-size: 1.1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

table th {
    background-color: #007BFF;
    color: #ffffff;
    font-weight: bold;
}

/* Ajustar el ancho de las columnas */
table th:nth-child(1), table td:nth-child(1) {
    width: 5%;
}

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

table th:nth-child(4), table td:nth-child(4) {
    width: 25%;
}

table th:nth-child(5), table td:nth-child(5),
table th:nth-child(6), table td:nth-child(6) {
    width: 10%;
}

/* Imágenes */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Botones */
button {
    background-color: #007BFF;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

/* Código */
code {
    background-color: #002244;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    font-family: "Courier New", monospace;
    font-size: 1em;
}

/* Bloques de código */
pre {
    background-color: #002244;
    color: #ffffff;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: "Courier New", monospace;
    font-size: 1em;
    line-height: 1.5;
}

/* Formularios */
input, textarea, select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #007BFF;
    border-radius: 5px;
    background-color: #003366;
    color: #ffffff;
    font-size: 1.1em;
}

input:focus, textarea:focus, select:focus {
    border-color: #00BFFF;
    outline: none;
}

/* Estilos para el contenedor de enlaces */
.menu {
    max-width: 600px;
    width: 100%;
    padding: 20px;
    background-color: #002244;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Estilos para los enlaces dentro del menú */
.menu a {
    display: block;
    color: #00BFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.menu a:hover {
    background-color: #007BFF;
    color: #ffffff;
}

/* Contenedores */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #002244;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Estilos para la lista de clientes */
.clientes-container {
    background-color: #003366;
    width: 100%;
    max-width: 1200px;
    border-radius: 10px;
    padding: 20px;
    margin: 20px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

.cliente-header {
    display: flex;
    justify-content: space-between;
    background-color: #007BFF;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin-bottom: 10px;
}

.cliente-header span {
    flex: 1;
    text-align: center;
    font-size: 1.6em;
    text-decoration: bold;
}

.cliente-row, 
.cliente-row a {
    display: flex;
    justify-content: space-between;
    width: 100%;
    color: #FFFFFF;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    background-color: #002244;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.cliente-row:hover{
    cursor: default;
    background-color: #003366;
} 

.cliente-row a:hover {
    cursor: pointer;
}

.cliente-row span {
    flex: 1;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.75em;
    }

    h3 {
        font-size: 1.5em;
    }

    p, ul li, ol li, table th, table td, input, textarea, select {
        font-size: 1em;
    }

    .cliente-header, .cliente-row {
        flex-direction: column;
        text-align: center;
    }

    .cliente-header span, .cliente-row span {
        margin-bottom: 5px;
    }
}

/* Estilos para la clase btn */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007BFF;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin: 5px;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Estilos para el contenedor del formulario */
.formulario {
    max-width: 600px;
    width: 100%;
    margin: 20px auto;
    padding: 20px;
    background-color: #002244;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.formulario label {
    display: block;
    color: #ffffff;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 1.1em;
}

.formulario input[type="text"],
.formulario input[type="email"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #007BFF;
    border-radius: 5px;
    background-color: #003366;
    color: #ffffff;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.formulario input[type="text"]:hover,
.formulario input[type="email"]:hover,
.formulario input[type="text"]:focus,
.formulario input[type="email"]:focus {
    border-color: #00BFFF;
    outline: none;
}

.formulario input[type="submit"] {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: #007BFF;
    color: #ffffff;
    font-weight: bold;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.formulario input[type="submit"]:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.formulario input[type="submit"]:active {
    transform: translateY(0);
}

/* Estilos para el menú principal */
nav {
    background-color: #002244;
    width: 100%;
    padding: 10px 0;
    margin: 0px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    text-align: center;
}

nav a {
    color: #00BFFF;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.6em;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: inline-block;
}

nav a:hover {
    background-color: #007BFF;
    color: #ffffff;
}

.submenu {
    position: relative;
    display: inline-block;
}

.submenu-content {
    display: none;
    position: absolute;
    background-color: #002244;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    z-index: 1;
    min-width: 160px;
    text-align: left;
    top: 100%;
    left: 0;
}

.submenu-content a {
    color: #00BFFF;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.submenu-content a:hover {
    background-color: #007BFF;
    color: #ffffff;
}

.submenu:hover .submenu-content {
    display: block;
}

main {
    margin-top: 60px;
    padding: 20px;
}

/* Contenedor principal centrado */
#contenido {
    max-width: 1200px;
    width: 90%;
    margin: 80px auto 20px;
    padding: 20px;
    background-color: #002244;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: white;
    min-height: 300px;
}

#contenido > * {
    margin-left: auto;
    margin-right: auto;
    max-width: 800px;
}

#contenido form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#contenido img {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

#contenido form label {
    color: #00BFFF;
    font-weight: bold;
}

#contenido form input[type="text"],
#contenido form input[type="submit"] {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #007BFF;
    background-color: #003366;
    color: white;
}

#contenido form input[type="submit"] {
    background-color: #007BFF;
    cursor: pointer;
    transition: background-color 0.3s;
}

#contenido form input[type="submit"]:hover {
    background-color: #0056b3;
}

/* Estilos para mensajes de alerta */
.alert {
    padding: 15px;
    margin: 20px auto;
    max-width: 80%;
    border-radius: 4px;
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.alert {
    animation: fadeIn 0.5s ease-out, fadeOut 0.5s ease-in 4s forwards;
}

.alert-auto-close {
    animation: fadeIn 0.5s ease-out, fadeOut 0.5s ease-in 4s forwards;
}

@keyframes fadeOut {
    to { 
        opacity: 0; 
        transform: translateY(-20px); 
        height: 0; 
        padding: 0; 
        margin: 0; 
        overflow: hidden; 
    }
}

/* Radio buttons personalizados */
.radio-group {
    display: flex;
    gap: 20px;
    margin: 15px 0;
    align-items: center;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    z-index: 1;
}

.radio-option .custom-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #00BFFF;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.3s ease;
    background-color: #003366;
}

.radio-option input[type="radio"]:checked + .custom-radio::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #00BFFF;
}

.radio-option label {
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    margin-left: 26px;
}

.radio-option:hover .custom-radio {
    border-color: #007BFF;
}

.radio-option input[type="radio"]:focus + .custom-radio {
    box-shadow: 0 0 0 2px rgba(0, 191, 255, 0.3);
}

/* Controles de rango de edad */
.age-range-container {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background-color: #003366;
    border-radius: 5px;
    border: 1px solid #007BFF;
}

.range-slider {
    width: 90%;
    margin: 15px 0;
}

.range-slider label {
    display: block;
    color: #00BFFF;
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.range-slider input[type="range"] {
    width: 100%;
    height: 8px;
    -webkit-appearance: none;
    background: #001f3f;
    border-radius: 5px;
    outline: none;
    margin: 10px 0;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #00BFFF;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #007BFF;
}

.range-values {
    display: flex;
    justify-content: space-between;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 1.1em;
}

.error-message {
    color: #dc3545;
    font-size: 0.875em;
    margin-top: 0.25rem;
}

.form-control {
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    width: 100%;
}

.form-control.error {
    border-color: #dc3545;
}

.form-group {
    margin-bottom: 1rem;
}