/* Contenedor principal del contenido de la página (mantener existente) */
.page-content {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    line-height: 1.6;
}

/* --- ESTILOS DEL LOGO GLOBAL PARA ESCRITORIO --- */
.hero-text {
    position: absolute; 
    top: 30px; 
    left: 0;
    transform: translateX(-100%) translateX(-20px);
    z-index: 1000;
}

.global-site-logo {
    max-width: 150px;
    height: auto;
    display: block;
}

/* --- REGLAS PARA OCULTAR LA HAMBURGUESA EN ESCRITORIO (MODIFICADAS) --- */
#hamburger-btn {
    display: none; /* OCULTA EL BOTÓN COMPLETO EN ESCRITORIO */
}

/* Aseguramos que el menú desplegable no se vea en escritorio */
#nav-menu {
    display: flex; /* Muestra el menú en línea en escritorio */
}

.hash-generator-section {
    padding: 20px 0;
}

.hash-generator-section h2 {
    color: #0056b3;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.hash-generator-section p {
    margin-bottom: 25px;
    color: #555;
}

/* Estilos para el campo de subida de archivo (mantener existente) */
.file-input-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    gap: 15px;
}

.file-input {
    display: none;
}

.custom-file-upload {
    background-color: #007bff;
    color: white;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    display: inline-block;
}

.custom-file-upload:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.file-name {
    font-size: 1em;
    color: #666;
    max-width: 60%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

/* Estilos para el botón de generar hash (mantener existente) */
.generate-button {
    background-color: #28a745;
    color: white;
    padding: 15px 35px;
    border: none;
    border-radius: 5px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-bottom: 40px;
    font-weight: bold;
}

.generate-button:hover:not(:disabled) {
    background-color: #218838;
    transform: translateY(-2px);
}

.generate-button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Estilos para el área de resultado del hash (mantener existente) */
.hash-result-container {
    background-color: #e9ecef;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px dashed #ced4da;
}

.hash-result-container h2 {
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 15px;
}

.hash-result-container p {
    margin-bottom: 20px;
}

.hash-display-area {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 15px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1em;
    color: #333;
    word-break: break-all;
    text-align: left;
    gap: 10px;
    position: relative;
}

.hash-value {
    flex-grow: 1;
}

.copy-button {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    margin-left: auto;
}

.copy-button:hover {
    background-color: #5a6268;
}

/* --- NUEVOS ESTILOS PARA LA CAJA DE EXPLICACIÓN DEL HASH --- */
.hash-explanation-box {
    background-color: #d1ecf1; /* Color azul claro */
    border-left: 5px solid #0056b3; /* Borde izquierdo azul oscuro */
    padding: 25px;
    border-radius: 8px;
    margin-top: 40px; /* Espacio superior para separarlo */
    margin-bottom: 40px; /* Espacio inferior */
    text-align: left;
    color: #0c5460; /* Color de texto oscuro para contraste */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Sombra suave */
}

.hash-explanation-box h3 {
    color: #004085; /* Color de título más oscuro */
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.4em;
    text-align: center; /* Centrar el título */
}

.hash-explanation-box p {
    margin-bottom: 1em;
    text-align: justify; /* Justificar el texto */
}

.hash-explanation-box ul {
    list-style-type: disc;
    margin-left: 25px;
    margin-bottom: 1em;
}

.hash-explanation-box ul li p { /* Para el párrafo dentro del li */
    margin-bottom: 0.5em;
    margin-top: 0;
}


/* Notas importantes (mantener existente) */
.important-note {
    background-color: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 20px;
    border-radius: 5px;
    text-align: left;
    color: #856404;
}

.important-note h3 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 10px;
}

.important-note p {
    margin-bottom: 10px;
}

/**************************************************/
/* ---         AJUSTES PARA MÓVILES         --- */
/**************************************************/
@media (max-width: 768px) {
    /* Ajustes para el HEADER en móvil */
    header {
        justify-content: flex-end; /* Asegura que el botón de hamburguesa esté a la derecha */
        padding: 1rem 20px; /* Mantén el padding lateral en móvil */
    }

    /* Ocultar el menú de navegación tradicional en móvil */
    .navbar ul {
        display: none;
    }

    /* --- ESTILO DEL BOTÓN DE HAMBURGUESA --- */
    #hamburger-btn {
        display: flex; /* Hacemos visible el botón */
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 2000;
        margin-right: 35px; /* Resetea cualquier margen extra que pueda haber */
    }

    .hamburger-bar {
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 5px;
        transition: all 0.3s linear;
    }

    /* --- ESTILO DEL MENÚ DESPLEGABLE (MODIFICADO) --- */
    #nav-menu {
        flex-direction: column;
        gap: 10px;
        background-color: rgba(51, 51, 51, 0.9);
        position: fixed;
        top: 0;
        right: -80%; /* Mueve el menú completamente fuera de la pantalla */
        width: 70%;
        max-width: 160px; /* Ajusta el ancho máximo para una mejor usabilidad */
        height: 40vh;
        padding-top: 80px;
        box-shadow: -2px 0 5px rgba(0,0,0,0.2);
        transition: right 0.3s ease-in-out;
        z-index: 1001;
    }

    #nav-menu li {
        width: 100%;
        text-align: center;
    }

    #nav-menu a {
        color: #f5e9e9;
    }

    /* --- ESTADOS ACTIVOS (CUANDO SE HACE CLIC) --- */
    #nav-menu.menu-open {
        right: 0;
    }

    #hamburger-btn.menu-open .hamburger-bar:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    #hamburger-btn.menu-open .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    #hamburger-btn.menu-open .hamburger-bar:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    /* --- AJUSTES DEL TEXTO EN HERO-IMAGE PARA MÓVILES --- */
    .hero-text h1 {
        font-size: 2em;
        margin-top: -100px; /* Puedes ajustar este valor si el texto se superpone con el header en móvil */
    }
    .hero-text p {
        font-size: 1em;
    }

    /* --- AJUSTES DEL CONTENEDOR PRINCIPAL --- */
    .page-content {
        width: 95%;
        padding: 15px;
        margin: 20px auto;
    }
}

/* Media Query para pantallas muy pequeñas (ej. iPhone 5/SE) */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.6em;
    }
    .hero-text p {
        font-size: 0.9em;
    }
    #nav-menu {
        max-width: 180px;
    }
}


