/* ============================================================
   INTRANET CORPORACIÓN K-9 SOLUCIONES — CSS MODERNO
   Paleta del logo: Marino #1a2a4a | Teal #1abfc8 | Púrpura #7c50c8 | Naranja #e07830
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --primary:      #1a2a4a;   /* Marino oscuro — texto K-9 del logo */
  --primary-dark: #101d35;
  --accent:       #1abfc8;   /* Teal/turquesa — triángulo superior del logo */
  --accent-dark:  #13a0a9;
  --purple:       #7c50c8;   /* Púrpura — barra inferior del logo */
  --purple-dark:  #6640b0;
  --warm:         #e07830;   /* Naranja/dorado — triángulo lateral del logo */
  --bg:           #f0f4f8;
  --white:        #ffffff;
  --text:         #2c2c2c;
  --text-light:   #666666;
  --border:       #dde3ee;
  --shadow:       0 2px 12px rgba(26, 42, 74, 0.12);
  --shadow-hover: 0 6px 24px rgba(26, 42, 74, 0.22);
  --radius:       8px;
  --radius-lg:    12px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
}

/* ============================================================
   HEADER / NAVEGACIÓN
   ============================================================ */
.site-header {
  background: linear-gradient(135deg, #1a2a4a 0%, #1d3058 100%);
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 3px 16px rgba(0, 0, 0, 0.40);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 28px;
  border-bottom: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(26,191,200,0.08) 0%, transparent 60%);
}

.header-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  background: white;
  border-radius: 8px;
  padding: 4px 7px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.header-title {
  color: rgba(255, 255, 255, 0.92);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.4px;
  line-height: 1.3;
}

.header-title strong {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}

.header-motto {
  display: block;
  font-size: 0.72rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.60);
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* Lema en página principal */
.motto-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1d3a5e 50%, var(--purple) 100%);
  border-left: 5px solid var(--accent);
  padding: 18px 28px;
  margin: 0 0 24px 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
}
.motto-banner .motto-icon {
  font-size: 2rem;
  flex-shrink: 0;
}
.motto-banner .motto-text {
  color: white;
  font-size: 1.05rem;
  font-style: italic;
  font-weight: 300;
  letter-spacing: 0.5px;
  line-height: 1.4;
}
.motto-banner .motto-text strong {
  display: block;
  font-style: normal;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* NAV */
.nav-bar { background: rgba(0, 0, 0, 0.20); }

.nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0 20px;
}

.nav-list li a {
  display: block;
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
  padding: 9px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  transition: color 0.2s, border-bottom-color 0.2s, background 0.2s;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.nav-list li a:hover,
.nav-list li a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: rgba(26, 191, 200, 0.10);
}

/* ── Protocolo por Tipo de Señal — ítem destacado ── */
.nav-list li.nav-destacado a {
  color: #fff;
  background: linear-gradient(135deg, #c02020, #e04040);
  border-radius: 6px;
  padding: 6px 12px;
  margin: 3px 4px;
  font-weight: 700;
  font-size: 0.75rem;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(192,32,32,0.40);
  letter-spacing: 0.3px;
  animation: nav-pulse 2.5s ease-in-out infinite;
}
.nav-list li.nav-destacado a:hover,
.nav-list li.nav-destacado a.active {
  background: linear-gradient(135deg, #a01010, #c83030);
  color: #fff;
  border-bottom-color: transparent;
  box-shadow: 0 4px 14px rgba(192,32,32,0.55);
}
@keyframes nav-pulse {
  0%,100% { box-shadow: 0 2px 8px rgba(192,32,32,0.40); }
  50%      { box-shadow: 0 2px 16px rgba(192,32,32,0.75); }
}

/* ============================================================
   PAGE BANNER
   ============================================================ */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #1e3a62 40%, var(--purple) 100%);
  color: white;
  padding: 22px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 3px solid var(--accent);
}

.page-banner .banner-icon { font-size: 2rem; opacity: 0.75; }

.page-banner h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.page-banner p {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 2px;
}

/* ============================================================
   MAIN CONTENT WRAPPER
   ============================================================ */
main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 28px 48px;
}

