/* =======================================================
   Fuente global
======================================================= */
@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@400;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Libre Franklin', sans-serif;
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;    
    background-color: #f9f9f9;
    min-height: 100vh;
    color: #000;
}

body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('../bild/back.jpg') center/cover no-repeat;
    opacity: 0.6;
    z-index: -1;
}

body > *:not(style):not(script):not(link):not(meta) {
    position: relative;
    z-index: 1;
}


/* =======================================================
   Formularios globales
======================================================= */
form {
    margin: 20px auto;
    padding: 20px;
    max-width: 1000px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
}

/* form {
    display: grid;
    grid-template-columns: 1fr 1fr; /* dos columnas
    gap: 20px 20px;
    max-width: 1000px;
    height: 500px;           /* altura fija
    overflow-y: auto;        /* scroll vertical si se excede
    overflow-x: hidden;      /* evita scroll horizontal
    
    margin: 20px auto;
    padding: 20px;
    border: 2px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
}  */

/* Para que el scroll sea más elegante */
form::-webkit-scrollbar {
    width: 8px;
}

form::-webkit-scrollbar-thumb {
    background: #4B0082;   /* púrpura */
    border-radius: 4px;
}

form::-webkit-scrollbar-thumb:hover {
    background: #360060;   /* más oscuro */
}

form label {
    margin-top: 10px;
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #4B0099;
}

form input[type="text"],
form input[type="number"],
form input[type="password"],
form input[type="email"] {
    width: 400px;
    padding: 10px;
}

