:root {
  --bg-dark: #0b1120;
  --bg-slate: #111827;
  --bg-card-dark: #1e293b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #f1f5f9;
  --text-light-muted: #94a3b8;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --hygiene: #0ea5e9;
  --hygiene-hover: #0284c7;
  --hygiene-soft: rgba(14, 165, 233, 0.14);
  --danger: #ef4444;
  --success: #10b981;
  --border-light: #e2e8f0;
  --border-dark: rgba(255, 255, 255, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 45px rgba(2, 6, 23, 0.22);
  --font-display: "Space Grotesk", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 0.6rem;
  line-height: 1.18;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

.text-accent {
  color: var(--accent);
}

.text-hygiene {
  color: #38bdf8;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-hover);
  margin-bottom: 0.5rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.45rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--accent);
  color: #0b1120;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn-dark {
  background: var(--bg-slate);
  color: #ffffff;
}

.btn-dark:hover {
  background: #1e293b;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn-outline-light {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-outline-light:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-ghost-dark {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
}

.btn-link {
  background: none;
  border: none;
  padding: 0;
  font-weight: 700;
  color: var(--bg-slate);
  cursor: pointer;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-link:hover {
  color: var(--accent-hover);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(11, 17, 32, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #ea580c);
  color: #0b1120;
  font-family: var(--font-display);
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 1rem;
}

.brand-text span {
  font-size: 0.74rem;
  color: var(--text-light-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  color: var(--text-light);
  font-size: 0.92rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 120px 0 70px;
  color: #ffffff;
  overflow: hidden;
  background: var(--bg-dark);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    95deg,
    rgba(11, 17, 32, 0.94) 0%,
    rgba(11, 17, 32, 0.8) 52%,
    rgba(11, 17, 32, 0.48) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fde68a;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.25);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.4vw, 3.5rem);
  margin-bottom: 1.1rem;
}

.hero-subtitle {
  font-size: 1.08rem;
  color: #cbd5e1;
  margin-bottom: 2rem;
  max-width: 650px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.8rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.metric-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  padding: 1rem 1.15rem;
  border-radius: var(--radius-md);
}

.metric-card strong {
  display: block;
  font-family: var(--font-display);
  color: var(--accent);
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.metric-card span {
  font-size: 0.82rem;
  color: #cbd5e1;
}

/* Secciones generales */
.section {
  padding: 84px 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3.2rem;
}

.section-header h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.section-header p {
  color: var(--text-muted);
  margin: 0;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.4rem;
  flex-wrap: wrap;
}

.section-header-row h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
}

.section-header-row p {
  color: var(--text-muted);
  margin: 0;
}

/* Servicios Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-img-wrap {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: var(--bg-slate);
}

.service-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.service-card:hover .service-img-wrap img {
  transform: scale(1.04);
}

.service-tag {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: rgba(11, 17, 32, 0.86);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.service-body {
  padding: 1.6rem 1.75rem 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.service-body h3 {
  font-size: 1.4rem;
}

.service-body > p {
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.service-list {
  margin: 0 0 1.4rem;
  padding-left: 1.15rem;
  color: #334155;
  font-size: 0.92rem;
  flex: 1;
}

.service-list li {
  margin-bottom: 0.38rem;
}

/* Metodología */
.methodology-section {
  background: var(--bg-dark);
  color: #ffffff;
}

.methodology-section .eyebrow {
  color: var(--accent);
}

.methodology-section .section-header p {
  color: var(--text-light-muted);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
}

.step-card {
  background: var(--bg-card-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.6rem;
}

.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.8rem;
}

.step-card p {
  color: var(--text-light-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* Herramientas Públicas */
.public-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.4rem;
}

.tool-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.tool-badge {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #b45309;
  margin-bottom: 0.65rem;
}

.tool-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.tool-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border-light);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Contacto */
.contact-section {
  background: #ffffff;
  border-top: 1px solid var(--border-light);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 3rem;
  align-items: start;
}

.contact-info h2 {
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
}

.contact-info > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.contact-highlights {
  display: grid;
  gap: 1rem;
}

.highlight-item {
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  background: var(--bg-light);
  border-left: 4px solid var(--accent);
}

.highlight-item strong {
  display: block;
  margin-bottom: 0.15rem;
}

.highlight-item span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.contact-form {
  background: var(--bg-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.contact-form h3 {
  margin-bottom: 1.25rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 0.94rem;
  background: #ffffff;
  color: var(--text-main);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.checkbox-row {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}

.checkbox-row input {
  width: auto;
}

.form-feedback {
  margin: 0.8rem 0 0;
  font-size: 0.88rem;
  color: var(--success);
  font-weight: 600;
}

.form-error {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  color: var(--danger);
  font-weight: 600;
}

/* Footer */
.footer {
  background: var(--bg-dark);
  color: var(--text-light-muted);
  padding: 2.2rem 0;
  border-top: 1px solid var(--border-dark);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer strong {
  color: #ffffff;
  display: block;
  margin-bottom: 0.25rem;
}

.footer p {
  margin: 0;
  font-size: 0.86rem;
}

/* Modal Login */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: min(440px, 100%);
  box-shadow: var(--shadow-lg);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
}

.modal-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.login-hint {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--bg-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}

.login-hint code {
  background: #e2e8f0;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--text-main);
}

/* Portal Privado */
.portal-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: #0f172a;
  color: #f1f5f9;
  overflow-y: auto;
}

.portal-overlay[hidden] {
  display: none;
}

.portal-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #0b1120;
  border-bottom: 1px solid var(--border-dark);
  padding: 0.95rem 1.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.portal-brand strong {
  display: block;
  font-size: 1rem;
}

.portal-brand span {
  font-size: 0.8rem;
  color: var(--text-light-muted);
}

.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.import-label {
  cursor: pointer;
}

.portal-body {
  width: min(1320px, 95%);
  margin: 1.8rem auto 3rem;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1.8rem;
  align-items: start;
}

.portal-sidebar {
  display: grid;
  gap: 1.4rem;
}

.portal-panel {
  background: #1e293b;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.portal-panel h3 {
  font-size: 1.1rem;
  color: #ffffff;
}

.panel-desc {
  font-size: 0.85rem;
  color: var(--text-light-muted);
  margin: 0 0 1rem;
}

.portal-panel .form-row label {
  color: #cbd5e1;
}

.portal-panel .form-row input,
.portal-panel .form-row select {
  background: #0f172a;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.16);
}

.dropzone {
  margin-top: 0.75rem;
  border: 2px dashed rgba(245, 158, 11, 0.55);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  background: rgba(15, 23, 42, 0.55);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: #e2e8f0;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.dropzone:hover,
.dropzone.dragover {
  background: rgba(245, 158, 11, 0.14);
  border-color: var(--accent);
}

.dropzone svg {
  color: var(--accent);
}

.dropzone strong {
  font-size: 0.94rem;
}

.dropzone span {
  font-size: 0.8rem;
  color: var(--text-light-muted);
}

.storage-note {
  margin: 0.9rem 0 0;
  font-size: 0.78rem;
  color: var(--text-light-muted);
}

.portal-main {
  background: #1e293b;
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-height: 520px;
}

.portal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-dark);
}

.portal-toolbar h2 {
  margin: 0;
  font-size: 1.35rem;
}

.toolbar-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar-filters input,
.toolbar-filters select {
  padding: 0.58rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #0f172a;
  color: #f8fafc;
  font-size: 0.88rem;
}

.portal-tools-list {
  display: grid;
  gap: 0.9rem;
}

.portal-tool-item {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.portal-tool-info h4 {
  margin: 0 0 0.25rem;
  font-size: 1.02rem;
  color: #ffffff;
}

.portal-tool-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-light-muted);
}

.pill {
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.74rem;
}

.pill-cat {
  background: rgba(245, 158, 11, 0.18);
  color: #fde68a;
}

.pill-pub {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

.pill-priv {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.portal-tool-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light-muted);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  background: #0b1120;
  color: #ffffff;
  border: 1px solid var(--accent);
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 500;
}

.toast[hidden] {
  display: none;
}

/* Responsive */
@media (max-width: 980px) {
  .services-grid,
  .contact-grid,
  .portal-body {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: #0b1120;
    flex-direction: column;
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-dark);
  }

  .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-metrics,
  .steps-grid {
    grid-template-columns: 1fr;
  }
}

/* === Rediseño: Seguridad Industrial & Higiene Ocupacional === */
.standards-strip {
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.15rem 0;
}

.standards-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.standards-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #94a3b8;
}

