/* ==========================================================================
   SENAVE · Sitio en mantenimiento
   ========================================================================== */

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

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0b3d0b 0%, #1e7a1e 50%, #0b3d0b 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    overflow: hidden;
}

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Círculos decorativos flotando en el fondo */
.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    animation: float 12s ease-in-out infinite;
}
.bg-circle:nth-child(1) { width: 300px; height: 300px; top: -80px; left: -80px; animation-delay: 0s; }
.bg-circle:nth-child(2) { width: 200px; height: 200px; bottom: -60px; right: -60px; animation-delay: 2s; }
.bg-circle:nth-child(3) { width: 150px; height: 150px; top: 40%; left: 10%; animation-delay: 4s; }
.bg-circle:nth-child(4) { width: 250px; height: 250px; bottom: 10%; right: 15%; animation-delay: 6s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-30px) scale(1.05); }
}

/* Contenedor principal */
.container {
    position: relative;
    height: 100vh;
    height: 100dvh; /* mejor en móviles (evita barra del navegador) */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 40px;
    z-index: 1;
}

/* Logos laterales */
.logo {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    width: 240px;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.5));
    animation: pulseLogo 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.08) rotate(-2deg);
}

.logo.left  { animation: slideInLeft 1.2s ease-out;  }
.logo.right { animation: slideInRight 1.2s ease-out; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-80px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(80px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseLogo {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}

/* Centro: solo texto */
.center {
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    animation: fadeInUp 1.5s ease-out;
}

.message {
    color: #ffffff;
    text-align: center;
}

.message h1 {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 14px;
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.6);
}

.message p {
    font-size: clamp(1rem, 1.8vw, 1.3rem);
    opacity: 0.95;
    font-weight: 300;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Puntos de carga animados */
.loader {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    justify-content: center;
}

.loader span {
    width: 12px;
    height: 12px;
    background: #ffd700;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}
.loader span:nth-child(2) { animation-delay: 0.2s; }
.loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40%           { transform: scale(1.2); opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

/* Tablets y pantallas medianas */
@media (max-width: 1024px) {
    .container { gap: 24px; padding: 32px; }
    .logo img  { width: 200px; max-height: 200px; }
}

/* Móviles en horizontal y tablets chicas: se apila */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        padding: 32px 24px;
    }

    .logo img {
        width: 160px;
        max-height: 160px;
    }

    .center { padding: 0; }

    .logo.left  { order: 1; }
    .center     { order: 2; }
    .logo.right { order: 3; }

    .message h1 { letter-spacing: 0.5px; }
}

/* Móviles estándar */
@media (max-width: 600px) {
    .container {
        gap: 28px;
        padding: 28px 20px;
        justify-content: space-evenly;
    }

    /* Los dos logos en la misma fila, más grandes y juntos */
    .logo.left,
    .logo.right {
        display: inline-flex;
    }

    .logo img {
        width: 120px;
        max-height: 120px;
    }

    /* Truco: agrupar visualmente los logos en una fila */
    .container {
        flex-wrap: wrap;
    }
    .logo.left  { order: 1; flex: 0 0 auto; }
    .logo.right { order: 2; flex: 0 0 auto; }
    .center     { order: 3; flex: 1 0 100%; }

    .message h1 {
        font-size: clamp(1.5rem, 7vw, 2rem);
        margin-bottom: 12px;
    }

    .message p {
        font-size: 1rem;
        max-width: 90%;
    }

    .loader { margin-top: 24px; }
    .loader span { width: 10px; height: 10px; }

    /* Círculos decorativos más chicos para no molestar */
    .bg-circle:nth-child(1) { width: 200px; height: 200px; top: -60px; left: -60px; }
    .bg-circle:nth-child(2) { width: 140px; height: 140px; bottom: -40px; right: -40px; }
    .bg-circle:nth-child(3) { width: 100px; height: 100px; }
    .bg-circle:nth-child(4) { width: 160px; height: 160px; }
}

/* Móviles chicos */
@media (max-width: 380px) {
    .container { gap: 22px; padding: 22px 16px; }
    .logo img  { width: 100px; max-height: 100px; }

    .message h1 { font-size: 1.4rem; }
    .message p  { font-size: 0.92rem; }
}

/* Móviles en horizontal (poca altura): reducir todo */
@media (max-height: 500px) and (orientation: landscape) {
    .container {
        flex-direction: row;
        gap: 20px;
        padding: 20px;
    }
    .logo img { width: 90px; max-height: 90px; }
    .message h1 { font-size: 1.4rem; margin-bottom: 8px; }
    .message p  { font-size: 0.9rem; }
    .loader { margin-top: 14px; }
    .loader span { width: 8px; height: 8px; }
    .bg-circle:nth-child(3),
    .bg-circle:nth-child(4) { display: none; }
}