form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* Botón de envío por defecto */
form input[type="submit"] {
    width: 100%;
    margin-top: 30px;
    padding: 10px;
    background-color: #007bff;
    color: #FAFAFA;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* =======================================================
   Estilos específicos para formularios (clientes, usuarios, etc.)
======================================================= */
form .form-group {
    position: relative;
    margin-bottom: 2rem;
}

form input[type="text"],
form input[type="number"],
form input[type="email"],
form input[type="password"] {
    padding: 0.5rem;
    width: 380px; /* más compacto que el global */
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* efecto al enfocar */
form input:focus {
    border-color: #4B0082;
    box-shadow: 0 0 5px rgba(75, 0, 130, 0.5);
    outline: none;
}

/* Tooltip elegante */
form .tooltip {
    display: none;
    position: absolute;
    left: 420px;
    top: 10px;
    background-color: rgba(75, 0, 130, 0.85);
    color: #FFF;
    border: 1px solid #aaa;
    padding: 0.5rem;
    border-radius: 4px;
    width: 360px;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 100;
}

form .form-group:focus-within .tooltip {
    display: block;
}

/* Botón principal dentro de formularios */
form .btn-principal {
    background-color: #4B0082;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

form .btn-principal:hover {
    background-color: #360060;
    transform: scale(1.05);
}

form .btn-principal:active {
    background-color: #5A189A;
    transform: scale(0.98);
}

/* =======================================================
   Botones genéricos (fuera de formularios)
======================================================= */
.btn-principal {
    background-color: #4B0082;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-principal:hover { background-color: #360060; transform: scale(1.05); }
.btn-principal:active { background-color: #5A189A; transform: scale(0.98); }

.btn-secundario {
    background-color: #E0E0E0;
    color: #4B0082;
    padding: 10px 18px;
    border: 1px solid #4B0082;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-secundario:hover { background-color: #CFCFCF; transform: scale(1.05); }
.btn-secundario:active { background-color: #B0B0B0; transform: scale(0.98); }

.btn-alerta {
    background-color: #D32F2F;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-alerta:hover { background-color: #B71C1C; transform: scale(1.05); }
.btn-alerta:active { background-color: #E53935; transform: scale(0.98); }

/* ====== ComboBox / Select elegante ====== */
select .combo-elegante
{
    width: 400px;                /* Igual que tus inputs */
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    appearance: none;            /* Quita estilo nativo del navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%234B0082'><polygon points='0,0 12,0 6,8'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Efecto al enfocar */
select .combo-elegante:focus {
    border-color: #4B0082; /* púrpura */
    box-shadow: 0 0 5px rgba(75, 0, 130, 0.5);
    outline: none;
}

/* Opciones dentro del desplegable */
select .combo-elegante option {
    padding: 10px;
    font-size: 1rem;
}

/* Estilo hover para opciones en algunos navegadores */
select .combo-elegante option:hover {
    background-color: #f1d97c;
    color: #000;
}

/* =======================================================
   Validación de campos
======================================================= */
.feld-gueltig {
    border: 2px solid green;
    background-color: #e8f5e9;
}
.feld-ungueltig {
    border: 2px solid red;
    background-color: #ffebee;
}

/* =======================================================
   Calendario
======================================================= */
.kalender {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}
.kalender div {
    border: 1px solid #4B0082;
    padding: 20px;
    font-size: 1.5em;
    background-color: #f9f9f9;
}
.kopftag {
    background-color: #0077cc;
    color: #4B0082;  
    font-weight: bold;
}
.heute {
    background-color: rgba(128, 0, 128, 0.5);
}

/* =======================================================
   Layout general
======================================================= */
header, main, footer { padding: 20px; }
main { flex: 1; text-align: center; margin-top: 50px; }

.overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(128, 0, 128, 0.5);
    z-index: -1;
}

/* =======================================================
   Tipografía títulos
======================================================= */
h1 {
    color: #4B0082;
    text-align: center;
    margin-top: 20px;
    font-size: 2em;
}

h2 {
    color: #360060;
    font-size: 1.8em;
    margin: 20px 0;
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
    /* border-bottom: 2px solid #4B0082;
     display: inline-block; */
    padding-bottom: 5px;
}

/* =======================================================
   Tablas
======================================================= */
table {
    width: 100%;
    margin: 20px auto;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
thead {
    background-color: #4B0082;
    color: white;
}
th, td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #ddd;
}
th {
    background-color: #4B0082;
    color: white;
    font-weight: bold;
}
tr:nth-child(even) { background-color: #f2f2f2; }
tr:hover { background-color: #f1d97c; }
td { color: #333; }

/* =======================================================
   Carrusel
======================================================= */
.carousel-container {
    width: 90%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.carousel-item {
    width: 300px;
    height: 200px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin: 0 10px;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.carousel-item img {
    width: 250px;
    height: 150px;
    margin-bottom: 10px;
    transition: transform 0.3s ease-in-out;
}
.carousel-item p {
    font-size: 1rem;
    color: #333;
    margin: 0;
    display: none;
}

/* =======================================================
   Navbar
======================================================= */
.navbar {
    background-color: #4B0082;
    overflow: hidden;
  	position: relative;
  	top: 0;
  	z-index: 10000; /* Valor alto para estar encima del background y del reCAPTCHA */
}
.navbar ul {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    justify-content: center;
}
.navbar ul li { padding: 14px 20px; }
.navbar ul li a {
    color: #fff;
    text-decoration: none;
    display: block;
    font-size: 16px;
}
.navbar ul li a:hover {
    background-color: #33005D;
    transition: background-color 0.3s;
}
@media (max-width: 600px) {
    .navbar ul { flex-direction: column; }
    .navbar ul li { text-align: center; padding: 10px; }
}

/* =======================================================
   Footer
======================================================= */
footer {
    background-color: #4B0082;
    color: #fff;
    padding: 20px 0;
    font-family: 'Libre Franklin', sans-serif;
    text-align: center;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-section {
    flex: 1;
    margin: 20px;
    text-align: center;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section p, 
.footer-section ul, 
.footer-section a {
    font-size: 14px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li { margin-bottom: 10px; }

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
}
.footer-section ul li a:hover { text-decoration: underline; }

.footer-bottom {
    text-align: center;
    padding: 10px 0;
    border-top: 1px solid #fff;
    margin-top: 20px;
    font-size: 14px;
}