/* criaderos.css */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2D2A4A, #002D62, #FFFFFF, #A51931, #CE1126);
    background-size: 100% 100%; /* Fondo estático para mejor rendimiento */
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; }
}

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #002D62;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease-out forwards;
}

.splash-screen.hide {
    animation: fadeOut 0.5s ease-out forwards;
    display: none;
}

.splash-screen img {
    height: 80px; /* Reducimos el tamaño para carga más rápida */
}

.navbar {
    background: #1e3c72;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 8px;
    display: flex;
    justify-content: center;
}

.navbar-brand {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand img {
    height: 32px; /* Reducimos el tamaño para carga más rápida */
}

.welcome-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 12px;
    text-align: center;
    margin: 70px 8px 8px;
    position: relative;
    z-index: 10;
    flex: 0 0 auto;
}

.welcome-section h2 {
    font-size: 1.1rem;
    color: #003087;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: normal;
}

.welcome-section h2 .material-icons {
    font-size: 1.3rem;
}

.content {
    flex: 1;
    padding: 0 8px;
    width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    min-height: 70vh;
    position: relative;
    z-index: 1;
}

.app-icon-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    margin: 0 auto;
    gap: 8px;
    flex: 0 0 auto;
    justify-content: center;
}

.app-icon {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100px;
    width: 100%;
}

.app-icon.loaded {
    pointer-events: auto;
}

.app-icon .material-icons {
    font-size: 2rem;
    color: #003087;
    margin-bottom: 4px;
    display: block; /* Aseguramos que los íconos sean visibles */
}

.app-icon span {
    font-size: 0.8rem;
    color: #333;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.1;
}

.app-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.app-icon a {
    color: #333;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 100%;
}

.bottom-nav {
    background: #fff;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 64px;
    padding: 4px 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.bottom-nav-item {
    color: #666;
    font-size: 0.65rem;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 20%;
    transition: color 0.3s ease;
}

.bottom-nav-item .material-icons {
    font-size: 1.5rem;
    margin-bottom: 2px;
    display: block; /* Aseguramos que los íconos sean visibles */
}

.bottom-nav-item span {
    font-size: 0.65rem;
    line-height: 1;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: #CE1126;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 10px;
    background: #CE1126;
    color: #fff;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 0.6rem;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (min-width: 768px) {
    .navbar-brand {
        font-size: 1.6rem;
    }
    .navbar-brand img {
        height: 40px;
    }
    .welcome-section {
        margin: 80px 16px 16px;
    }
    .welcome-section h2 {
        font-size: 1.4rem;
    }
    .welcome-section h2 .material-icons {
        font-size: 1.6rem;
    }
    .app-icon-container {
        grid-template-columns: repeat(3, 1fr);
        max-width: 800px;
        gap: 12px;
    }
    .app-icon {
        height: 120px;
        padding: 12px;
    }
    .app-icon .material-icons {
        font-size: 2.5rem;
    }
    .app-icon span {
        font-size: 1rem;
    }
    .bottom-nav-item .material-icons {
        font-size: 1.8rem;
    }
    .bottom-nav-item span {
        font-size: 0.8rem;
    }
    .notif-badge {
        padding: 3px 8px;
        font-size: 0.7rem;
    }
}