html {
  overflow-y: scroll;
  /* ← Evitar el movimiento del encabezado */
}

/* Reset y estilo base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #333;
  line-height: 1.6;
  background-color: #f9fafc;
  overflow-x: hidden;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 30px 20px;
  background-color: #EAF2FB;
  /* fondo suave como en el banner */
  border-bottom: 2px solid #0077B6;
}

header img {
  height: 132px;
  width: auto;
}

header h1 {
  margin: 0;
  font-size: 52px;
  font-weight: 800;
  line-height: 1.2;
}

header h1 span.orange {
  color: #FF7F32;
}

header h1 span.blue {
  color: #0077B6;
}

/* Menú principal */
nav {
  background-color: #0077B6;
  padding: 12px 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 40px;
}

nav a {
  text-decoration: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 18px;
  color: #fff;
  padding: 6px 10px;
  transition: 0.3s;
  border-radius: 4px;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FF7F32;
}

nav a.active {
  border-bottom: 3px solid #FF7F32;
}

/* Dropdown Menu Styles */
nav .dropdown {
  position: relative;
}

/* Add chevron indicator to dropdown parent */
nav .dropdown>a::after {
  content: "▼";
  font-size: 10px;
  margin-left: 6px;
  transition: transform 0.3s ease;
  display: inline-block;
}

nav .dropdown:hover>a::after {
  transform: rotate(180deg);
}

/* Dropdown menu container */
nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 119, 182, 0.1);
  min-width: 220px;
  padding: 8px 0;
  margin-top: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  border: 1px solid rgba(0, 119, 182, 0.1);
}

