/* Hanakúa Next - Main Styles - Matching Original Template */

/* Import Bootstrap for base styles */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');

/* Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - matching original template */
:root {
    --primary-color: #0a5fb3; /* Primary blue from template */
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-gray-50: #f9fafb;
    --bg-gray-100: #f3f4f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* Base Reset */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Header Styles */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .navbar-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color) !important;
  text-decoration: none;
}

.header .badge {
  background-color: var(--bg-gray-100);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-md);
}

/* Navigation */
.nav-link {
  color: var(--text-secondary) !important;
  font-weight: 500;
  font-size: 0.85rem;
  padding: 0.65rem 1.1rem !important;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

.nav-link.active {
  color: var(--primary-color) !important;
  border-bottom-color: var(--primary-color);
}

/* Container Styles */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* === RESPONSIVE DESIGN GLOBAL === */

/* Tablets y pantallas medianas (768px - 1199px) */
@media (max-width: 1199px) {
  .main-container {
    max-width: 100%;
    padding: 1.5rem 1rem;
  }
  
  .header .navbar-brand {
    font-size: 1.25rem;
  }
  
  .nav-link {
    padding: 0.5rem 1rem !important;
  }
}

/* Tablets pequeñas y móviles (hasta 767px) */
@media (max-width: 767px) {
  .main-container {
    padding: 1rem 0.75rem;
  }
  
  /* Header móvil */
  .header .container-fluid {
    padding: 0.5rem 1rem;
  }
  
  .header .navbar-brand {
    font-size: 1.1rem;
  }
  
  /* Ocultar elementos no esenciales en móvil */
  .d-none.d-sm-inline {
    display: none !important;
  }
  
  /* Botones más compactos */
  .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
  }
  
  /* Dropdown de usuario más compacto */
  .dropdown-menu {
    min-width: 200px;
    font-size: 0.85rem;
  }
  
  .dropdown-header {
    font-size: 0.8rem;
  }
  
  .dropdown-item {
    padding: 0.5rem 1rem;
  }
  
  /* Búsqueda global oculta en móvil */
  .search-container {
    display: none;
  }
}

/* Móviles pequeños (hasta 575px) */
@media (max-width: 575px) {
  .main-container {
    padding: 0.75rem 0.5rem;
  }
  
  .header .container-fluid {
    padding: 0.5rem 0.75rem;
  }
  
  .header .navbar-brand {
    font-size: 1rem;
  }
  
  /* Usuario dropdown más compacto */
  .dropdown-toggle .d-none.d-md-inline {
    display: none !important;
  }
  
  .btn-sm {
    padding: 0.2rem 0.4rem;
  }
  
  .btn-sm .icon-sm {
    width: 14px;
    height: 14px;
  }
  
  /* Notificaciones más pequeñas */
  #notificationBtn {
    margin-right: 0.5rem;
  }
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: between;
  align-items: center;
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Cards */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.card-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-light);
  padding: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stats-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.stats-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stats-card-content {
  display: flex;
  align-items: center;
  justify-content: between;
}

.stats-card-info h3 {
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

.stats-card-info p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0.5rem 0 0 0;
}

.stats-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Chart Containers */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.chart-container {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.chart-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #3730a3;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: white;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

/* Search and Filters */
.search-section {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.search-container {
  position: relative;
  margin-bottom: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 3rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.1);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 1rem;
  height: 1rem;
}

/* Filter Buttons */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.filter-btn.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Form Controls */
.form-select, .form-control {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.form-select:focus, .form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(79 70 229 / 0.1);
}

/* Mention Cards */
.mention-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mention-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--primary-color);
}

