/* ═══════════════════════════════════════════════════
   BJInformática – Portal de Soporte
   styles.css
   ═══════════════════════════════════════════════════ */

/* ── VARIABLES ───────────────────────────────────────────── */
:root {
  --green:       #22a84b;
  --green-light: #2dc75a;
  --green-dark:  #157a36;
  --navy:        #0d1b2a;
  --navy-mid:    #162436;
  --navy-light:  #1e3248;
  --slate:       #2c4a6e;
  --accent:      #00d4ff;
  --text:        #e8eef5;
  --text-muted:  #8fa8c0;
  --border:      rgba(34,168,75,.25);
  --card-bg:     rgba(22,36,54,.75);
  --font-head:   'Rajdhani', sans-serif;
  --font-body:   'Source Sans 3', sans-serif;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── BACKGROUND ─────────────────────────────────────────── */

/* Capa 1: imagen de fondo (servidor / sala de datos / soporte TI) */
.bg-layer {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url('assets/img2.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  /* oscurecer bastante para que el contenido sea legible */
  filter: brightness(.35) saturate(.8);
}

/* Capa 2: gradiente de color encima de la foto */
.bg-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(34,168,75,.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 80%, rgba(0,212,255,.10) 0%, transparent 55%),
    linear-gradient(180deg, rgba(13,27,42,.55) 0%, rgba(13,27,42,.80) 100%);
}

/* Capa 3: rejilla tecnológica */
.grid-overlay {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(34,168,75,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34,168,75,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 90% at 50% 50%, black 30%, transparent 100%);
}

/* ── WRAPPER ─────────────────────────────────────────────── */
.wrapper {
  position: relative; z-index: 1;
  max-width: 980px; margin: 0 auto; padding: 0 20px 60px;
}

/* ── NAV BAR ─────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,27,42,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; height: 56px;
}

.topbar-brand {
  font-family: var(--font-head); font-size: 1.05rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.topbar-brand span { color: var(--green-light); }

.topbar-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}

.topbar-status {
  font-size: .78rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 6px;
}

/* ── HEADER ─────────────────────────────────────────────── */
header {
  display: flex; flex-direction: column; align-items: center;
  padding: 48px 0 36px;
  animation: fadeDown .7s ease both;
}

.logo-wrap {
  width: 80px; height: 80px; border-radius: 18px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 32px rgba(34,168,75,.35), 0 4px 20px rgba(0,0,0,.4);
  margin-bottom: 18px;
}
.logo-wrap svg { width: 46px; height: 46px; }

header h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

header p {
  margin-top: 10px;
  font-size: .95rem; color: var(--text-muted);
  text-align: center; max-width: 520px; line-height: 1.6;
}

/* ── DIVIDER ─────────────────────────────────────────────── */
.divider {
  height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--green), var(--accent), transparent);
  margin: 0 0 40px; opacity: .5;
  animation: fadeIn .8s .3s ease both;
}

/* ── TABLE SECTION ───────────────────────────────────────── */
.table-section { animation: fadeUp .7s .2s ease both; }

.table-section h2 {
  font-family: var(--font-head); font-size: 1.1rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--green-light);
  margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.table-section h2::before {
  content: ''; display: block; width: 4px; height: 18px;
  background: var(--green); border-radius: 2px;
}

.table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
}

table { width: 100%; border-collapse: collapse; }

thead tr {
  background: linear-gradient(90deg, rgba(34,168,75,.18), rgba(0,212,255,.08));
  border-bottom: 1px solid var(--border);
}
thead th {
  font-family: var(--font-head); font-size: .85rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted);
  padding: 14px 20px; text-align: left;
}
thead th:last-child { text-align: center; }

tbody tr {
  border-bottom: 1px solid rgba(34,168,75,.1);
  transition: background .2s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(34,168,75,.07); }

tbody td {
  padding: 14px 20px; font-size: .92rem; color: var(--text);
  vertical-align: middle;
}
tbody td:last-child { text-align: center; }

