@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;500;700&display=swap');

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

body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* --- FONDO DE OFICINA CON EFECTO BORROSO --- */
body::before {
    content: "";
    position: absolute;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('./Images/ofi.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    filter: blur(5px); 
    z-index: -1;
    transform: scale(1.1);
}

.container {
    max-width: 1000px;
    width: 100%;
    text-align: center;
}

header {
    margin-bottom: 40px;
}

/* --- LOGO SIN FONDO BLANCO PERO CON BARRA AZUL --- */
.logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-bottom: 25px;
    
    /* TRUCO DE CSS: */
    /* 1. Invertimos: Fondo blanco->negro, Letras negras->blancas, Azul->Naranja */
    /* 2. Rotamos tono 180º: El Naranja vuelve a ser Azul */
    filter: invert(1) hue-rotate(180deg);
    
    /* 3. Screen: Hace transparente todo lo que sea negro (el fondo) */
    mix-blend-mode: screen;
}

header h2 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    margin-bottom: 10px;
}

header p {
    color: #f0f0f0;
    font-size: 1.2rem;
    font-weight: 500;
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
    letter-spacing: 1px;
}

/* --- DISEÑO BENTO GRID (3 ARRIBA, 3 ABAJO) --- */

.grid-portal {
    display: flex;
    flex-wrap: wrap;       
    justify-content: center; 
    gap: 30px;            
    
    /* Limite de ancho para forzar el 3 arriba / 3 abajo */
    max-width: 750px; 
    
    width: 100%;
    margin: 0 auto;
    height: auto;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.card {
    position: relative; 
    width: 220px;       
    height: 220px;
    border-radius: 30px;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    border: none;
    transform: none;
    top: auto;
    right: auto;
}

.card:hover {
    transform: translateY(-10px) scale(1.03); 
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    z-index: 2;
}

/* --- CONTENIDO INTERNO --- */

.contenido-card {
    position: static;
    width: auto;
    height: auto;
    transform: none;
    padding: 0;
    text-align: center;
}

.contenido-card i {
    font-size: 4.5rem; 
    margin-bottom: 20px;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.contenido-card span {
    font-size: 1.3rem; 
    font-weight: 600;
    letter-spacing: 0.5px;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* --- COLORES --- */
.nagios1 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }
.nagios2 { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.opensearch { background: linear-gradient(135deg, #f093fb 0%, #f77385 100%); }
.munin { background: linear-gradient(135deg, rgb(255, 190, 12) 0%, rgba(214, 143, 77, 0.9) 100%); }
.wiki { background: linear-gradient(135deg, #667eea 0%, #8d7f9b 100%); }
.ansible { background: linear-gradient(135deg, #EE0000 0%, #bb3a3a 100%); }

/* --- FOOTER MODIFICADO --- */
footer {
    margin-top: 50px; 
    
    color: #d4d4d4; 
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    
    padding-bottom: 20px;
}

/* --- RESPONSIVE (MÓVIL) --- */
@media (max-width: 768px) {
    .grid-portal {
        gap: 15px;
        max-width: 100%; 
    }

    .card {
        width: 145px; 
        height: 145px;
        border-radius: 20px;
    }
    
    .card:hover {
        transform: scale(1.05);
    }
    
    .contenido-card i { font-size: 2.8rem; }
    .contenido-card span { font-size: 1rem; }
    
    header h2 { font-size: 1.8rem; }
    
    footer { margin-top: 60px; }
}