.mention-header {
  display: flex;
  justify-content: between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.mention-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.mention-meta {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-align: right;
}

.mention-content {
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.mention-stats {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.mention-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

/* Media Type Badges */
.badge-tv {
  background-color: #8b5cf6;
  color: white;
}

.badge-radio {
  background-color: #06b6d4;
  color: white;
}

.badge-web {
  background-color: #10b981;
  color: white;
}

.badge-social {
  background-color: #f59e0b;
  color: white;
}

.badge-press {
  background-color: #6366f1;
  color: white;
}

/* Sentiment Badges */
.badge-positive {
  background-color: #10b981;
  color: white;
}

.badge-negative {
  background-color: #ef4444;
  color: white;
}

.badge-neutral {
  background-color: var(--text-secondary);
  color: white;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  margin-top: 2rem;
}

.page-link {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.page-link:hover {
  background-color: var(--bg-gray-50);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.page-item.disabled .page-link {
  color: var(--text-muted);
  background-color: var(--bg-gray-50);
  border-color: var(--border-light);
  cursor: not-allowed;
}

/* Icons */
.icon-sm {
  width: 1rem;
  height: 1rem;
}

.icon-md {
  width: 1.25rem;
  height: 1.25rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Loading States */
.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 2px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Animations */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .main-container {
    padding: 1rem;
  }
  
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .chart-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .filter-buttons {
    flex-direction: column;
  }
  
  .filter-btn {
    width: 100%;
    text-align: center;
  }
  
  .mention-header {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .mention-stats {
    flex-wrap: wrap;
    gap: 1rem;
  }
}

/* Media Type Specific Styles */

/* Social Media Previews */
.social-preview {
  max-width: 500px;
  margin: 0 auto;
}

.twitter-post {
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  background: white;
  padding: 1rem;
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

/* TV/Video Previews */
.video-container {
  position: relative;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
}

.video-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 1rem;
}

.progress-bar {
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  flex: 1;
}

.progress-fill {
  height: 100%;
  background: #ef4444;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Radio Previews */
.radio-container {
  background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  color: white;
}

.audio-waveform {
  display: flex;
  justify-content: center;
  align-items: end;
  height: 40px;
  gap: 2px;
  margin: 1rem 0;
}

.waveform-bar {
  width: 3px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  transition: height 0.3s ease;
}

.waveform-bar.active {
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Press/Newspaper Previews */
.newspaper-preview {
  max-width: 500px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
}

.newspaper-header {
  border-bottom: 3px solid #dc2626;
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.newspaper-content {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 1rem;
}

.newspaper-image {
  background: var(--bg-gray-100);
  border-radius: var(--radius-sm);
}

.newspaper-text h6 {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.placeholder-line {
  background: var(--bg-gray-200);
  border-radius: 2px;
  margin-bottom: 0.25rem;
}

/* Web Article Previews */
.browser-mockup {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
}

.browser-header {
  background: var(--bg-gray-100);
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.browser-dots {
  display: flex;
  gap: 0.25rem;
}

.browser-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.browser-dot.red { background: #ef4444; }
.browser-dot.yellow { background: #f59e0b; }
.browser-dot.green { background: #10b981; }

.url-bar {
  flex: 1;
  background: white;
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Tab Styles */
.nav-tabs {
  border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
}

.nav-tabs .nav-link.active {
  background: none;
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.nav-tabs .nav-link:hover {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

/* Stats Grid for Detail View */
.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.detail-stat {
  text-align: center;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
}

.detail-stat i {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.detail-stat .stat-value {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--text-primary);
}

.detail-stat .stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Responsive Design for Detail View */
@media (max-width: 768px) {
  .detail-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .newspaper-content {
    grid-template-columns: 1fr;
  }
  
  .social-preview {
    max-width: 100%;
  }
  
  .video-container {
    aspect-ratio: 4/3;
  }
}
    
/* Utility Classes */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-info { color: var(--info-color) !important; }

.bg-primary { background-color: var(--bg-primary) !important; }
.bg-secondary { background-color: var(--bg-secondary) !important; }

.border-primary { border-color: var(--primary-color) !important; }
.border-light { border-color: var(--border-light) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }



#globalSearch
{
   padding-left : 40px
}