/* ── BADGES ──────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-family: var(--font-head); font-size: .78rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}
.badge-unv   { background: rgba(34,168,75,.18); color: var(--green-light); border: 1px solid rgba(34,168,75,.3); }
.badge-dahua { background: rgba(0,212,255,.12); color: var(--accent);      border: 1px solid rgba(0,212,255,.25); }

/* ── LINKS & ICON BUTTON ─────────────────────────────────── */
.spec-link { color: var(--accent); text-decoration: none; transition: color .2s; }
.spec-link:hover { color: #fff; text-decoration: underline; }

.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(34,168,75,.15); border: 1px solid var(--border);
  color: var(--green-light); cursor: pointer; transition: all .2s;
  text-decoration: none;
}
.btn-icon:hover {
  background: var(--green); color: #fff;
  box-shadow: 0 0 14px rgba(34,168,75,.5);
  transform: translateY(-1px);
}
.btn-icon svg { width: 18px; height: 18px; }

/* ── INFO CARDS ──────────────────────────────────────────── */
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 40px;
  animation: fadeUp .7s .35s ease both;
}

.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 30px 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,.3);
  display: flex; flex-direction: column; gap: 14px;
  position: relative; overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(0,0,0,.4); }
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green), var(--accent));
  opacity: 0; transition: opacity .3s;
}
.card:hover::before { opacity: 1; }

.card-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: rgba(34,168,75,.15); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--green-light);
}
.card-icon svg { width: 24px; height: 24px; }

.card h3 {
  font-family: var(--font-head); font-size: 1.2rem; font-weight: 700;
  letter-spacing: .04em; color: var(--text);
}
.card p { font-size: .88rem; color: var(--text-muted); line-height: 1.65; }

/* ── PRIMARY BUTTON ──────────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: 8px;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #fff; font-family: var(--font-head); font-size: .95rem;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  border: none; cursor: pointer; text-decoration: none;
  box-shadow: 0 4px 18px rgba(34,168,75,.3);
  transition: all .25s; width: fit-content;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--green), var(--green-light));
  box-shadow: 0 6px 24px rgba(34,168,75,.5);
  transform: translateY(-1px);
}
.btn-primary svg { width: 16px; height: 16px; }

/* ── ABOUT ───────────────────────────────────────────────── */
.about {
  margin-top: 40px; text-align: center;
  padding: 36px 30px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: 14px; backdrop-filter: blur(12px);
  animation: fadeUp .7s .5s ease both;
}
.about h3 { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; margin-bottom: 10px; }
.about p   { color: var(--text-muted); font-size: .92rem; line-height: 1.7; max-width: 560px; margin: 0 auto; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.tag {
  padding: 5px 14px; border-radius: 20px;
  font-family: var(--font-head); font-size: .8rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  background: rgba(34,168,75,.12); color: var(--green-light);
  border: 1px solid rgba(34,168,75,.25);
}

/* ── FOOTER ─────────────────────────────────────────────── */
footer {
  margin-top: 56px; padding: 28px 0; text-align: center;
  border-top: 1px solid var(--border);
  animation: fadeIn .6s .6s ease both;
}
footer p { color: var(--text-muted); font-size: .83rem; line-height: 2; }
footer a  { color: var(--green-light); text-decoration: none; transition: color .2s; }
footer a:hover { color: var(--accent); }

/* ── KEYFRAMES ───────────────────────────────────────────── */
@keyframes fadeDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:none; } }
@keyframes fadeUp   { from { opacity:0; transform:translateY(20px);  } to { opacity:1; transform:none; } }
@keyframes fadeIn   { from { opacity:0; }                              to { opacity:1; } }
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1);   }
  50%     { opacity:.5; transform:scale(1.4); }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 700px) {
  header { padding: 32px 0 24px; }
  .logo-wrap { width: 64px; height: 64px; }

  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 520px; }
  thead th, tbody td { padding: 12px 14px; font-size: .84rem; }

  .cards-grid { grid-template-columns: 1fr; }
  .card { padding: 22px 18px; }

  .about { padding: 24px 16px; }
  .btn-primary { font-size: .85rem; padding: 9px 18px; }
}

@media (max-width: 480px) {
  .topbar-status { display: none; }
}

@media (max-width: 400px) {
  header h1 { font-size: 1.6rem; }
  header p  { font-size: .82rem; }
}