/* ============================================================
   ALERT / AVISO
   ============================================================ */
.alert {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
  border-left: 5px solid;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.alert-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }

.alert-warning {
  background: #fff8f0;
  border-color: var(--accent);
}

.alert-warning .alert-text strong { color: #7a3900; }
.alert-warning .alert-text p      { color: #8a4400; }

.alert-info {
  background: #f0f2ff;
  border-color: var(--primary);
}

.alert-info .alert-text strong { color: var(--primary); }
.alert-info .alert-text p      { color: #333; }

.alert-text strong {
  display: block;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.alert-text p { font-size: 0.88rem; line-height: 1.55; }

/* ============================================================
   SECTION TITLE
   ============================================================ */
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  margin-top: 32px;
}

.section-title:first-of-type { margin-top: 0; }

.section-title h2 {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.section-title::before {
  content: '';
  width: 5px;
  height: 18px;
  background: linear-gradient(to bottom, var(--accent), var(--purple));
  border-radius: 3px;
  flex-shrink: 0;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ============================================================
   CARD GRID — enlaces a documentos
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.card-link {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 13px 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, color 0.18s, background 0.18s;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.35;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-left-color: var(--purple);
  color: var(--primary);
  background: #f6f4ff;
}

.card-link .ci {
  font-size: 1.3rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

/* ============================================================
   DASHBOARD (página principal)
   ============================================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 16px;
}

.dash-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.dash-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.dash-card-header {
  background: var(--primary);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background 0.2s;
}

.dash-card:hover .dash-card-header { background: linear-gradient(135deg, var(--accent) 0%, var(--purple) 100%); }

.dash-card-header .dc-icon { font-size: 1.8rem; }

.dash-card-header h3 {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  line-height: 1.3;
}

.dash-card-body {
  padding: 14px 20px 18px;
  font-size: 0.83rem;
  color: var(--text-light);
  line-height: 1.55;
  flex: 1;
}

/* ============================================================
   INFO CARDS (empresa / contacto)
   ============================================================ */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.info-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--accent);
  transition: box-shadow 0.2s;
}
.info-card:hover { box-shadow: var(--shadow-hover); }

.info-card h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 8px;
  font-weight: 600;
}

.info-card p {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text);
}

.info-card .phone {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  display: block;
  margin-top: 4px;
}

/* ============================================================
   TABLA (fallback)
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

th {
  background: var(--primary);
  color: white;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

tr:hover td { background: #f5f7ff; }
tr:last-child td { border-bottom: none; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.60);
  text-align: center;
  padding: 18px 20px;
  font-size: 0.80rem;
  margin-top: 48px;
}

footer strong { color: var(--accent); }

/* ============================================================
   BADGE DE COLOR — para elementos que usan los colores del logo
   ============================================================ */
.tag-teal    { background: var(--accent);  color: white; border-radius: 4px; padding: 2px 8px; font-size: 0.75rem; font-weight: 600; }
.tag-purple  { background: var(--purple);  color: white; border-radius: 4px; padding: 2px 8px; font-size: 0.75rem; font-weight: 600; }
.tag-warm    { background: var(--warm);    color: white; border-radius: 4px; padding: 2px 8px; font-size: 0.75rem; font-weight: 600; }
.tag-primary { background: var(--primary); color: white; border-radius: 4px; padding: 2px 8px; font-size: 0.75rem; font-weight: 600; }

.alert-info  { background: #edfbfc; border-color: var(--accent); }
.alert-info .alert-text strong { color: var(--primary); }

/* ============================================================
   UTILIDADES
   ============================================================ */
.mb-0 { margin-bottom: 0 !important; }
.mt-4 { margin-top: 16px; }
.text-center { text-align: center; }
