/*body,
html {
    min-height: 100%;
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #e5e5e5);
    padding-top: 70px;
    padding-bottom: 70px;
    color: #333;  texto oscuro para buen contraste 
}*/

/* Reset y tipografía */
html,
body {
    height: 100%;
    min-height: 100vh;
    padding-top: 70px;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    background-image: url("/img/fondo.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: "Poppins", sans-serif;
}

body {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/* Contenedor principal */
.fondo-overlay {
    background: rgba(255, 255, 255, 0.9);
    padding: 2.5rem 3rem;
    border-radius: 20px;
    box-shadow:
        0 8px 24px rgb(149 157 165 / 0.2),
        0 16px 48px rgb(149 157 165 / 0.1);
    max-width: 1100px;
    width: 90%; /* Cambiado a 90% para que respire en móviles */

    /* Elimina o comenta los márgenes anteriores y usa esto: */
    margin: 20px; /* Un pequeño margen de seguridad */
}

/* Labels */
label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #444;
}

/* Inputs y selects con bordes suaves */
.form-control,
.form-select {
    border-radius: 12px;
    border: 1.5px solid #ddd;
    transition: border-color 0.3s ease;
    min-width: 160px;
    box-shadow: none;
}
.form-control:focus,
.form-select:focus {
    border-color: #6a11cb;
    box-shadow: 0 0 6px rgb(106 17 203 / 0.5);
    outline: none;
}

/* Títulos secciones */
h5 {
    font-weight: 700;
    font-size: 1.3rem;
    color: #222;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
    text-align: center;
}

/* Responsive para formularios */
@media (max-width: 768px) {
    .form-control,
    .form-select,
    .btn-consultar {
        width: 100% !important;
        min-width: auto !important;
    }
}

/* Header moderno */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: #dedede;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1030;
}
header h1 {
    color: black;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    margin: 0;
    font-family: "Poppins", sans-serif;
    text-transform: uppercase;
    user-select: none;
}

.header-hierro {
    position: fixed;
    top: 0;
    width: 100%;
    height: 70px;
    background: #dedede;
    box-shadow: 0 2px 10px rgb(0 0 0 / 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1030;
    padding-left: 10px;
    padding-right: 10px;
}

#logoHeader {
    height: 48px;
    min-width: 48px;
}

#tituloHeader {
    color: black;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    margin: 0;
    font-family: "Poppins", sans-serif;
    text-transform: uppercase;
    user-select: none;
    flex-grow: 1;
    text-align: center;
}

#btnSobreNosotros {
    min-width: 120px;
    font-size: 1rem;
}

@media (max-width: 600px) {
    .header-hierro {
        position: static;
    }
    main {
        padding-top: 0;
    }
}

@media (max-width: 600px) {
    .header-hierro {
        flex-direction: column;
        height: auto;
        padding: 8px 4px;
    }
    main {
        padding-top: 190px; /* prueba con 190px o más si el header es alto */
    }
}

/* Footer moderno */
footer {
    /* Quita position: fixed y bottom */
    width: 100%;
    height: 70px;
    background: #222;
    color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    user-select: none;
    box-shadow: 0 -2px 10px rgb(0 0 0 / 0.3);
    position: static; /* o puedes quitar esta línea, por defecto es static */
}

/* Footer redes sociales */
.footer-icons {
    margin-left: 1rem;
    display: flex;
    gap: 1rem;
}
.footer-icons a {
    color: #eee;
    transition: color 0.3s ease;
    font-size: 1.2rem;
}
.footer-icons a:hover {
    color: #6a11cb;
}

.icono-habilitado {
    font-size: 1.5rem; /* Tamaño más grande */
    display: block; /* Para que tome toda la celda */
    margin: 0 auto; /* Centrar horizontalmente */
    line-height: 1.5; /* Ajustar línea para centrar verticalmente */
}

table td,
table th {
    vertical-align: middle;
    text-align: center;
}

.fila-habilitada {
    font-weight: bold;
    color: inherit; /* para mantener color normal */
}

.fila-deshabilitada td {
    color: #bbb !important;
}

.icono-habilitado.text-muted {
    color: #bbb !important; /* gris clarito para icono deshabilitado */
}

.tabla-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* smooth scroll iOS */
    margin-top: 1rem;
}

#tituloBusqueda {
    font-weight: bold;
    font-size: 2rem;
    text-align: center;
    word-break: break-all;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    #tituloBusqueda {
        font-size: 1.2rem;
        padding: 0.5rem 0.2rem;
        word-break: break-all;
    }

    #tituloHeader {
        font-size: 1.2rem;
        padding: 0.5rem 0.2rem;
        word-break: break-all;
        margin-left: 28px;
    }

    .fondo-overlay {
        padding: 1rem 0.5rem;
        border-radius: 10px;
    }
    .tabla-responsive,
    #tablaResultados {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        font-size: 0.95rem;
    }

    .input-group {
        flex-wrap: nowrap !important;
    }
}

main {
    padding-top: 90px; /* escritorio, igual que la altura del header */
    min-height: calc(100vh - 140px);
}

@media (max-width: 600px) {
    main {
        padding-top: 190px; /* prueba con 190px o más si el header es alto */
    }
}

#logoCRHierro,
#document1,
#document2,
#pou-mare,
#partidor,
#mina-carmen,
#marge,
#riu {
    width: 44%;
    margin: 20px auto;
    display: block;
}

/* Estilo elegante y legible para el consumo diario */
#consumoDiario {
    display: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    background: #4a5b6f; /* azul grisáceo moderno */
    border-radius: 10px;
    padding: 12px 24px;
    margin: 20px auto;
    text-align: center;
    max-width: 320px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

/* Hover: un poco más claro para dar vida al pasar el mouse */
#consumoDiario:hover {
    transform: translateY(-2px);
    background: #5d6f85;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
