:root {
  --bg-dark: #080c30;
  --panel-bg: rgba(13, 26, 48, 0.78);
  --panel-strong: rgba(10, 20, 42, 0.92);
  --border-color: rgba(130, 155, 188, 0.24);
  --text-light: #eaf2fb;
  --text-muted: #a8b9d0;
  --accent-main: #37a3ff;
  --accent-soft: rgba(55, 163, 255, 0.12);
  --warning-border: #ffcc00;
  --warning-text: #ffcc00;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Poppins', sans-serif;
  --container-width: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  background-image: url('/img/fondo-estudio-juridico.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text-light);
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: linear-gradient(
    330deg,
    rgba(8, 12, 48, 0.96),
    rgba(15, 25, 60, 0.88),
    rgba(25, 45, 80, 0.88),
    rgba(8, 12, 48, 0.96)
  );
  background-size: 400% 400%;
  animation: gradientBG 25s ease infinite;
  z-index: -1;
}

@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.page-wrapper {
  min-height: 100vh;
}

.container {
  width: min(var(--container-width), calc(100% - 40px));
  margin: 0 auto;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: rgba(7, 15, 34, 0.58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner {
  min-height: 74px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-light);
  flex-shrink: 0;
}

.logo img {
  width: 46px;
  height: 46px;
}

.logo h1 {
  font-family: var(--font-heading);
  font-size: 21px;
  margin: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.25s ease;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.nav-button:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-light);
  border-color: var(--accent-main);
  transform: translateY(-1px);
}

.nav-button.primary {
  background: var(--accent-main);
  color: #fff;
  border-color: var(--accent-main);
  box-shadow: 0 8px 25px rgba(55, 163, 255, 0.20);
}

.nav-button.primary:hover {
  background: #4caaff;
}

.nav-button.icon {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 999px;
}

.nav-button.icon i {
  font-size: 16px;
}

.pulse {
  position: relative;
}

.pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid var(--accent-main);
  opacity: 0;
  animation: pulseRing 1.8s ease-out infinite;
  pointer-events: none;
}

@keyframes pulseRing {
  0% { transform: scale(0.8); opacity: .9; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

.desktop-only {
  display: inline-flex;
}

section.desktop-only,
footer.desktop-only {
  display: block;
}

.mobile-only {
  display: none !important;
}

.hero-section {
  padding: 28px 0 20px;
}

.welcome-panel {
  width: 100%;
  max-width: 100%;
  padding: clamp(24px, 4vw, 40px);
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 14px 44px rgba(0,0,0,0.30);
  position: relative;
  overflow: hidden;
}

.welcome-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(55,163,255,0.12), transparent 40%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #dbeafe;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.welcome-panel h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 5vw, 48px);
  margin: 0 0 14px;
  color: #fff;
  line-height: 1.1;
  text-align: center;
}

.subtitle {
  max-width: 820px;
  margin: 0 auto 24px;
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--text-muted);
  line-height: 1.7;
  text-align: center;
}

.hero-cta-row,
.welcome-actions,
.cta-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-cta-row {
  margin-bottom: 18px;
}

.hero-mini-note {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.dual-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.action-card,
.info-panel,
.list-panel,
.cta-panel,
.tool-card,
.feature-card,
.highlight-box,
.quick-link-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
}

.action-card {
  padding: 20px;
  text-align: left;
  transition: 0.28s ease;
}

.action-card:hover,
.tool-card:hover,
.feature-card:hover,
.quick-link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(55,163,255,0.35);
  box-shadow: 0 16px 30px rgba(0,0,0,0.20);
}

.action-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-card p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.quick-links-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.quick-link-card {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 18px 16px;
  transition: 0.28s ease;
}

.quick-link-card i {
  font-size: 22px;
  color: var(--accent-main);
  margin-bottom: 12px;
  display: inline-block;
}

.quick-link-card strong {
  display: block;
  color: #fff;
  margin-bottom: 6px;
  font-size: 15px;
}

.quick-link-card span {
  display: block;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.announcement-section {
  padding: 4px 0 18px;
}

.announcement-section .container {
  display: flex;
  justify-content: center;
}

.sticky-announcement {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(55,163,255,0.14), rgba(13,26,48,0.88));
  border: 1px solid rgba(55,163,255,0.35);
  box-shadow: 0 12px 28px rgba(0,0,0,0.20);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sticky-announcement p {
  margin: 0;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
  text-align: center;
}

.sticky-announcement strong {
  color: #fff;
}

.sticky-announcement a {
  color: #8fd0ff;
  text-decoration: none;
  font-weight: 700;
}

.sticky-announcement a:hover {
  text-decoration: underline;
}

.content-section {
  padding: 76px 0;
}

.content-section.alt {
  background: rgba(0, 0, 0, 0.12);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.section-header {
  max-width: 820px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  margin-bottom: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #d9ebff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 40px);
  margin: 0 0 12px;
  color: #fff;
  line-height: 1.15;
}

.section-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1.75;
}

.split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.info-panel,
.list-panel,
.cta-panel {
  padding: 26px;
}

.info-panel h3,
.list-panel h3,
.cta-panel h3 {
  margin: 0 0 12px;
  font-family: var(--font-heading);
  color: #fff;
  font-size: 24px;
}

.info-panel p,
.list-panel p,
.cta-panel p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 15px;
}

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.bullet-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 14px;
}

