/*!
 * ICEID - Optimizaciones Móviles SIMPLES
 * Diseño limpio y funcional
 */

/* =============================================
   HEADER MÓVIL - 50PX FIJO SIN EFECTOS
   ============================================= */
@media screen and (max-width: 768px) {
    html body header.header,
    html body .header,
    html body header,
    html body nav.navbar,
    html body .navbar {
    html body header.header,
    html body .header,
    html body header,
    html body nav.navbar,
    html body .navbar {
        height: 50px !important;
        min-height: 50px !important;
        max-height: 50px !important;
        padding: 0 !important;
        transition: none !important;
        animation: none !important;
        transform: none !important;
        will-change: auto !important;
    }

    /* Deshabilitar clase scrolled */
    html body .header.scrolled,
    html body header.scrolled {
        height: 50px !important;
        padding: 0 !important;
        transition: none !important;
        animation: none !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    }

    html body .header.scrolled .navbar {
        padding: 0 !important;
        transition: none !important;
    }

    html body .header .container,
    html body .navbar .container {
        height: 50px !important;
        padding: 0 0.75rem !important;
    }

    html body .nav-brand {
        gap: 0.4rem !important;
    }

    html body .brand-logo {
        width: 30px !important;
        height: 30px !important;
    }

    html body .brand-text {
        font-size: 1rem !important;
    }

    /* Ocultar botón header */
    html body .nav-actions .btn {
        display: none !important;
    }

    html body .nav-toggle {
        width: 30px !important;
        height: 30px !important;
    }
}

/* =============================================
   HERO - SIN BOTONES, STATS VISIBLES
   ============================================= */
@media screen and (max-width: 768px) {
    html body .hero {
        padding-top: 60px !important;
        padding-bottom: 2rem !important;
    }

    html body .hero-content {
        padding: 1rem 0.75rem !important;
    }

    /* Ocultar botones hero */
    html body .hero-actions,
    html body .cta-buttons {
        display: none !important;
    }

    /* Stats visibles - 3 columnas */
    html body .hero-stats {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        margin-top: 1.5rem !important;
    }

    html body .stat-item {
        padding: 0.75rem 0.35rem !important;
        text-align: center !important;
        background: rgba(0, 217, 255, 0.08) !important;
        border-radius: 8px !important;
        border: 1px solid rgba(0, 217, 255, 0.25) !important;
    }

    html body .stat-number {
        font-size: 1.6rem !important;
        font-weight: 800 !important;
        color: #00d9ff !important;
    }

    html body .stat-label {
        font-size: 0.68rem !important;
        color: #cbd5e1 !important;
    }
}

/* =============================================
   CHATBOT - BOTÓN CERRAR ARRIBA
   ============================================= */
@media screen and (max-width: 768px) {
    /* Ventana completa */
    html body .chat-widget-window {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        bottom: 0 !important;
        right: 0 !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0 !important;
    }

    /* Botón cerrar arriba a la derecha */
    html body .chat-header {
        position: relative !important;
    }

    html body .chat-header .chat-close-btn,
    html body .chat-header button:first-child,
    html body .chat-close-btn {
        position: absolute !important;
        top: 1rem !important;
        right: 1rem !important;
        width: 35px !important;
        height: 35px !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border-radius: 50% !important;
        z-index: 10 !important;
        order: 2 !important;
    }

    /* Botón flotante */
    html body .chat-widget-button {
        width: 55px !important;
        height: 55px !important;
        bottom: 1.5rem !important;
        right: 1.5rem !important;
    }
}

/* =============================================
   SERVICIOS - SLIDER HORIZONTAL ULTRA COMPACTO
   ============================================= */
@media screen and (max-width: 768px) {
    html body .services-section {
        padding: 1.25rem 0 1.5rem 0 !important;
    }

    html body .services-section .section-header {
        text-align: center !important;
        margin-bottom: 0.75rem !important;
        padding: 0 1rem !important;
    }

    html body .section-badge {
        display: none !important;
    }

    html body .section-title {
        font-size: 1.15rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0 !important;
    }

    html body .section-subtitle {
        display: none !important;
    }

    /* Ocultar controles desktop */
    html body .services-controls,
    html body .services-control-btn,
    html body .services-scroll-indicator,
    html body .services-progress,
    html body .services-counter,
    html body .services-hint {
        display: none !important;
    }

    html body .services-carousel-wrapper {
        overflow: visible !important;
        padding: 0.5rem 0 !important;
    }

    /* Slider horizontal */
    html body .services-track {
        display: flex !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scroll-snap-type: x mandatory !important;
        gap: 0.875rem !important;
        padding: 0.5rem 1rem 0.75rem 1rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    html body .services-track::-webkit-scrollbar {
        display: none !important;
    }

    /* Cards ultra compactas */
    html body .service-card {
        min-width: 265px !important;
        max-width: 265px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: center !important;
        background: white !important;
        border: 1px solid #e8eef5 !important;
        border-radius: 10px !important;
        padding: 0.875rem 0.875rem 1rem 0.875rem !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06) !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        height: fit-content !important;
    }

    /* Badge destacado */
    html body .service-badge {
        position: absolute !important;
        top: 0.5rem !important;
        right: 0.5rem !important;
        background: linear-gradient(135deg, #00d9ff 0%, #0a2463 100%) !important;
        color: white !important;
        padding: 0.15rem 0.4rem !important;
        border-radius: 5px !important;
        font-size: 0.575rem !important;
        font-weight: 600 !important;
        text-transform: uppercase !important;
        z-index: 5 !important;
        letter-spacing: 0.3px !important;
    }

    /* Header con icono centrado */
    html body .service-card-header {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        margin-bottom: 0.75rem !important;
    }

    html body .service-icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 1.2rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: linear-gradient(135deg, rgba(10, 36, 99, 0.08) 0%, rgba(0, 217, 255, 0.12) 100%) !important;
        border-radius: 10px !important;
        color: #0a2463 !important;
        margin-bottom: 0.5rem !important;
    }

    html body .service-content {
        flex: 1 !important;
        display: flex !important;
        flex-direction: column !important;
    }

    html body .service-content h3 {
        font-size: 1rem !important;
        margin-bottom: 0.4rem !important;
        font-weight: 600 !important;
        color: #0a2463 !important;
        text-align: center !important;
        line-height: 1.25 !important;
    }

    html body .service-content p {
        font-size: 0.725rem !important;
        line-height: 1.35 !important;
        margin-bottom: 0.65rem !important;
        color: #64748b !important;
        text-align: center !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* Features en 2 columnas compactas */
    html body .service-features {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 0 0.75rem 0 !important;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.35rem !important;
    }

    html body .service-features li {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.35rem !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.3rem !important;
        color: #64748b !important;
        background: rgba(0, 217, 255, 0.04) !important;
        border-radius: 4px !important;
        line-height: 1.3 !important;
    }

    html body .service-features li i {
        color: #00d9ff !important;
        font-size: 0.6rem !important;
        flex-shrink: 0 !important;
    }

    /* Botón ultra compacto */
    html body .service-btn,
    html body .service-card .btn {
        width: 100% !important;
        padding: 0.625rem 0.5rem !important;
        font-size: 0.75rem !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.35rem !important;
        border-radius: 7px !important;
        text-decoration: none !important;
        font-weight: 600 !important;
        background: linear-gradient(135deg, #0a2463 0%, #00d9ff 100%) !important;
        color: white !important;
        border: none !important;
        margin-top: auto !important;
    }

    /* Indicador de scroll más compacto */
    html body .services-carousel-wrapper::after {
        content: 'Desliza →' !important;
        position: absolute !important;
        bottom: 0.35rem !important;
        right: 1rem !important;
        font-size: 0.65rem !important;
        color: #00d9ff !important;
        font-weight: 600 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        padding: 0.25rem 0.55rem !important;
        border-radius: 15px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
        animation: pulseHint 2s ease-in-out infinite !important;
        pointer-events: none !important;
        z-index: 10 !important;
    }

    @keyframes pulseHint {
        0%, 100% { opacity: 0.7; transform: translateX(0); }
        50% { opacity: 1; transform: translateX(4px); }
    }
}

/* =============================================
   NOTICIAS - SLIDER HORIZONTAL OPTIMIZADO
   ============================================= */
@media screen and (max-width: 768px) {
    html body .news-section {
        padding: 1.5rem 0 2rem 0 !important;
    }

    html body .news-section .section-header {
        padding: 0 1rem !important;
        margin-bottom: 1rem !important;
    }

    html body .news-section .section-badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.6rem !important;
    }

    html body .news-section .section-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    html body .news-section .section-subtitle {
        font-size: 0.825rem !important;
        line-height: 1.4 !important;
    }

    /* OCULTAR FILTROS (no funcionales) */
    html body .news-filters {
        display: none !important;
    }

    /* Slider horizontal */
    html body .news-grid {
        display: flex !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory !important;
        gap: 1rem !important;
        padding: 0.75rem 1rem 1rem 1rem !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }

    html body .news-grid::-webkit-scrollbar {
        display: none !important;
    }

    /* Cards angostas y centradas */
    html body .news-card {
        min-width: 280px !important;
        max-width: 280px !important;
        flex-shrink: 0 !important;
        scroll-snap-align: center !important;
        border-radius: 12px !important;
        overflow: hidden !important;
        background: white !important;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08) !important;
        display: flex !important;
        flex-direction: column !important;
    }

    /* Imagen optimizada */
    html body .news-image,
    html body .news-card-image {
        height: 160px !important;
        overflow: hidden !important;
        position: relative !important;
    }

    html body .news-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    html body .news-overlay {
        position: absolute !important;
        top: 0.5rem !important;
        left: 0.5rem !important;
    }

    html body .news-category {
        background: linear-gradient(135deg, #00d9ff 0%, #0a2463 100%) !important;
        color: white !important;
        padding: 0.25rem 0.6rem !important;
        border-radius: 6px !important;
        font-size: 0.65rem !important;
        font-weight: 600 !important;
    }

    /* Contenido del card */
    html body .news-content,
    html body .news-card-content {
        padding: 1rem 1rem 1.25rem 1rem !important;
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important;
    }

    /* Meta información SIN emojis */
    html body .news-meta {
        display: flex !important;
        gap: 0.75rem !important;
        margin-bottom: 0.65rem !important;
        font-size: 0.7rem !important;
        color: #64748b !important;
    }

    html body .news-meta span {
        display: flex !important;
        align-items: center !important;
        gap: 0.3rem !important;
    }

    /* Eliminar iconos/emojis de fecha y autor */
    html body .news-meta span::before {
        display: none !important;
    }

    html body .news-date::before {
        content: '📅' !important;
        display: none !important;
    }

    html body .news-author::before {
        content: '✍️' !important;
        display: none !important;
    }

    /* Título compacto */
    html body .news-title {
        font-size: 0.95rem !important;
        line-height: 1.35 !important;
        margin-bottom: 0.6rem !important;
        font-weight: 600 !important;
        color: #0a2463 !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    html body .news-title a {
        color: inherit !important;
        text-decoration: none !important;
    }

    /* Excerpt limitado */
    html body .news-excerpt,
    html body .news-card-excerpt {
        font-size: 0.8rem !important;
        line-height: 1.45 !important;
        color: #64748b !important;
        margin-bottom: 0.85rem !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 3 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
    }

    /* Acciones del card */
    html body .news-actions {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: auto !important;
        padding-top: 0.5rem !important;
        border-top: 1px solid #e8eef5 !important;
    }

    html body .read-more {
        font-size: 0.8rem !important;
        font-weight: 600 !important;
        color: #00d9ff !important;
        text-decoration: none !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.35rem !important;
    }

    html body .news-share {
        display: flex !important;
    }

    html body .share-btn {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        border: 1px solid #e8eef5 !important;
        background: transparent !important;
        color: #64748b !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 0.8rem !important;
        cursor: pointer !important;
        transition: all 0.2s ease !important;
    }

    html body .share-btn:active {
        background: #f1f5f9 !important;
        transform: scale(0.95) !important;
    }

    /* Botón "Ver Todas" ABAJO y visible */
    html body .news-more {
        padding: 0 1rem !important;
        margin-top: 1.5rem !important;
        text-align: center !important;
    }

    html body .news-more .btn {
        width: 100% !important;
        max-width: 300px !important;
        padding: 0.85rem 1.25rem !important;
        font-size: 0.875rem !important;
        font-weight: 600 !important;
        border-radius: 10px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        background: white !important;
        color: #0a2463 !important;
        border: 2px solid #0a2463 !important;
        text-decoration: none !important;
    }

    html body .news-more .btn i {
        font-size: 0.75rem !important;
    }

    /* Indicador de scroll */
    html body .news-section::after {
        content: 'Desliza para más →' !important;
        position: absolute !important;
        bottom: 5rem !important;
        right: 1.5rem !important;
        font-size: 0.65rem !important;
        color: #00d9ff !important;
        font-weight: 600 !important;
        background: rgba(255, 255, 255, 0.95) !important;
        padding: 0.3rem 0.65rem !important;
        border-radius: 15px !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
        animation: pulseNewsHint 2s ease-in-out infinite !important;
        pointer-events: none !important;
        z-index: 10 !important;
    }

    @keyframes pulseNewsHint {
        0%, 100% { opacity: 0.7; transform: translateX(0); }
        50% { opacity: 1; transform: translateX(5px); }
    }
}

/* =============================================
   OPTIMIZACIONES GENERALES
   ============================================= */
@media screen and (max-width: 768px) {
    html body h1 {
        font-size: 1.75rem !important;
    }

    html body h2 {
        font-size: 1.5rem !important;
    }

    html body section {
        padding: 2rem 0.75rem !important;
    }

    html body .container {
        padding: 0 0.75rem !important;
    }

    html body .btn {
        padding: 0.65rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* =============================================
   FORZAR REMOVER EFECTOS HEADER (EXTRA)
   ============================================= */
@media screen and (max-width: 768px) {
    /* Asegurar que ningún estado cambie el header */
    html body .header,
    html body .header.scrolled,
    html body header,
    html body header.scrolled {
        background: #ffffff !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        border-bottom: 1px solid #e8eef5 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    /* Navbar sin cambios */
    html body .navbar,
    html body .header .navbar,
    html body .header.scrolled .navbar {
        padding: 0 !important;
        height: 50px !important;
        transition: none !important;
    }

    /* Logo sin cambios */
    html body .brand-logo,
    html body .header .brand-logo,
    html body .header.scrolled .brand-logo {
        width: 30px !important;
        height: 30px !important;
        transition: none !important;
    }
}
}