.search-container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 20px;
    }
    
    .search-box {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    }
    
    .search-input-group {
      display: flex;
      gap: 10px;
      align-items: center;
    }
    
    .search-input-container {
      flex: 1;
      position: relative;
    }
    
    .search-input {
      width: 100%;
      padding: 12px 16px;
      border: 2px solid #ddd;
      border-radius: 6px;
      font-size: 16px;
      transition: border-color 0.3s ease;
      box-sizing: border-box;
    }
    
    .search-input:focus {
      outline: none;
      border-color: #cccccc;
    }
    
    .autocomplete-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      border: 1px solid #ddd;
      border-top: none;
      border-radius: 0 0 6px 6px;
      max-height: 200px;
      overflow-y: auto;
      z-index: 1000;
      display: none;
      box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .autocomplete-item {
      padding: 12px 16px;
      cursor: pointer;
      border-bottom: 1px solid #f0f0f0;
      font-size: 14px;
      color: #333;
      transition: background-color 0.2s ease;
    }
    
    .autocomplete-item:hover,
    .autocomplete-item.highlighted {
      background-color: #f8f9fa;
    }
    
    .autocomplete-item:last-child {
      border-bottom: none;
    }
    
    .search-btn {
      padding: 12px 24px;
      background: #EB510D;
      color: white;
      border: none;
      border-radius: 6px;
      font-size: 16px;
      cursor: pointer;
      transition: background-color 0.3s ease;
      white-space: nowrap;
    }
    
    .search-btn:hover {
      background: #0052a3;
    }
    
    .search-results {
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      overflow: hidden;
    }
    
    .results-header {
      background: #f8f9fa;
      padding: 15px 20px;
      border-bottom: 1px solid #e9ecef;
    }
    
    .results-count {
      color: #666;
      font-size: 14px;
      margin: 0;
    }
    
    .result-item {
      padding: 20px;
      border-bottom: 1px solid #e9ecef;
      transition: background-color 0.2s ease;
    }
    
    .result-item:hover {
      background: #f8f9fa;
    }
    
    .result-item:last-child {
      border-bottom: none;
    }
    
    .result-title {
      color: #0066cc;
      text-decoration: none;
      font-size: 18px;
      font-weight: 600;
      margin: 0 0 8px 0;
      display: block;
    }
    
    .result-title:hover {
      text-decoration: underline;
    }
    
    .result-snippet {
      color: #555;
      line-height: 1.6;
      margin: 0 0 8px 0;
    }
    
    .result-url {
      color: #28a745;
      font-size: 14px;
      text-decoration: none;
    }
    
    .no-results {
      text-align: center;
      padding: 60px 20px;
      color: #666;
    }
    
    .no-results-icon {
      font-size: 48px;
      color: #ccc;
      margin-bottom: 20px;
    }
    
    .ai-summary {
      background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
      border: 1px solid #d0e7ff;
      border-radius: 8px;
      padding: 20px;
      margin-bottom: 30px;
      position: relative;
      box-shadow: 0 2px 8px rgba(0,102,204,0.1);
    }
    
    .ai-summary.loading {
      background: #f8f9fa;
      border-color: #e9ecef;
    }
    
    .ai-summary-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 15px;
    }
    
    .ai-summary-icon {
      width: 24px;
      height: 24px;
      background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 12px;
      font-weight: bold;
    }
    
    .ai-summary-title {
      font-size: 16px;
      font-weight: 600;
      color: #0066cc;
      margin: 0;
    }
    
    .ai-summary-body {
      display: flex;
      gap: 20px;
      margin-bottom: 15px;
    }
    
    .ai-summary-content {
      flex: 2;
      color: #333;
      line-height: 1.6;
      margin: 0;
      font-size: 15px;
    }
    
    .ai-summary-references {
      flex: 1;
      background: #f8f9ff;
      border: 1px solid #e6f3ff;
      border-radius: 6px;
      padding: 15px;
      overflow-y: auto;
    }
    
    .ai-summary-references h4 {
      margin: 0 0 10px 0;
      font-size: 14px;
      font-weight: 600;
      color: #0066cc;
    }
    
    .reference-item {
      margin-bottom: 10px;
      padding-bottom: 8px;
      border-bottom: 1px solid #e6f3ff;
      font-size: 12px;
    }
    
    .reference-item:last-child {
      border-bottom: none;
      margin-bottom: 0;
    }
    
    .reference-number {
    display: inline-block;
    background: #0066cc;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 11px;
    font-weight: bold;
    margin: 5px;
    float: left;
}
    
    .reference-title {
      font-weight: 500;
      color: #333;
      margin-bottom: 2px;
      line-height: 1.3;
    }
    
    .reference-url {
      color: #28a745;
      text-decoration: none;
      font-size: 11px;
      word-break: break-all;
    }
    
    .reference-url:hover {
      text-decoration: underline;
    }
    
    .citation-link {
      color: #0066cc;
      text-decoration: none;
      font-weight: 600;
      padding: 1px 3px;
      border-radius: 3px;
      background: rgba(0, 102, 204, 0.1);
      font-size: 12px;
      margin: 0 1px;
    }
    
    .citation-link:hover {
      background: rgba(0, 102, 204, 0.2);
      text-decoration: none;
    }
    
    .ai-summary-loading {
      display: flex;
      align-items: center;
      gap: 10px;
      color: #666;
      font-style: italic;
    }
    
    .loading-spinner {
      width: 16px;
      height: 16px;
      border: 2px solid #e9ecef;
      border-top: 2px solid #0066cc;
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }
    
    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }
    
    .ai-summary-badge {
      position: absolute;
      top: -8px;
      right: 15px;
      background: #0066cc;
      color: white;
      font-size: 11px;
      padding: 4px 8px;
      border-radius: 12px;
      font-weight: 500;
      letter-spacing: 0.5px;
    }
    
    .ai-summary-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      margin-top: 15px;
      padding-top: 12px;
      border-top: 1px solid #e6f3ff;
    }
    
    .action-btn {
      padding: 5px;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 32px;
      height: 32px;
      background: #fff;
      border: 1px solid #d0e7ff;
      border-radius: 6px;
      cursor: pointer;
      transition: all 0.2s ease;
      font-size: 14px;
      color: #666;
      position: relative;
    }
    
    .action-btn:hover {
      background: #f0f8ff;
      border-color: #0066cc;
      color: #0066cc;
      transform: translateY(-1px);
    }
    
    .action-btn.active {
      background: #0066cc;
      border-color: #0066cc;
      color: white;
    }
    
    .action-btn.success {
      background: #28a745;
      border-color: #28a745;
      color: white;
    }
    
    .action-tooltip {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      background: #333;
      color: white;
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 12px;
      white-space: nowrap;
      opacity: 0;
      visibility: hidden;
      transition: all 0.2s ease;
      margin-bottom: 5px;
      pointer-events: none;
    }
    
    .action-tooltip::after {
      content: '';
      position: absolute;
      top: 100%;
      left: 50%;
      transform: translateX(-50%);
      border: 4px solid transparent;
      border-top-color: #333;
    }
    
    .action-btn:hover .action-tooltip {
      opacity: 1;
      visibility: visible;
    }
    
    .result-tabs {
      background: #f8f9fa;
      border-bottom: 1px solid #e9ecef;
      padding: 0;
      margin: 0;
    }
    
    .tab-buttons {
      display: flex;
      gap: 0;
      overflow-x: auto;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    
    .tab-buttons::-webkit-scrollbar {
      display: none;
    }
    
    .tab-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px 16px;
      background: transparent;
      border: none;
      color: #666;
      cursor: pointer;
      transition: all 0.2s ease;
      white-space: nowrap;
      min-width: fit-content;
      font-size: 14px;
      font-weight: 500;
      border-bottom: 3px solid transparent;
    }
    
    .tab-btn:hover {
      background: #e9ecef;
      color: #333;
    }
    
    .tab-btn.active {
      background: #fff;
      color: #0066cc;
      border-bottom-color: #0066cc;
      font-weight: 600;
    }
    
    .tab-icon {
      font-size: 16px;
    }
    
    .tab-text {
      font-size: 14px;
    }
    
    .tab-count {
      background: #e9ecef;
      color: #666;
      font-size: 12px;
      padding: 2px 6px;
      border-radius: 10px;
      min-width: 16px;
      text-align: center;
      font-weight: 600;
    }
    
    .tab-btn.active .tab-count {
      background: #0066cc;
      color: white;
    }
    
    .tab-btn:hover .tab-count {
      background: #ddd;
    }
    
    .tab-btn.active:hover .tab-count {
      background: #0052a3;
    }
    
    .pagination {
      display: flex;
      justify-content: center;
      align-items: center;
      gap: 10px;
      margin-top: 30px;
      flex-wrap: wrap;
    }
    
    .page-btn {
      padding: 8px 12px;
      border: 1px solid #ddd;
      background: #fff;
      color: #333;
      text-decoration: none;
      border-radius: 4px;
      transition: all 0.2s ease;
    }
    
    .page-btn:hover {
    color: #FFFFFF;
    background: #ea510d;
    text-decoration: none;
    }
    
    .page-btn.active {
      background: #0066cc;
      color: white;
      border-color: #0066cc;
    }
    
    .page-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    
    /* Mobile Responsive Styles */
    @media (max-width: 768px) {

      .promoted-links {
        margin-bottom: 20px;
      }

      .promoted-links-header {
        padding: 12px 15px;
      }

      .promoted-links-title {
        font-size: 15px;
      }

      .promoted-link-item {
        padding: 15px;
      }

      .promoted-link-title {
        font-size: 16px;
      }

      .promoted-link-description {
        font-size: 14px;
      }

      .promoted-link-content {
        gap: 12px;
      }

      .promoted-link-thumbnail {
        width: 60px;
        height: 60px;
      }
      
      .ai-summary-body {
        flex-direction: column;
        gap: 15px;
      }
      
      .ai-summary-references {
        max-height: 200px;
      }
      .search-container {
        padding: 15px;
      }
      
      .search-box {
        padding: 15px;
        margin-bottom: 20px;
      }
      
      .search-input-group {
        flex-direction: column;
        gap: 15px;
      }
      
      .search-input-container {
        width: 100%;
      }
      
      .search-input {
        width: 100%;
        box-sizing: border-box;
      }
      
      .search-btn {
        width: 100%;
        padding: 14px 24px;
      }
      
      .result-item {
        padding: 15px;
      }
      
      .result-title {
        font-size: 16px;
      }
      
      .results-header {
        padding: 12px 15px;
      }
      
      .pagination {
        gap: 5px;
      }
      
      .page-btn {
        padding: 10px 12px;
        font-size: 14px;
      }
      
      .ai-summary {
        padding: 15px;
        margin-bottom: 20px;
      }
      
      .ai-summary-header {
        margin-bottom: 12px;
      }
      
      .ai-summary-title {
        font-size: 15px;
      }
      
      .ai-summary-content {
        font-size: 14px;
      }
      
      .ai-summary-references {
        padding: 12px;
      }
      
      .reference-item {
        font-size: 11px;
      }
    }
    
    @media (max-width: 480px) {
      .search-container {
        padding: 10px;
      }
      
      .search-box {
        padding: 12px;
        margin-bottom: 15px;
      }
      
      .result-item {
        padding: 12px;
      }
      
      .result-title {
        font-size: 15px;
      }
      
      .result-snippet {
        font-size: 14px;
      }
      
      .page-btn {
        padding: 8px 10px;
        font-size: 13px;
      }
      
      .ai-summary {
        padding: 12px;
        margin-bottom: 15px;
      }
      
      .ai-summary-header {
        margin-bottom: 10px;
      }
      
      .ai-summary-title {
        font-size: 14px;
      }
      
      .ai-summary-content {
        font-size: 13px;
      }
      
      .ai-summary-references {
        padding: 10px;
      }
      
      .reference-item {
        font-size: 10px;
      }
      
      .tab-buttons {
        gap: 5px;
        padding: 0 5px;
      }
      
      .tab-btn {
        padding: 10px 12px;
        min-width: auto;
      }
      
      .tab-text {
        display: none;
      }
      
      .tab-icon {
        font-size: 18px;
      }
      
      .tab-count {
        font-size: 11px;
        padding: 1px 4px;
        min-width: 14px;
      }
    }


    /* ========================================================== */