.bullet-list i {
  color: var(--accent-main);
  margin-top: 4px;
  flex: 0 0 auto;
}

.highlight-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.highlight-box {
  padding: 22px;
  text-align: left;
}

.highlight-box strong {
  display: block;
  color: #fff;
  margin-bottom: 8px;
  font-size: 16px;
}

.highlight-box span {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 14px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.tool-card {
  padding: 20px;
  transition: 0.28s ease;
}

.tool-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
}

.tool-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
  color: #fff;
  font-family: var(--font-heading);
}

.tool-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.final-cta {
  padding: 88px 0 100px;
}

.final-cta .container {
  display: flex;
  justify-content: center;
}

.cta-panel {
  width: min(100%, 920px);
  margin: 0 auto;
  text-align: center;
  background:
    radial-gradient(circle at top right, rgba(55,163,255,0.14), transparent 34%),
    linear-gradient(135deg, rgba(11,22,46,0.96), rgba(14,28,56,0.88));
}

.cta-panel h3 {
  font-size: clamp(28px, 4vw, 38px);
}

.cta-panel p {
  max-width: 720px;
  margin: 0 auto 24px;
}

.mini-disclaimer {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.footer-simple {
  padding: 28px 0 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.footer-simple .container {
  text-align: center;
}

.footer-simple a {
  color: var(--accent-main);
  text-decoration: none;
}

.footer-simple a:hover {
  text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 1000;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--panel-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  max-width: 560px;
  width: min(560px, calc(100% - 24px));
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: 0 10px 50px rgba(0,0,0,0.4);
  transform: scale(0.95);
  transition: transform .3s ease;
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-header h3 {
  margin: 0;
  font-family: var(--font-heading);
  color: #fff;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body p,
.modal-body li {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 14px;
}

.modal-body a {
  color: var(--accent-main);
  text-decoration: none;
}

.modal-body a:hover {
  text-decoration: underline;
}

.flash-notice {
  position: fixed;
  top: 88px;
  right: 20px;
  max-width: 390px;
  width: calc(100% - 40px);
  background: rgba(13, 26, 48, 0.96);
  border: 1px solid rgba(55, 163, 255, 0.35);
  color: var(--text-light);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1200;
  opacity: 0;
  transform: translateY(-12px) scale(.98);
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.flash-notice.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.flash-notice.hide {
  opacity: 0;
  transform: translateY(-10px) scale(.98);
  pointer-events: none;
}

.flash-notice h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-notice p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.flash-notice p strong {
  color: #fff;
}

.flash-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent-main);
  font-weight: 600;
  text-decoration: none;
}

.flash-link:hover {
  text-decoration: underline;
}

.flash-close {
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s ease;
  will-change: opacity, transform;
}

.reveal-left {
  transform: translateX(-40px);
}

.reveal-right {
  transform: translateX(40px);
}

.reveal-up {
  transform: translateY(28px);
}

.reveal.visible {
  opacity: 1;
  transform: translate(0, 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 1100px) {
  .tool-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .highlight-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .desktop-only {
    display: none !important;
  }

  .main-header {
    position: sticky;
  }

  .header-inner {
    min-height: auto;
    padding: 10px 0;
    flex-direction: column;
    gap: 10px;
  }

  .main-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .main-nav .nav-button {
    width: 100%;
    min-width: 0;
    padding: 10px 8px;
    border-radius: 14px;
    font-size: 13px;
  }

  .hero-section {
    padding: 16px 0 12px;
  }

  .container {
    width: min(var(--container-width), calc(100% - 20px));
  }

  .welcome-panel {
    padding: 20px 16px;
    border-radius: 16px;
  }

  .eyebrow {
    font-size: 11px;
    padding: 7px 10px;
    margin-bottom: 14px;
  }

  .welcome-panel h2 {
    font-size: clamp(22px, 6.5vw, 30px);
    line-height: 1.1;
    margin-bottom: 10px;
  }

  .subtitle {
    font-size: 14px;
    line-height: 1.65;
    margin-bottom: 16px;
  }

  .hero-mini-note {
    font-size: 12.5px;
    line-height: 1.55;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-cta-row .nav-button {
    width: 100%;
  }

  .mobile-hide-block {
    display: none !important;
  }

  .flash-notice {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .logo img {
    width: 40px;
    height: 40px;
  }

  .logo h1 {
    font-size: 18px;
  }

  .main-nav .nav-button {
    min-height: 40px;
    padding: 8px 4px;
    font-size: 12px;
  }

  .welcome-panel h2 {
    font-size: 20px;
  }

  .subtitle {
    font-size: 13px;
  }
}