/* ===== NEWS MODAL V2 - MODERN & SHAREABLE ===== */

/* ===== MOBILE FAB BUTTON ===== */
.news-fab {
    pointer-events: auto !important;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4), 0 8px 24px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fabSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.news-fab:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.5), 0 12px 32px rgba(0, 0, 0, 0.3);
}

.news-fab:active {
    transform: translateY(-2px) scale(1.02);
}

.news-fab svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.news-fab-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff3b30;
    color: white;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.4);
}

@keyframes fabSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Show FAB only on mobile */
@media (max-width: 768px) {
    .news-fab {
        display: flex;
    }
}

/* ===== MODAL BACKDROP ===== */
.news-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 9999 !important;
    padding: 20px !important;
}

.news-modal.active {
    display: flex !important;
    animation: fadeIn 0.3s ease !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ===== MODAL PANEL ===== */
.news-panel {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.8) inset !important;
    border-radius: 20px !important;
    padding: 0 !important;
    max-width: 1100px !important;
    width: 94% !important;
    max-height: 90vh !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile: Fullscreen */
@media (max-width: 768px) {
    .news-modal {
        padding: 0 !important;
    }

    .news-panel {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
    }
}

/* ===== HEADER ===== */
.nm-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    padding: 20px 28px !important;
    border-bottom: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border-radius: 20px 20px 0 0 !important;
    flex-shrink: 0 !important;
}

.nm-header .dw-icon {
    font-size: 28px !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)) !important;
}

.nm-header .nm-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin: 0 !important;
    letter-spacing: -0.3px !important;
    flex: 1 !important;
}

/* Close Button */
.news-panel .close-modal {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 10 !important;
}

.news-panel .close-modal:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: scale(1.08) rotate(90deg) !important;
}

/* ===== LIST VIEW ===== */
.nm-list-container {
    padding: 28px !important;
    max-height: calc(90vh - 80px) !important;
    overflow-y: auto !important;
    background: transparent !important;
    flex: 1 !important;
}

.nm-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
    gap: 20px !important;
}

@media (max-width: 768px) {
    .nm-grid {
        grid-template-columns: 1fr !important;
    }

    .nm-list-container {
        padding: 20px !important;
    }
}

/* News Card */
.nm-card {
    background: white !important;
    border: 1px solid rgba(148, 163, 184, 0.15) !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.nm-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15) !important;
    border-color: rgba(102, 126, 234, 0.3) !important;
}

.nm-card-image {
    width: 100% !important;
    height: 180px !important;
    object-fit: cover !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.nm-card-content {
    padding: 18px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.nm-card-meta {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    margin-bottom: 12px !important;
}

.nm-card-category {
    display: inline-block !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: white !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
}

.nm-card-date {
    font-size: 12px !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

.nm-card-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.4 !important;
    letter-spacing: -0.3px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.nm-card-desc {
    font-size: 14px !important;
    color: #64748b !important;
    line-height: 1.6 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

/* ===== DETAIL VIEW ===== */
#nmDetailView {
    padding: 0 !important;
    background: white !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    overflow: hidden !important;
}

#nmDetailView .nm-header {
    padding: 18px 28px !important;
    flex-shrink: 0 !important;
}

.nm-back-btn {
    background: rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.nm-back-btn:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    transform: translateX(-3px) !important;
}

/* Detail Content Container */
.nm-detail-content {
    flex: 1 !important;
    overflow-y: auto !important;
    padding: 32px !important;
}

/* Featured Image + Share Section Container */
.nm-detail-hero {
    display: flex !important;
    gap: 24px !important;
    margin-bottom: 32px !important;
    align-items: flex-start !important;
}

.nm-detail-image {
    flex: 1 !important;
    width: auto !important;
    height: auto !important;
    max-height: 400px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
}

/* Share Section Next to Image */
.nm-detail-share-section {
    width: 280px !important;
    flex-shrink: 0 !important;
    background: #f8fafc !important;
    border-radius: 12px !important;
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

.nm-share-header {
    text-align: center !important;
}

.nm-share-header h3 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin: 0 0 8px 0 !important;
}

.nm-share-header p {
    font-size: 13px !important;
    color: #64748b !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

/* Main Content Column */
.nm-detail-main {
    flex: 1 !important;
    max-width: 100% !important;
}

.nm-detail-title {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 36px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: #1e293b !important;
    margin: 0 0 24px 0 !important;
    letter-spacing: -0.8px !important;
}

.nm-detail-meta {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
    margin-bottom: 24px !important;
}

.nm-detail-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    font-size: 18px !important;
    line-height: 1.8 !important;
    color: #334155 !important;
}

.nm-detail-body p {
    margin-bottom: 20px !important;
}

/* Sidebar - Remove old styles */
.nm-detail-sidebar {
    display: none !important;
}

@media (max-width: 1024px) {
    .nm-detail-content {
        padding: 24px !important;
    }

    .nm-detail-hero {
        flex-direction: column !important;
    }

    .nm-detail-share-section {
        width: 100% !important;
    }

    .nm-detail-image {
        width: 100% !important;
    }
}

.nm-sidebar-section {
    background: #f8fafc !important;
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

.nm-sidebar-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    margin-bottom: 16px !important;
}

.nm-share-buttons {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}

.nm-share-btn {
    flex: 1 !important;
    min-width: 120px !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.nm-share-btn svg {
    width: 18px !important;
    height: 18px !important;
}

.nm-share-btn.whatsapp {
    background: #25D366 !important;
    color: white !important;
}

.nm-share-btn.whatsapp:hover {
    background: #1fb855 !important;
    transform: translateY(-2px) !important;
}

.nm-share-btn.facebook {
    background: #1877F2 !important;
    color: white !important;
}

.nm-share-btn.facebook:hover {
    background: #0c63d4 !important;
    transform: translateY(-2px) !important;
}

.nm-share-btn.twitter {
    background: #1DA1F2 !important;
    color: white !important;
}

.nm-share-btn.twitter:hover {
    background: #0d8bd9 !important;
    transform: translateY(-2px) !important;
}

.nm-share-btn.copy {
    background: #64748b !important;
    color: white !important;
}

.nm-share-btn.copy:hover {
    background: #475569 !important;
    transform: translateY(-2px) !important;
}

/* Scrollbar */
.nm-list-container::-webkit-scrollbar,
.nm-detail-content::-webkit-scrollbar {
    width: 8px !important;
}

.nm-list-container::-webkit-scrollbar-track,
.nm-detail-content::-webkit-scrollbar-track {
    background: rgba(148, 163, 184, 0.1) !important;
    border-radius: 10px !important;
}

.nm-list-container::-webkit-scrollbar-thumb,
.nm-detail-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    border-radius: 10px !important;
}

.nm-list-container::-webkit-scrollbar-thumb:hover,
.nm-detail-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3, #6a3f8f) !important;
}/* Mobile News Button - Alternativa al FAB */
.mobile-news-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    z-index: 999999;
    transition: transform 0.2s;
}

.mobile-news-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .mobile-news-btn {
        display: flex;
        align-items: center;
        gap: 8px;
    }
}
