body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}


header {
    width: 100%;
    background-color: #212899;
    color: white;
    padding: 1rem;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    width: 100%;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
}

.header-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: white;
    padding: 5px;
    border-radius: 5px;
    flex-shrink: 0; /* Evita que el logo se reduzca demasiado */
}

.logo {
    max-height: 60px;
}

.logo-text {
    color: #212899;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    margin-top: 5px;
}

.logo-link {
    text-decoration: none;
}

.header-title {
    flex-grow: 1; /* Ocupa el espacio disponible entre el logo y el botón */
    text-align: center; /* Centra el texto */
    color: white;
    font-size: 14px;
    margin: 2px;
}

@media (max-width:768px) {

    .header-text {
        font-size: 14px;
    }
}

.header-login {
    display: block;
    align-items: center;
    margin-right: 5px; /* Ajusta este margen según sea necesario */
}

.header-login a {
    display: block; /* Hace que los enlaces se comporten como bloques */
    margin-bottom: 10px; /* Añade espacio entre los botones */
}

.header-button-end-session{
    background-color: #e7363f;
    color: white;
    padding: 10px 5px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
}
.header-button-end-session:hover{
    background-color: #b80b13;

}

.header-button {
    background-color: #007bff;
    color: white;
    padding: 10px 5px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    /*margin-left: auto;*/ /* Para dar un pequeño espacio desde el título */
}

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

.login-button {
    background-color: #007bff;
    color: white;
    padding: 10px 5px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    /*margin-left: auto;*/ /* Para dar un pequeño espacio desde el título */
}

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

.register-button {
    background-color: #007bff;
    color: white;
    padding: 10px 5px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    /*margin-left: auto;*/ /* Para dar un pequeño espacio desde el título */
}

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

main {
    width: 80%;
    background: white;
    padding: 2rem;
    margin-top: 2rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

form {
    display: flex;
    flex-direction: column;
    width: 100%;
}

fieldset {
    border: 1px solid #ccc;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

fieldset fieldset {
    margin-top: 15px; /* separación interna entre fieldsets anidados */
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f9f9f9; /* opcional para distinguir visualmente */
}

legend {
    font-weight: bold;
    color: #212899;
}

label {
    display: block;
    margin-top: 0.5rem;
    color: #333;
}

input, textarea, select {
    padding: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;  /* Ajustamos el ancho para eliminar el margen extra */
    display: block;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.child label {
    display: block;
    margin-top: 0.5rem;
    color: #333;
}

.child input, .child select {
    padding: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;  /* Ajustamos el ancho para eliminar el margen extra */
    display: block;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #00509e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

button:hover {
    background-color: #003366;
}

input[type="submit"] {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

input[type="submit"]:hover {
    background-color: #218838;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    main {
        width: 100%;
        padding: 1rem;
        margin-top: 1rem;
        box-sizing: border-box;
    }

    form {
        width: 100%;
    }

    label {
        width: 100%;
        margin-top: 0.5rem;
    }

    input, textarea, select {
        width: 100%;
        margin-top: 0.5rem;
        box-sizing: border-box;
    }

    button {
        width: 100%;
        margin-top: 1rem;
    }

    .logo-container {
        flex-direction: column;
    }

    .logo-text {
        font-size: 1rem;
        text-align: center;
        margin-top: 5px;
    }

    fieldset {
        padding: 0.5rem;
        box-sizing: border-box;
    }

    .child {
        display: flex;
        flex-wrap: wrap;
    }

    .child label, .child input, .child select {
        width: 100%;
        margin-top: 0.5rem;
        box-sizing: border-box;
    }

    .child select {
        width: 48%;
        margin-right: 2%;
    }

    .group-label {
        margin-left: 0;
    }
}

.pay-button {
    background-color: #007bff;
    color: white;
    padding: 10px 5px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    margin-left: auto; /* Para dar un pequeño espacio desde el título */
}


.error-messages {
    color: red;
    background-color: #fdd;
    padding: 1rem;
    border: 1px solid red;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.recover-messages {
    color: rgb(206, 174, 30);
    background-color: #fdd;
    padding: 1rem;
    border: 1px solid rgb(206, 174, 30);;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.success-message {
    border: 1px solid green;
    background-color: #d4edda;
    color: green;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: bold;
}

#noticias {
    margin-top: 20px;
}

#noticias article {
    border-bottom: 1px solid #ccc;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#noticias h3 {
    color: #212899;
}

#noticias h4 {
    color: #555;
    font-style: italic;
}

#noticias p {
    color: #777;
    font-size: 0.9em;
}

.StripeElement {
    background-color: white;
    padding: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 16px;
}

#card-errors {
    color: red;
    margin-top: 10px;
}

.family-details {
    margin-bottom: 20px;
}

.child-details {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

#payment-element {
    margin-bottom: 20px;
}

#error-message {
    color: red;
    margin-top: 10px;
}

#no-changes-message {
    color: #d9534f;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

/* Modal: Estilos generales */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000; 
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: hidden; 
}

/* Contenido del modal */
.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); 
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    width: 90%; 
    max-width: 500px; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
}

/* Botón de cierre */
.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close-button:hover {
    color: #333;
}

/* Estilo del texto dentro del modal */
.modal-content h2 {
    color: #212899;
    margin-bottom: 15px;
}

.modal-content p {
    color: #333;
    font-size: 1rem;
    line-height: 1.5;
}
/* Contenedor del icono */
.modal-icon {
    text-align: center;
    margin-bottom: 15px;
}

/* Icono del modal */
.modal-icon img {
    display: block;
    margin: 0 auto;
}

/* Negrita en el texto */
.modal-content p strong {
    color: #e63946; 
    font-weight: bold;
}

.payment-icon {
    width: 80px; /* Ajusta según el tamaño deseado */
    height: 80px; /* Mantén proporción cuadrada */
    object-fit: contain; /* Ajusta la imagen dentro del tamaño sin deformarla */
    display: block; /* Para alinear bien dentro del contenedor */
    margin: 0 auto; /* Centrar la imagen */
}

/* Estilos generales para la página de opciones de pago */
.payment-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    padding: 15px;
    border-radius: 10px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    text-align: center;
}

.payment-option:hover {
    background-color: #e2e6ea;
    transform: scale(1.05);
}

/* Sección de detalles de cada método de pago */
.payment-details {
    display: none;
    margin-top: 30px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #ffffff;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Botón de volver */
.back-button {
    margin-top: 15px;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: #007bff;
    color: white;
    cursor: pointer;
}

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

/* Responsividad para pantallas pequeñas */
@media (max-width: 768px) {
    .payment-container {
        flex-direction: column;
    }
}

.btn-carnet {
        display: inline-block;
        padding: 12px 20px;
        background: linear-gradient(135deg, #004aad, #0077ff);
        color: white;
        font-weight: bold;
        border: none;
        border-radius: 8px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
        text-decoration: none;
        font-size: 16px;
        transition: background 0.3s ease, transform 0.2s ease;
}

.btn-carnet:hover {
        background: linear-gradient(135deg, #003d91, #0066dd);
        transform: translateY(-2px);
}

.btn-carnet:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