.standards-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.standards-badges span {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Pestañas de disciplina en Servicios */
.pillar-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: -1rem auto 2.5rem;
}

.pillar-tab {
  padding: 0.65rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pillar-tab:hover {
  border-color: var(--bg-dark);
  color: var(--text-main);
}

.pillar-tab.active {
  background: var(--bg-dark);
  color: #ffffff;
  border-color: var(--bg-dark);
  box-shadow: 0 8px 20px rgba(11, 17, 32, 0.16);
}

.service-card.is-hidden {
  display: none;
}

/* Tarjetas de Higiene Ocupacional */
.service-icon-banner {
  position: relative;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.22), transparent 55%),
    linear-gradient(135deg, #0b1120 0%, #0f172a 60%, #16243b 100%);
  border-bottom: 1px solid rgba(14, 165, 233, 0.2);
}

.hygiene-icon-box {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 10px 30px rgba(14, 165, 233, 0.18);
}

.service-tag--hygiene {
  background: rgba(14, 165, 233, 0.18);
  color: #bae6fd;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.service-card--hygiene:hover {
  border-color: rgba(14, 165, 233, 0.45);
}

.service-list--hygiene li::before {
  background: var(--hygiene);
}

.btn-link--hygiene {
  color: var(--hygiene-hover);
}

