:root {
  --azul: #005baa;
  --celeste: #009fd9;
  --azul-oscuro: #003b75;
  --amarillo: #f9c74f;
  --gris-fondo: #f2f4f8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--gris-fondo);
  color: #222;
  line-height: 1.6;
}

.site-header {
  background: linear-gradient(to right, var(--azul), var(--celeste));
  color: white;
  padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 700;
}

.logo img {
  height: 40px;
  width: auto;
}

.navbar {
  display: flex;
  gap: 25px;
}

.navbar a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.navbar a:hover {
  color: var(--amarillo);
}

.dropdown {
  position: relative;
}

.dropdown > a {
  display: block;
}

.submenu {
  display: none;
  position: absolute;
  background-color: var(--azul-oscuro);
  min-width: 200px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 8px;
  padding: 10px 0;
  list-style: none;
  left: 0;
  top: 100%;
}

.dropdown:hover .submenu {
  display: block;
}

.submenu li a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
  transition: background-color 0.3s;
}

.submenu li a:hover {
  background-color: var(--azul);
}

.menu-toggle {
  display: none;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

@media (max-width: 768px) {
  .navbar {
    display: none;
    flex-direction: column;
    background: var(--azul-oscuro);
    position: absolute;
    top: 65px;
    right: 20px;
    border-radius: 8px;
    padding: 15px;
    width: 200px;
    text-align: right;
  }

  .navbar.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .dropdown .submenu {
    position: static;
    background: none;
    box-shadow: none;
    padding: 0 15px;
  }

  .submenu li a {
    padding: 8px 0;
  }
}

.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 30px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  animation: fadeIn 0.5s ease-in-out;
}

.section-title {
  font-size: 28px;
  margin-bottom: 20px;
  color: var(--azul);
}

input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 16px;
}

button {
  background: var(--azul);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 16px;
}

button:hover {
  background: var(--azul-oscuro);
}

.label {
  margin-top: 15px;
  margin-bottom: 5px;
  font-weight: 500;
  color: #555;
}

.strength {
  height: 10px;
  width: 0%;
  background-color: #e74c3c;
  border-radius: 5px;
  transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.result-box {
  margin-top: 20px;
  padding: 15px;
  border-radius: 10px;
  background: #f2f2f2;
  font-weight: bold;
}

.result-ok {
  color: green;
}

.result-bad {
  color: red;
}

footer {
  background: var(--azul-oscuro);
  color: white;
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
