/**
 * ESTILOS DE LA PÁGINA DE NORMATIVIDAD Y MARCO LEGAL
 * Concesión Vías del Nus - Vinus S.A.S.
 *
 * @author  Mateo Jaramillo Suarez
 * @email   teojaramillosuarez@gmail.com
 * @phone   3157456196
 */

/* ==========================================================================
   1. CONTENEDOR PRINCIPAL
   ========================================================================== */
.normas-page-section {
  padding: 50px 0 90px;
  background-color: #fafbfc;
  min-height: 70vh;
}

/* ==========================================================================
   2. BARRA DE BÚSQUEDA Y CONTADOR
   ========================================================================== */
.normas-search-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.normas-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 280px;
  max-width: 600px;
}

.normas-search-input-wrap .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.normas-search-input-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 42px;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: #1f2937;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.normas-search-input-wrap input:focus {
  border-color: #0079c2;
  box-shadow: 0 0 0 3px rgba(0, 121, 194, 0.12);
}

#clearSearchBtn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
  display: none;
  padding: 0;
  line-height: 1;
}

.normas-counter-box {
  font-size: 13.5px;
  color: #64748b;
  font-weight: 600;
}

.normas-counter-box strong {
  color: #0079c2;
}

.normas-no-results {
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

/* ==========================================================================
   3. CUADRÍCULA DE TARJETAS (2 COLUMNAS)
   ========================================================================== */
.normas-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

@media (max-width: 900px) {
  .normas-cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* TARJETA INDIVIDUAL CLICKEABLE COMPLETA */
.norma-card-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  cursor: pointer;
}

.norma-card-item:hover {
  border-color: #0079c2;
  box-shadow: 0 6px 20px rgba(0, 71, 133, 0.08);
  transform: translateY(-2px);
}

/* Columna de Texto */
.norma-card-text {
  flex: 1;
  min-width: 0;
}

.norma-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: #0079c2;
  margin: 0 0 8px 0;
  line-height: 1.4;
  word-break: break-word;
  transition: color 0.2s ease;
}

.norma-card-item:hover .norma-card-title {
  color: #004785;
}

.norma-card-description {
  font-size: 13.5px;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   4. BOTÓN DERECHO: CÍRCULO Y TEXTO
   ========================================================================== */
.norma-download-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 8px;
}

.norma-download-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.norma-download-circle.circle-download {
  background: #e9ecef;
}

.norma-card-item:hover .norma-download-circle.circle-download {
  background: #dcfce7;
  transform: scale(1.08);
}

.norma-download-circle.circle-online {
  background: #f1f5f9;
}

.norma-card-item:hover .norma-download-circle.circle-online {
  background: #e0f2fe;
  transform: scale(1.08);
}

.norma-download-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.norma-download-label.label-download {
  color: #0079c2;
}

.norma-download-label.label-online {
  color: #0079c2;
}

.norma-card-item:hover .norma-download-label {
  color: #004785;
}

/* ==========================================================================
   5. RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 520px) {
  .norma-card-item {
    padding: 18px 16px;
    gap: 14px;
  }
  .norma-card-title {
    font-size: 13.5px;
  }
  .norma-card-description {
    font-size: 12.5px;
  }
  .norma-download-circle {
    width: 38px;
    height: 38px;
  }
  .norma-download-circle svg {
    width: 18px;
    height: 18px;
  }
}
