:root {
  --primary-blue: #4a89c7;
  --secondary-blue: #7fc1ff;
  --accent-blue: #3a6b9b;
  --light-blue: #e6f3ff;
  --white: #ffffff;
  --text-dark: #334e68;
  --text-soft: #2c3e50;
  --shadow-light: rgba(0, 0, 0, 0.08);
}

/* ----- HEADER ----- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  padding: 0 10%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  box-shadow: 0 4px 12px var(--shadow-light);
  transition: all 0.3s ease;
}

.header:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.logo {
  font-size: 28px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  color: var(--white);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 1px;
}

.navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.header .navigation ul li {
  float: left;
  position: relative;
}

.header .navigation ul li a {
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  text-decoration: none;
  padding: 22px 20px;
  display: block;
  transition: all 0.3s ease;
}

.header .navigation ul li a:hover {
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.header .navigation ul li ul {
  position: absolute;
  right: 0;
  width: 220px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 16px var(--shadow-light);
  display: none;
  overflow: hidden;
}

.header .navigation ul li ul li a {
  color: var(--text-dark);
  padding: 12px 20px;
  font-size: 14px;
}

.header .navigation ul li ul li a:hover {
  background-color: var(--light-blue);
  color: var(--primary-blue);
}

.header .navigation ul li:hover > ul {
  display: initial;
  animation: fadeIn 0.3s ease-out;
}

#toggle,
.header label {
  display: none;
  cursor: pointer;
}

.menu {
  width: 28px;
  height: 28px;
  filter: brightness(0) invert(1);
}

@media (max-width: 950px) {
  .header label {
    display: initial;
  }

  .header {
    padding: 15px 10%;
  }

  .header .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--primary-blue);
    display: none;
    border-radius: 0 0 12px 12px;
  }

  .header .navigation ul li {
    width: 100%;
  }

  .header .navigation ul li a {
    padding: 12px 20px;
  }

  .header .navigation ul li ul {
    position: relative;
    width: 100%;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
  }

  .header .navigation ul li ul li a {
    padding-left: 30px;
  }

  #toggle:checked ~ .navigation {
    display: block;
    animation: slideDown 0.4s ease-out;
  }
}

/* ----- CUERPO Y FONDO ----- */
body {
  font-family: "Poppins", sans-serif;
  background: linear-gradient(145deg, #d4e6ff, #b8daff, #e6f0ff);
  margin: 0;
  padding: 0;
  padding-top: 80px;
  min-height: 100vh;
  color: var(--text-soft);
  background-size: 400% 400%;
  animation: gradientBG 18s ease infinite;
  display: flex;
  flex-direction: column;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- CONTENEDOR PRINCIPAL ----- */
.container {
  max-width: 900px;
  margin: 0 auto 30px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 10px;
  box-shadow: 0 4px 15px var(--shadow-light);
  flex: 1;
}

h1 {
  color: var(--primary-blue);
  text-align: center;
  margin-bottom: 30px;
  font-size: 2.2rem;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--secondary-blue);
}

/* ----- INFOGRAFÍA ----- */
.infographic-container {
  margin-bottom: 30px;
}

.infographic-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  background-color: var(--light-blue);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px var(--shadow-light);
}

.infographic-img {
  max-width: 100%;
  height: auto;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 3px 10px var(--shadow-light);
  transition: transform 0.3s ease;
}

.infographic-img:hover {
  transform: scale(1.01);
}

.info-note {
  background-color: var(--white);
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
  text-align: center;
  font-style: italic;
  border-left: 4px solid var(--primary-blue);
  color: var(--text-dark);
  box-shadow: 0 2px 8px var(--shadow-light);
}

/* ----- FOOTER REDUCIDO ----- */
.footer {
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  color: var(--white);
  padding: 10px 0;
  margin-top: auto;
  width: 100%;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.credit-section {
  text-align: center;
}

.credit-section h3 {
  font-family: "Montserrat", sans-serif;
  margin: 5px 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}

.credit-section p {
  margin: 3px 0;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  color: var(--white);
  opacity: 0.95;
}

.professor-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--white);
  background-color: rgba(255, 255, 255, 0.15);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  margin: 5px 0;
}

.copyright {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 8px;
}

/* ----- RESPONSIVE ----- */
@media (max-width: 768px) {
  .container {
    margin: 20px 15px 20px;
    padding: 15px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .infographic-content {
    padding: 15px;
    min-height: 40vh;
  }

  .footer {
    padding: 8px 0;
  }

  .credit-section h3 {
    font-size: 0.9rem;
  }

  .credit-section p {
    font-size: 0.8rem;
  }

  .professor-name {
    font-size: 0.85rem;
    padding: 3px 8px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
    margin: 15px 10px 15px;
  }

  h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
  }

  .infographic-content {
    min-height: 35vh;
    padding: 10px;
  }

  .info-note {
    padding: 10px;
    margin-top: 15px;
    font-size: 0.9rem;
  }

  .footer {
    padding: 5px 0;
  }

  .credit-section h3 {
    font-size: 0.85rem;
  }

  .credit-section p {
    font-size: 0.75rem;
  }
}
