/* =========================================
   0. RESETEO BÁSICO (Evita desplazamientos)
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* =========================================
   1. ESTILOS GENERALES Y FONDO
   ========================================= */
body {
    background-image: linear-gradient(rgba(10, 25, 47, 0.75), rgba(10, 25, 47, 0.75)), url('Fondo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    font-family: Arial, sans-serif;
    color: white;
    overflow-x: hidden;
}

/* =========================================
   2. ENCABEZADO (Logo arriba a la derecha)
   ========================================= */
.header-logo-container {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    text-align: center;
}

/* =========================================
   3. CONTENEDOR PRINCIPAL
   ========================================= */
.container {
    max-width: 1200px;
    width: 90%;
    margin: 60px auto 40px auto; /* Margen superior para que respire el logo */
    background-color: rgba(10, 25, 47, 0.88);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

h1 {
    color: #FFD700;
    text-align: center;
    font-size: 40px;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    font-size: 20px;
    color: #b0c4de;
    margin-bottom: 40px;
}

p {
    line-height: 1.6;
}

button {
    background-color: #FFD700;
    color: #000;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

button:hover {
    background-color: #e6c200;
    transform: scale(1.05);
}

/* =========================================
   4. ESTRUCTURA DIVIDIDA (Botones Izq / Texto Der)
   ========================================= */
.home-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    width: 100%;
}

.home-toolbar {
    flex: 0 0 260px; /* Ancho fijo para botones */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toolbar-btn {
    background-color: #FFD700;
    color: #000;
    padding: 18px 20px;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    font-size: 19px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.toolbar-btn:hover {
    background-color: #0a192f;
    color: #FFD700;
    border: 2px solid #FFD700;
    transform: translateX(5px);
}

.home-main-text {
    flex: 1; /* Ocupa todo el espacio restante */
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border-radius: 15px;
    border-left: 4px solid #FFD700;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.2);
}

.home-main-text h3 {
    color: #FFD700;
    font-size: 26px;
    margin-top: 0;
    margin-bottom: 20px;
}

.home-main-text p {
    font-size: 20px;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* =========================================
   5. BOTÓN SUBIR Y SOS
   ========================================= */
/* Botón flotante para subir (Gigante) */
#btn-arriba {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #FFD700;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 35px;
    cursor: pointer;
    box-shadow: 0 6px 15px rgba(0,0,0,0.6);
    display: none;
    z-index: 3000;
    transition: transform 0.3s, background-color 0.3s;
    align-items: center;
    justify-content: center;
}

#btn-arriba:hover {
    background-color: #fff;
    transform: scale(1.15);
}

/* Botones SOS (Para el Index) */
.sos-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
    align-items: flex-end;
}

.sos-label {
    background-color: #ffffff;
    color: #333333;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    position: relative;
    margin-bottom: 5px;
    text-align: center;
}

.sos-label::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: #ffffff transparent transparent transparent;
}

.btn-sos {
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid white;
    transition: transform 0.3s, background-color 0.3s;
    width: 100%;
}

.btn-sos.web { background-color: #ff4444; }
.btn-sos.web:hover { background-color: #cc0000; transform: scale(1.05); }

.btn-sos.whatsapp { background-color: #25D366; }
.btn-sos.whatsapp:hover { background-color: #128C7E; transform: scale(1.05); }

/* =========================================
   📱 6. ADAPTACIÓN PARA MÓVILES
   ========================================= */
@media (max-width: 768px) {
    .container {
        width: 95%;
        margin: 120px auto 40px auto; /* Empujamos abajo para que no tape el logo */
        padding: 20px;
    }

    .header-logo-container {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        margin: 15px auto !important;
        width: 100%;
    }

    h1 { font-size: 32px; }
    .subtitle { font-size: 18px; margin-bottom: 25px !important; }

    .home-layout {
        flex-direction: column;
        gap: 25px;
    }

    .home-toolbar {
        flex: auto;
        width: 100%;
        gap: 12px;
    }

    .toolbar-btn {
        width: 100%;
        font-size: 22px !important;
        padding: 20px;
        text-align: center;
    }

    .toolbar-btn:hover { transform: none; }

    .home-main-text {
        border-left: none;
        border-top: 4px solid #FFD700;
        padding: 25px 15px;
    }

    .home-main-text h3 { font-size: 26px !important; }
    .home-main-text p { font-size: 21px !important; line-height: 1.6; }

    .sos-container {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        align-items: center !important;
        margin: 20px auto 40px auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .sos-label::after { right: 50% !important; margin-right: -8px !important; }
    .btn-sos { width: 85% !important; font-size: 18px !important; padding: 14px; }
    
    #btn-arriba {
        bottom: 20px; right: 20px;
        width: 50px; height: 50px; font-size: 25px;
    }
}

/* =========================================
   7. BUZÓN DE SUGERENCIAS (Modal y Botón)
   ========================================= */

/* El botón especial del menú lateral */
.btn-buzon {
    background-color: transparent;
    color: #FFD700;
    padding: 16px 20px;
    border: 2px dashed #FFD700;
    border-radius: 12px;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 25px; /* Lo separa un poco del resto de guías */
}

.btn-buzon:hover {
    background-color: rgba(0, 212, 255, 0.1);
    color: #00d4ff;
    border-color: #00d4ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.2);
}

/* El fondo oscuro que cubre la pantalla al abrirlo */
.modal-overlay {
    display: none; /* Oculto por defecto */
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 4000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

/* La ventana del buzón */
.modal-content {
    background: rgba(10, 25, 47, 0.95);
    width: 90%;
    max-width: 550px;
    padding: 40px;
    border-radius: 20px;
    border: 2px solid #00d4ff;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 212, 255, 0.3);
    text-align: center;
    animation: aparecerModal 0.3s ease-out;
}

@keyframes aparecerModal {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cerrar-modal {
    position: absolute;
    top: 15px; right: 20px;
    color: white; font-size: 32px;
    cursor: pointer; font-weight: bold;
    transition: 0.3s;
}

.cerrar-modal:hover { color: #ff4444; }