/* Show dropdown on hover */
nav .dropdown:hover .dropdown-menu,
nav .dropdown.touch-active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Dropdown menu items */
nav .dropdown-menu li {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Dropdown links */
nav .dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: #0077B6;
  font-size: 16px;
  text-transform: none;
  font-weight: 600;
  border-radius: 6px;
  margin: 4px 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

nav .dropdown-menu {
  flex-direction: column;
  gap: 0px;
}

/* Dropdown link hover effect */
nav .dropdown-menu a:hover {
  background: linear-gradient(135deg, #0077B6 0%, #005a8d 100%);
  color: #fff;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

/* Active state for dropdown items */
nav .dropdown-menu a.active {
  background: linear-gradient(135deg, rgba(255, 127, 50, 0.1) 0%, rgba(255, 127, 50, 0.15) 100%);
  color: #FF7F32;
  border-bottom: none;
  border-left: 3px solid #FF7F32;
}

/* Subtle animation on dropdown item appearance */
nav .dropdown:hover .dropdown-menu li {
  animation: slideInItem 0.3s ease forwards;
}

@keyframes slideInItem {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Add staggered animation delay for multiple items */
nav .dropdown-menu li:nth-child(1) {
  animation-delay: 0.05s;
}

nav .dropdown-menu li:nth-child(2) {
  animation-delay: 0.1s;
}

nav .dropdown-menu li:nth-child(3) {
  animation-delay: 0.15s;
}

nav .dropdown-menu li:nth-child(4) {
  animation-delay: 0.2s;
}

nav .dropdown-menu li:nth-child(5) {
  animation-delay: 0.25s;
}

/* Shortcuts nav */
.shortcuts-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 20px;
  background-color: #EAF2FB;
  border-bottom: 2px solid #0077B6;
}

.shortcuts-label {
  font-weight: 700;
  font-size: 13px;
  color: #0077B6;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
  white-space: nowrap;
}

.shortcuts-nav a {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background-color: #fff;
  border: 1px solid #0077B6;
  color: #0077B6;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}

.shortcuts-nav a:hover {
  background-color: #FF7F32;
  border-color: #FF7F32;
  color: #fff;
}

/* Main */

.page-estrategia main {
  counter-reset: seccion;
}

.page-estrategia main h2 {
  counter-increment: seccion;
}

.page-estrategia main h2::before {
  content: counter(seccion) ". ";
  color: #FF7F32;
}

main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 20px;
}

h2 {
  font-size: 38px;
  color: #0077B6;
  margin-bottom: 24px;
  font-weight: 700;
  border-left: 6px solid #FF7F32;
  padding-left: 12px;
}

p {
  margin-bottom: 20px;
  text-align: justify;
}

p strong {
  color: #0077B6;
}

/* Caja de exención */
.exencion {
  border: 1px solid #cc0000;
  padding: 16px 20px;
  margin: 30px 0 40px 0;
  color: #cc0000;
  font-weight: 600;
  background-color: #fff3f3;
  font-size: 0.8em;
  text-align: center;
  border-radius: 10px;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
  width: 100%;
}

/* Índice de página */
main .indice {
  background: #EAF2FB;
  border-left: 6px solid #0077B6;
  border-radius: 10px;
  padding: 24px 32px;
  margin-bottom: 40px;
  display: block;
  box-shadow: 0 2px 10px rgba(0, 119, 182, 0.08);
}

main .indice h3 {
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0077B6;
  margin-bottom: 14px;
}

main .indice ol {
  padding-left: 20px;
  margin: 0;
}

main .indice ol li {
  margin-bottom: 8px;
  font-size: 1em;
}

main .indice ol li a {
  color: #0077B6;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

main .indice ol li a:hover {
  color: #FF7F32;
  text-decoration: underline;
}


/* YouTube card */
.yt-card {
  margin: 40px 0;
  text-align: center;
}

.yt-card a img {
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.yt-card a img:hover {
  transform: scale(1.02);
}

/* Estilos para los títulos de los fondos */
.fondo-item h4 {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
  font-size: 1.2em;
}

.fondo-item h4::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: #FF7F32;
  font-size: 1.2em;
  font-weight: bold;
}

.fondo-item p {
  padding-left: 30px;
}

/* Lista personalizada */
.puntos-gordos {
  list-style: none;
  margin: 20px 0;
  padding: 0;
}

.puntos-gordos li {
  position: relative;
  padding-left: 34px;
  margin-bottom: 18px;
  text-align: justify;
  font-size: 1.05em;
}

.puntos-gordos li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: #FF7F32;
  font-size: 1.2em;
  font-weight: bold;
}

/* Footer */
footer {
  margin-top: 60px;
  padding: 20px;
  background: #f0f4f9;
  text-align: center;
  font-size: 14px;
  color: #555;
  border-top: 1px solid #ddd;
}

/* Contenedor del iframe (RADAR) */
.iframe-container {
  position: relative;
  width: 100%;
  margin: 20px auto;
  overflow: hidden;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.iframe-container iframe {
  width: 100%;
  height: 90vh;
  min-height: 400px;
  border: none;
}

/* ── Herramientas: Tool cards grid ── */
.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}

.tool-card {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #fff;
  border-radius: 14px;
  padding: 24px 28px;
  box-shadow: 0 4px 20px rgba(0, 119, 182, 0.10);
  border-left: 5px solid #FF7F32;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 119, 182, 0.18);
}

.tool-card-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.tool-card-body {
  flex: 1;
}

.tool-card-body h3 {
  font-size: 18px;
  font-weight: 700;
  color: #0077B6;
  margin-bottom: 8px;
}

.tool-card-body p {
  font-size: 14px;
  color: #555;
  margin: 0;
  text-align: left;
}

.tool-card-arrow {
  font-size: 24px;
  font-weight: 700;
  color: #FF7F32;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.tool-card:hover .tool-card-arrow {
  transform: translateX(5px);
}

/* ── Responsive móvil ── */
@media (max-width: 600px) {
  header img {
    height: 90px;
  }

  main {
    padding: 0 14px;
    margin: 24px auto;
  }

  .tool-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
    gap: 12px;
  }

  .tool-card-arrow {
    align-self: flex-end;
  }

  .tool-card-icon {
    font-size: 32px;
  }

  nav ul {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0 10px;
  }

  nav a {
    font-size: 14px;
  }
}

/* Fórmula matemática */
.formula-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #EAF2FB;
  border: 1px solid #0077B6;
  border-radius: 10px;
  padding: 12px 20px;
  margin-top: 10px;
  font-family: 'Montserrat', sans-serif;
}

.formula-label {
  font-size: 1rem;
  font-weight: 700;
  color: #0077B6;
  white-space: nowrap;
}

.formula-fraction {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.formula-num {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  border-bottom: 2px solid #0077B6;
  padding-bottom: 3px;
  text-align: center;
}

.formula-den {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  padding-top: 3px;
  text-align: center;
}