:root {
    --primary-color: #103f6e;
    --secondary-color: #3374a0;
    --accent-color: #ffb400;
    --background-color: #f0f4f8;
    --section-background: #ffffff;
    --text-color: #333333;
    --font-family: 'Poppins', sans-serif;
    --font-size: 16px;
    --line-height: 1.6;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* General */
body {
    background: var(--background-color);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: var(--font-size);
    line-height: var(--line-height);
    margin: 0;
    padding: 0;
}

/* Cabecera fija */
.fixed-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow);
    padding: 10px 20px;
}

.fixed-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fixed-header img.logo {
    height: 80px;
}

/* Botones superiores */
.fixed-header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.fixed-header nav a {
    background: var(--primary-color);
    color: white !important;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-size: 16px;
}

.fixed-header nav a:hover {
    background: var(--accent-color);
    color: white;
}

.container {
    margin-top: 120px;
    padding: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
}

/* Mitad izquierda */
.left-container {
    flex: 1;
    max-width: 50%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.left-content,
.map-container {
    background: var(--section-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
}

/* Mitad derecha */
.right-content {
    flex: 1;
    max-width: 50%;
    background: var(--section-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    overflow-y: auto;
    height: auto;
}

/* Formularios */
.config-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.config-form label {
    font-weight: bold;
    color: var(--primary-color);
}

.config-form input,
.config-form select,
.config-form textarea {
    width: 70%;
    padding: 10px;
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    background: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.config-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.config-form input:focus,
.config-form select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(255, 180, 0, 0.5);
    outline: none;
}

.config-form .submit-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 30px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
}

.config-form .submit-button:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* Lista de archivos */
.file-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.file-list li {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding: 10px;
    gap: 10px;
}

.file-list li:last-child {
    border-bottom: none;
}

.file-list li .left-block,
.file-list li .center-block,
.file-list li .right-block {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 30%;
}

.file-list li .left-block {
    justify-content: flex-start;
}

.file-list li .center-block {
    justify-content: center;
}

.file-list li .right-block {
    justify-content: flex-end;
}

/* Botón Graficar */
.analisis-button {
    background: var(--primary-color);
    color: white !important;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: background 0.3s ease;
    border: none;
}

.analisis-button:hover {
    background: var(--accent-color);
    color: white !important;
}

/* Botón MSEED */
.mseed-button {
    background: var(--secondary-color);
    color: white !important;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-weight: bold;
    transition: background 0.3s ease;
    border: none;
}

.mseed-button:hover {
    background: var(--accent-color);
    color: white !important;
}

/* Enlaces y spans */
.file-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.file-list a:hover {
    text-decoration: underline;
}

.file-list span {
    color: var(--text-color);
    font-size: 14px;
    white-space: nowrap;
}

/* Paginación */
.pagination {
    margin: 20px 0;
    text-align: center;
}

.pagination-link {
    display: inline-block;
    margin: 0 5px;
    padding: 10px 15px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background 0.3s ease, transform 0.2s ease;
}

.pagination-link:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.pagination-link.active {
    background: var(--accent-color);
    font-weight: bold;
}

/* Botones de Orden */
.order-buttons {
    margin: 20px 0;
    text-align: center;
}

.order-button {
    display: inline-block;
    margin: 0 5px;
    padding: 10px 15px;
    background: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: background 0.3s ease, transform 0.2s ease;
}

.order-button:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* Mapa */
.map-container iframe {
    width: 100%;
    height: 300px;
    border: 0;
    border-radius: var(--border-radius);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .left-container,
    .right-content {
        max-width: 100%;
    }

    .file-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .file-list li .center-block {
        margin-top: 5px;
    }

    .file-list li .right-block {
        margin-top: 5px;
    }
}

@media (max-width: 480px) {
    .fixed-header img.logo {
        height: 50px;
    }

    .analisis-button,
    .mseed-button {
        font-size: 12px;
        padding: 8px 10px;
    }

    .pagination-link {
        padding: 8px 10px;
        font-size: 12px;
    }
}

/* ===== MINIATURA CON HOVER ===== */

.thumb-container {
    position: relative;
    display: inline-block;
}

.thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #ccc;
}

/* Imagen grande oculta */
.thumb-container .preview {
    display: none !important;
    position: absolute;
    top: 0;
    left: 70px;
    width: 300px;
    border: 2px solid #444;
    background: white;
    z-index: 1000;
}

/* Mostrar solo al pasar el mouse */
.thumb-container:hover .preview {
    display: block !important;
}

/* Evita que se corte la imagen ampliada */
.file-list li .left-block {
    overflow: visible;
}
