* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #e8f0fe;
    min-height: 100vh;
}

.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative; /* Cambiado de sticky a relative */
    z-index: 900;
}

.top-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 0;
    text-align: center;
    font-size: 14px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center; /* Centra la imagen */
    gap: 10px; /* Espacio entre la imagen y cualquier otro contenido si lo deseas */
}

.logo img {
    width: 200px; /* Ajusta el tamaño de la imagen según sea necesario */
    height: auto; /* Mantiene la proporción de la imagen */
}

.search-box {
    flex: 1;
    max-width: 500px;
    margin: 0 40px;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 15px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #3851c1 0%, #3550ca 100%);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-box button:hover {
    transform: translateY(-50%) scale(1.1);
}

.icon-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-size: 18px;
    color: #333;
}

.icon-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

.sticky-menu {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-menu {
    background: white;
    padding: 0;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-menu::-webkit-scrollbar {
    height: 4px;
}

.nav-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.nav-items {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 5px;
    padding: 15px 20px;
}

.nav-items li a {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    border-radius: 12px;
    transition: all 0.3s;
    gap: 10px;
}

.nav-items li a i {
    font-size: 16px;
}

.nav-items li a span {
    font-size: 14px;
    font-weight: 500;
}

.nav-items li a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.main-content {
    padding: 40px 0;
}

.hero-section {
    background: linear-gradient(135deg, #2c2c2c, #1f1f1f);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    height: 350px;
    display: flex;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    z-index: 1;
}

.hero-section img {
    width: 50%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.hero-content {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
}

.hero-content .badge {
    background: linear-gradient(135deg, #7b5cff, #5a3dff);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 15px;
}

.hero-content h1 {
    font-size: 32px;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 16px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 15px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.news-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-card-content {
    padding: 25px;
}

.news-card-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #333;
    line-height: 1.4;
}

.news-card-content p {
    color: #666;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.news-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    opacity: 0.85;
}

.read-more {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 30px;
    color: #1a73e8;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: #1a73e8;
}

@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    .search-box {
        margin: 0;
        max-width: 100%;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 28px;
    }
}

/* CONTENEDOR PRINCIPAL */
.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    position: relative;
}

/* CONTENEDOR DE ESTADÍSTICAS */
.stats {
    display: flex;
    gap: 12px;
    background: linear-gradient(135deg, #0a2647 0%, #0b3c8a 50%, #e30613 100%);
    color: #fff;
    padding: 14px 22px;
    border-radius: 16px;
    font-size: 14px;
    box-shadow: 
        0 8px 24px rgba(11, 60, 138, 0.25),
        0 2px 8px rgba(227, 6, 19, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* EFECTO DE BRILLO ANIMADO */
.stats::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* CADA BLOQUE */
.stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    white-space: nowrap;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ICONOS DE ESTADÍSTICAS */
.stat i {
    color: #ffffff;
    font-size: 18px;
    min-width: 20px;
    text-align: center;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* COLORES ESPECÍFICOS POR ICONO */
.stat:nth-child(1) i {
    color: #4ade80;
    animation: float 3s ease-in-out infinite;
}

.stat:nth-child(2) i {
    color: #ffffff;
    
}

.stat:nth-child(3) i {
    color: #fc9d21;
    animation: bounce-subtle 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

@keyframes rotate-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(3px); }
}

/* TEXTO DE ESTADÍSTICAS */
.stat span {
    font-size: 14px;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

/* BOTONES DE USUARIO */
.icon-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 2px solid rgba(11, 60, 138, 0.1);
    cursor: pointer;
    font-size: 20px;
    color: #0b3c8a;
    padding: 12px 14px;
    border-radius: 50%;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* EFECTO DE ONDA EN BOTONES */
.icon-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(227, 6, 19, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.icon-btn:hover::before {
    width: 100px;
    height: 100px;
}

.icon-btn:hover {
    background: linear-gradient(135deg, #e30613 0%, #c00510 100%);
    color: #ffffff;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 8px 20px rgba(227, 6, 19, 0.3),
        0 4px 8px rgba(227, 6, 19, 0.2);
    border-color: rgba(227, 6, 19, 0.3);
}

.icon-btn:active {
    transform: scale(0.95) rotate(0deg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* EFECTO DE PARTÍCULAS (OPCIONAL) */
.stats::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    opacity: 0.3;
    pointer-events: none;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .user-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .stats {
        flex-direction: column;
        width: 100%;
        padding: 12px 16px;
    }
    
    .stat {
        width: 100%;
        justify-content: center;
    }
    
    .icon-btn {
        padding: 10px 12px;
        font-size: 18px;
    }
}

/* ANIMACIÓN DE ENTRADA */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-actions {
    animation: fadeInUp 0.6s ease-out;
}

.stat {
    animation: fadeInUp 0.6s ease-out backwards;
}

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }

.nav-items li a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-items li a.active i {
    color: white;
}