/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Base del body compartida: Flexbox para centrado absoluto */
body {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* =========================================
   ESTILOS LANDING PAGE (index.html)
   ========================================= */
body:not(.bg-formulario) {
    background-image: url('https://images.unsplash.com/photo-1538108149393-fbbd81895907?q=80&w=2000&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65);
    z-index: 1;
}

.content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    padding: 20px;
    width: 90%;
    max-width: 800px;
}

.logo {
    max-width: 180px;
    margin-bottom: 20px;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.7);
}

p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
}

.btn-central {
    display: inline-block;
    background-color: #28a745;
    color: #ffffff;
    padding: 15px 45px;
    font-size: 1.25rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 50px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.btn-central:hover {
    background-color: #218838;
    transform: scale(1.05);
}

.btn-central:active {
    transform: scale(0.95);
}

/* =========================================
   ESTILOS FORMULARIO (inspecciones.html)
   ========================================= */
body.bg-formulario {
    background-color: #eef2f5;
}

.form-container {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 450px;
    z-index: 10;
}

.form-container h2 {
    text-align: center;
    color: #333;
    margin-bottom: 25px;
    font-size: 1.6rem;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: #28a745;
    outline: none;
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.3);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    gap: 15px;
}

.btn-guardar {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 0;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    width: 50%;
    text-align: center;
}

.btn-guardar:hover {
    background-color: #218838;
}

.btn-cancelar {
    display: inline-block;
    text-decoration: none;
    color: #495057;
    background-color: #e9ecef;
    padding: 12px 0;
    border-radius: 5px;
    font-size: 1rem;
    text-align: center;
    font-weight: bold;
    transition: background-color 0.3s;
    width: 50%;
    box-sizing: border-box;
}

.btn-cancelar:hover {
    background-color: #dee2e6;
}

/* =========================================
   ESTILOS DEL MODAL DE CONFIRMACIÓN
   ========================================= */
.modal-fondo {
    display: none; /* Oculto por defecto, el JS lo cambia a flex */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-contenido {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: escalarModal 0.3s ease-out;
}

.modal-contenido h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.modal-contenido p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.modal-acciones {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.btn-cancelar-modal {
    background-color: #e9ecef;
    color: #495057;
    border: none;
    padding: 12px 0;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    width: 50%;
    transition: background-color 0.3s;
}

.btn-cancelar-modal:hover {
    background-color: #dee2e6;
}

/* Animación de entrada para el modal */
@keyframes escalarModal {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive general */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    p { font-size: 1.1rem; }
    .form-container { padding: 30px 20px; }
    .modal-contenido { padding: 25px 20px; }
}