.btn-link--hygiene:hover {
  color: #0369a1;
}

[hidden] {
  display: none !important;
}

/* === Visor Interactivo de Recursos (HTML / Juegos / Presentaciones / Evaluaciones) === */
.pill-html {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.viewer-modal {
  width: min(1240px, 95vw);
  height: 88vh;
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
}

.viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: var(--bg-slate);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  flex-wrap: wrap;
}

.viewer-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.viewer-title-wrap h3 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.viewer-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.viewer-iframe {
  flex: 1;
  width: 100%;
  border: none;
  background: #ffffff;
}

#resourceViewerModal {
  z-index: 2500;
}

/* === Portal de Usuarios Segmentado === */
.portal-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 4px;
}

.portal-tab {
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.42rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.portal-tab.active {
  background: var(--accent);
  color: #0b1120;
}

.portal-body--user-only {
  grid-template-columns: 1fr !important;
}

.segment-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.segment-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.78rem;
  color: #e2e8f0;
  cursor: pointer;
}

.segment-check-pill input {
  width: auto;
  margin: 0;
}

.segments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.segment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #bae6fd;
  font-size: 0.78rem;
  font-weight: 600;
}

.segment-chip button {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0;
}

.segment-chip button:hover {
  color: #ef4444;
}

.pill-seg {
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.pill-active {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.pill-paused {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

/* === Rediseño Visual: Ingeniería Industrial de Precisión === */
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.pulse-dot {
  animation: pulseRing 2.2s infinite;
}

.hero-overlay {
  background:
    linear-gradient(95deg, rgba(11, 17, 32, 0.96) 0%, rgba(11, 17, 32, 0.84) 52%, rgba(11, 17, 32, 0.52) 100%),
    radial-gradient(circle at 80% 25%, rgba(245, 158, 11, 0.14), transparent 50%);
}

.hero-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 90%);
  pointer-events: none;
}

.metric-card {
  border-top: 2px solid rgba(245, 158, 11, 0.55);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.service-img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 17, 32, 0.65) 0%, transparent 55%);
  pointer-events: none;
}

.service-tag {
  z-index: 2;
}

.service-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
}

.service-list {
  list-style: none;
  padding-left: 0;
}

.service-list li {
  position: relative;
  padding-left: 1.15rem;
  margin-bottom: 0.45rem;
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.methodology-section {
  background:
    radial-gradient(circle at 15% 20%, rgba(245, 158, 11, 0.08), transparent 45%),
    var(--bg-dark);
}

.step-card {
  position: relative;
  border-top: 2px solid rgba(245, 158, 11, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.step-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.tool-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 158, 11, 0.45);
}

/* === Animaciones de Entrada y Scroll + Biblioteca en la Red === */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-badge,
.hero h1,
.hero-subtitle,
.hero-cta,
.hero-metrics {
  animation: heroFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero h1 { animation-delay: 0.08s; }
.hero-subtitle { animation-delay: 0.16s; }
.hero-cta { animation-delay: 0.24s; }
.hero-metrics { animation-delay: 0.32s; }

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.web-resources-block {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border-light);
}

.web-resources-header {
  margin-bottom: 1.5rem;
}

.web-resources-header h3 {
  font-size: 1.45rem;
  margin: 0;
}

.web-resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.web-resource-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.3rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.web-resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(245, 158, 11, 0.5);
}

.web-resource-card h4 {
  font-size: 1.02rem;
  margin: 0;
}

.web-resource-card p {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
  flex: 1;
}

.web-resource-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-hover);
  margin-top: 0.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero h1, .hero-subtitle, .hero-cta, .hero-metrics, .pulse-dot {
    animation: none !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