/* ESTILOS PARA "MOSTRAR MÁS" DEL RESUMEN DE IA */
/* ========================================================== */

/* Contenedor del contenido del resumen de IA */
#aiSummaryContent {
  max-height: 140px; /* Altura máxima inicial (aprox. 4-5 líneas) */
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease-in-out;
}

/* Estado expandido del contenedor del resumen */
#aiSummaryContent.expanded {
  max-height: 2000px; /* Una altura suficientemente grande para mostrar todo el contenido */
}

/* Estilos para el botón "Mostrar más" */
.show-more-btn {
  background-color: transparent;
  border: 1px solid #007bff;
  color: #007bff;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  align-self: flex-start;
  font-weight: bold;
}

.show-more-btn:hover {
  background-color: #f0f8ff;
}


button.search-btn {
    color: #FFFFFF !important;
} 

.pagination {
    float: right;
    padding-left: 0;
    margin: 20px 0;
    border-radius: 4px;
}

div#resultsContainer h3 {
  color: #337ab7;
}

button.show-more-btn { 
    margin-top: 15px;   
    padding: 10px;
    border-radius: 50px;
}


button.show-more-btn:hover {
    background: #f7f7f7;    
    padding: 10px;
    border-radius: 50px;
}


.search-container {
    padding: 5%;
}


