/* ============================================
   ESTILOS DE CREACIÓN DE HECHOS
   ============================================ */

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

/* ============================================
   LAYOUT PRINCIPAL
   ============================================ */

/* --- Body --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: rgba(74, 181, 191, 0.85);
    min-height: 100vh;
    padding: 40px 20px;
    line-height: 1.6;
    color: #333;
}

/* --- Contenedor del Formulario --- */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.5s ease-in-out;
}

/* --- Animación de Entrada --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   TIPOGRAFÍA
   ============================================ */

/* --- Título Principal --- */
h1 {
    color: #333333;
    margin-bottom: 30px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
}

/* ============================================
   MENSAJES FLASH
   ============================================ */

/* --- Mensaje Flash --- */
.flash {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
    animation: slideIn 0.3s ease-out;
}

/* --- Animación de Mensaje --- */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Mensaje de Error --- */
.flash.error {
    background-color: #fff5f5;
    color: #c53030;
    border: 1px solid #fc8181;
}

/* --- Mensaje de Éxito --- */
.flash.success {
    background-color: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

/* ============================================
   FORMULARIO
   ============================================ */

/* --- Formulario Base --- */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Etiquetas --- */
label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

/* --- Campos de Entrada --- */
input[type="text"],
input[type="number"],
input[type="datetime-local"],
input[type="file"],
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

/* --- Estado de Enfoque --- */
input:focus,
textarea:focus {
    outline: none;
    border-color: #4ab5bf;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* --- Área de Texto --- */
textarea {
    resize: vertical;
    min-height: 120px;
}

/* --- Campo de Archivo --- */
input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

/* --- Placeholder --- */
::placeholder {
    color: #aaa;
    font-style: italic;
}

/* ============================================
   VISTA PREVIA
   ============================================ */

/* --- Contenedor de Vista Previa --- */
.preview {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
    display: none;
}

.preview p {
    margin-bottom: 15px;
    color: #555;
    font-weight: 600;
}

/* --- Contenido de Vista Previa --- */
#preview-content {
    text-align: center;
}

#preview-content img,
#preview-content video {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================
   BOTONES
   ============================================ */

/* --- Botón de Envío --- */
button[type="submit"] {
    width: 100%;
    padding: 14px 20px;
    background: #4ab5bf;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

/* ============================================
   ENLACES
   ============================================ */

/* --- Enlaces --- */
p a {
    color: #4ab5bf;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

p a:hover {
    color: #3a9ca5;
    text-decoration: underline;
}

/* --- Margen Superior --- */
p.mt-20 {
    margin-top: 20px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* --- Tablets --- */
@media (max-width: 768px) {
    .form-container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    input[type="text"],
    input[type="number"],
    input[type="datetime-local"],
    textarea {
        font-size: 16px;
    }
}

/* --- Móviles --- */
@media (max-width: 480px) {
    body {
        padding: 20px 10px;
    }

    .form-container {
        padding: 25px 15px;
    }
}

