* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-width: 0;
}

:root {
  /* Paleta Ocean Focus */
  --white: #ffffff;
  --text: #082f49;
  --muted: #0369a1;
  --primary: #0066cc;
  --secondary: #0284c7;
  --accent: #00e5ff;
  --border: rgba(0, 102, 204, 0.28);
  --shadow: 0 15px 35px -8px rgba(0, 102, 204, 0.2);
  --shadow-strong: 0 12px 28px rgba(0, 51, 102, 0.15);
  --glass: rgba(255, 255, 255, 0.85);
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

body {
  font-family: "Poppins", sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  background: 
    radial-gradient(circle at 10% 10%, rgba(0, 229, 255, 0.12), transparent 30%),
    radial-gradient(circle at 90% 90%, rgba(0, 102, 204, 0.15), transparent 35%),
    linear-gradient(135deg, #e0f2fe 0%, #bae6fd 50%, #7dd3fc 100%);
}

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

/* BARRA SUPERIOR (TOPBAR) */
.topbar {
  width: 100%;
  padding: 12px 7%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.logo {
  display: flex;
  align-items: center;
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -1px;
}

img.logo-img, .logo img {
  height: 90px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block !important;
}

.nav {
  display: flex;
  gap: 12px;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #003366;
  background: var(--white);
  padding: 10px 20px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.nav a:hover,
.nav a.active {
  background: #f0f9ff;
  border-color: #0066cc;
  color: #0066cc;
  transform: translateY(-1.5px);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.12);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-btn {
  border: 1.5px solid var(--border);
  background: var(--white);
  padding: 8px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: 0.25s ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  background: #f0f9ff;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  transition: 0.25s ease;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, #003366, #0066cc);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(0, 51, 102, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #002244, #004499);
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 51, 102, 0.38);
}

/* SECCIÓN HERRAMIENTAS */
.tools-page {
  padding: 40px 6% 60px;
}

.tools-hero {
  text-align: center;
  margin-bottom: 35px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #003366;
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 16px;
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.18);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.tools-hero h1 {
  font-size: 2.3rem;
  line-height: 1.15;
  margin-bottom: 12px;
  letter-spacing: -0.8px;
  color: #002244;
  font-weight: 800;
}

.tools-hero p {
  color: #0c4a6e;
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.6;
  font-size: 0.95rem;
  font-weight: 500;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tool-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 255, 0.9));
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(0, 102, 204, 0.18);
}

.tool-icon {
  width: 44px;
  height: 44px;
  background: #003366;
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 1.2rem;
  margin-bottom: 16px;
  box-shadow: 0 5px 12px rgba(0, 51, 102, 0.2);
}

.tool-card h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: #003366;
  font-weight: 700;
}

.tool-card p {
  color: #0369a1;
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 18px;
  font-weight: 500;
}

.tool-link {
  font-size: 0.88rem;
  font-weight: 600;
  color: #0066cc;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: 0.2s ease;
}

.tool-link:hover {
  color: #003366;
  gap: 10px;
}

/* FOOTER COMPACTO */
.footer {
  padding: 40px 6% 30px;
  background: transparent;
}

.footer-content {
  background: linear-gradient(135deg, #001e38, #003366);
  color: var(--white);
  border-radius: 26px;
  padding: 35px;
  display: flex;
  justify-content: space-between;
  gap: 35px;
  flex-wrap: wrap;
  box-shadow: 0 18px 40px rgba(0, 30, 56, 0.3);
  border: 1px solid rgba(0, 229, 255, 0.2);
}

.footer-brand h2 {
  color: var(--accent);
  margin-bottom: 8px;
  font-size: 1.8rem;
  font-weight: 800;
}

.footer-brand p {
  color: #bae6fd;
  font-size: 0.9rem;
  max-width: 320px;
  line-height: 1.5;
}

.footer-links-container {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.footer-column h4 {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--white);
  font-weight: 700;
}

.footer-column a {
  display: block;
  color: #bae6fd;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.25s ease;
}

.footer-column a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

/* RESPONSIVE MÓVIL (HEADER 1 SOLA FILA & TARJETAS LIMPIAS) */
@media (max-width: 768px) {
  .topbar {
    padding: 10px 4%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 10px;
  }

  img.logo-img, .logo img {
    height: 32px !important;
  }

  .nav {
    display: none;
  }

  .lang-btn {
    display: none;
  }

  .btn {
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 10px;
    white-space: nowrap;
  }

  .tools-page {
    padding: 24px 4% 40px;
  }

  .tools-hero h1 {
    font-size: 1.7rem;
  }

  .tools-hero p {
    font-size: 0.9rem;
  }

  .tools-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .tool-card {
    padding: 18px;
    border-radius: 18px;
  }

  .footer-content {
    padding: 24px;
    border-radius: 20px;
    flex-direction: column;
    gap: 24px;
  }
}

@media (max-width: 380px) {
  img.logo-img, .logo img {
    height: 28px !important;
  }
}