/* --- ANIMACIÓN DEL BOTÓN DE BÚSQUEDA --- */

.search-btn-text {
    /* Hacemos que la transición de opacidad y ancho sea suave */
    transition: opacity 0.2s ease-in-out, width 0.4s ease-in-out;
    display: inline-block; /* Necesario para la transición de ancho */
    overflow: hidden; /* Evita que el texto se vea mientras se encoge */
    white-space: nowrap; /* Previene saltos de línea */
    padding-left: 5px; /* Pequeño espacio inicial */
}

/* Cuando la barra de búsqueda está activa... */
.search-box.is-active .search-btn-text {
    /* Ocultamos el texto y colapsamos su ancho */
    opacity: 0;
    width: 0;
    padding-left: 0; /* Quitamos el espacio */
}
   
    /* Promoted Links Styles */
    .promoted-links {
      background: #fff;
      border-radius: 8px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.1);
      overflow: hidden;
      margin-bottom: 30px;
    }

    .promoted-links-header {
      background: #f8f9fa;
      padding: 15px 20px;
      border-bottom: 1px solid #e9ecef;
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .promoted-links-icon {
      width: 24px;
      height: 24px;
      background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: white;
      font-size: 12px;
      font-weight: bold;
    }

    .promoted-links-title {
      font-size: 16px;
      font-weight: 600;
      color: #0066cc;
      margin: 0;
    }

    .promoted-links-container {
      display: flex;
      flex-direction: column;
      gap: 0;
    }

    .promoted-link-item {
      padding: 20px;
      border-bottom: 1px solid #e9ecef;
      transition: background-color 0.2s ease;
      text-decoration: none;
      color: inherit;
      display: block;
    }

    .promoted-link-item:hover {
      background: #f8f9fa;
      text-decoration: none;
      color: inherit;
    }

    .promoted-link-item:last-child {
      border-bottom: none;
    }

    .promoted-link-title {
      color: #0066cc;
      font-size: 18px;
      font-weight: 600;
      margin: 0 0 8px 0;
      text-decoration: none;
    }

    .promoted-link-title:hover {
      text-decoration: underline;
    }

    .promoted-link-description {
      color: #555;
      line-height: 1.6;
      margin: 0;
      font-size: 15px;
    }

    .promoted-link-content {
      display: flex;
      gap: 15px;
      align-items: flex-start;
    }

    .promoted-link-text {
      flex: 1;
    }

    .promoted-link-thumbnail {
      width: 80px;
      height: 80px;
      border-radius: 6px;
      object-fit: cover;
      flex-shrink: 0;
      border: 1px solid #e9ecef;
    }

button.show-more-btn {
    margin: 15px 0 0 0 !important;
}