:root {
  --background-dark: #07141a;
  --background-light: #1c3a40;
  --accent-green: #87f414;
  --accent-green-dark: #0a6207;
  --accent-green-darker: #0b340f;
  --accent-teal: #98a86f;
  --text-light: #ffffff;
  --text-gray: #8e8e8e;
  --transition-speed: 0.3s;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(
    165deg,
    var(--accent-green-darker) 0%,
    var(--background-dark) 30%,
    var(--background-light) 100%
  );
  margin: 0;
  color: var(--text-light);
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* Estilos para el menú de navegación */
.main-nav {
  background-color: var(--background-dark);
  position: relative;
  width: 100%;
  z-index: 100;
  box-shadow: 0 2px 15px rgba(135, 244, 20, 0.2);
  border-bottom: 2px solid var(--accent-green);
}

.main-nav.nav-hidden {
  transform: translateY(-100%);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo-container {
  display: flex;
  align-items: center;
  min-width: 250px;
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: white;
  gap: 10px;
}

.nav-logo {
  height: 45px;
  width: auto;
}

.logo-text {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: #fff;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.nav-links li a {
  color: #fff;
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  font-size: 0.8rem;
  padding: 10px 14px;
  border-radius: 6px;
  transition: all 0.3s ease;
  white-space: nowrap;
  text-align: center;
  border: 1px solid transparent;
}

.nav-links li a:hover {
  background-color: var(--accent-green);
  color: var(--background-dark);
  border: 1px solid var(--accent-green);
  transform: translateY(-2px);
}

/* Ajuste para el contenido principal */
.main-content {
  margin-top: 20px;
  padding: 0 15px;
  width: 100%;
  box-sizing: border-box;
}

/* MENU SECUNDARIO ELIMINADO - SOLO USAMOS .main-nav */

/* TERMINA MENU--------------------------------------------------*/

.content {
  text-align: center;
  max-width: 1400px;
  width: 100%;
  padding: 15px;
  box-sizing: border-box;
  margin: 20px auto 0;
}

.logo {
  text-align: center;
  margin: 20px 0;
  transition: transform var(--transition-speed);
}

.logo:hover {
  transform: scale(1.05);
}

.logo img {
  width: 150px;
  filter: drop-shadow(0 0 10px rgba(242, 99, 99, 0.3));
}

header {
  margin: 20px 0;
}

.neon-title {
  font-family: "Montserrat", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-light);
  text-shadow: 0 0 10px var(--accent-green);
  margin: 20px 0;
  transition: all var(--transition-speed);
}

.neon-title:hover {
  text-shadow: 0 0 20px var(--accent-green);
  transform: scale(1.02);
}

h2 {
  font-family: "Montserrat", sans-serif;
  color: var(--accent-green);
  font-size: 1.5rem;
  margin: 25px 0 15px;
  transition: all var(--transition-speed);
}

h2:hover {
  color: #fff;
}

h3 {
  color: var(--text-gray);
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 25px;
  line-height: 1.5;
}

/* Grid principal para las 4 materias */
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.subject-section {
  background-color: rgba(28, 58, 64, 0.6);
  border: 2px solid var(--accent-teal);
  border-radius: 15px;
  padding: 20px;
  backdrop-filter: blur(5px);
  transition: all var(--transition-speed);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 280px;
}

.subject-section:hover {
  border-color: var(--accent-green);
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(135, 244, 20, 0.2);
}

.subject-section h2 {
  font-size: 1.3rem;
  margin: 0 0 20px 0;
  text-align: center;
  color: var(--accent-green);
  width: 100%;
}

.subject-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 10px;
}

.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 20px;
  padding: 15px;
  max-width: 1400px;
  margin: 0 auto;
  justify-items: center;
  align-items: start;
}

.square {
  background-color: rgba(28, 58, 64, 0.8);
  border: 1px solid var(--accent-teal);
  border-radius: 10px;
  padding: 12px;
  transition: all var(--transition-speed);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 100px;
  height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  backdrop-filter: blur(5px);
}

.square a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.square::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(242, 99, 99, 0.1));
  opacity: 0;
  transition: opacity var(--transition-speed);
}

/* Elimino las reglas de hover de .square para quitar el movimiento y cambios visuales */

.square img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: transform var(--transition-speed);
  margin-bottom: 6px;
}

.square:hover img {
  transform: scale(1.1);
}

.square p {
  margin: 0;
  color: var(--text-gray);
  font-weight: 500;
  transition: color var(--transition-speed);
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.1;
}

.square:hover p {
  color: #fff;
}

.neon-square {
  background-color: var(--background-light);
  border: 2px solid var(--accent-red);
  border-radius: 12px;
  padding: 20px;
  color: var(--text-gray);
  font-size: 1.1rem;
  transition: all var(--transition-speed);
  cursor: pointer;
  margin: 10px 0;
  text-align: center;
  line-height: 1.4;
}

.neon-square:hover {
  background-color: var(--accent-red);
  color: #fff;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(242, 99, 99, 0.2);
}

/*5 logos*/
.container {
  display: grid;
  gap: 30px;
}

/*SECTION*/

.rectangulo {
  width: 100%;
  background-color: #4caf50;
  color: white;
  text-align: center;
  padding: 20px 0;
}

.contenido {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/*FOOTER*/
.footer {
  background-color: rgba(7, 20, 26, 0.9);
  padding: 20px;
  margin: 40px auto;
  border-radius: 12px;
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  backdrop-filter: blur(5px);
  border: 1px solid var(--accent-teal);
}

.image-container2 {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.image-container2 a {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-speed);
}

.image-container2 img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: brightness(0.8);
  transition: filter var(--transition-speed);
}

.image-container2 img:hover {
  filter: brightness(1);
}

/*RESPONSIVE DESIGN*/

@media (min-width: 1400px) {
  .nav-container {
    max-width: 1600px;
    padding: 0 30px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links li a {
    font-size: 0.9rem;
    padding: 10px 15px;
  }
}

@media (max-width: 1024px) {
  .nav-container {
    padding: 0 15px;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-links li a {
    font-size: 0.8rem;
    padding: 6px 10px;
  }

  .subjects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
  }

  .subject-container {
    gap: 12px;
    padding: 8px;
  }

  .subject-section {
    min-height: 250px;
  }

  .square {
    width: 90px;
    height: 90px;
    padding: 10px;
  }

  .square img {
    width: 45px;
    height: 45px;
  }

  .square p {
    font-size: 0.65rem;
  }

  .subject-section h2 {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    padding: 12px 10px;
  }

  .logo-container {
    margin-bottom: 15px;
    min-width: auto;
    justify-content: center;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .nav-links li {
    width: calc(50% - 8px);
    text-align: center;
  }

  .nav-links li a {
    display: block;
    padding: 10px 8px;
    font-size: 0.75rem;
  }

  .content {
    margin-top: 20px;
  }

  .subjects-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 10px;
  }

  .subject-section {
    padding: 15px;
  }

  .subject-container {
    gap: 10px;
    padding: 6px;
  }

  .subject-section {
    min-height: 220px;
  }

  .square {
    width: 80px;
    height: 80px;
    padding: 8px;
  }

  .square img {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
  }

  .square p {
    font-size: 0.6rem;
  }

  .subject-section h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 1.3rem;
    margin: 20px 0 10px;
  }

  h3 {
    font-size: 1rem;
    padding: 0 10px;
    margin: 0 auto 20px;
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 10px 8px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .nav-logo {
    height: 35px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    font-size: 0.8rem;
    padding: 12px 10px;
  }

  .content {
    margin-top: 20px;
    padding: 0 8px;
  }

  .subjects-grid {
    gap: 12px;
    padding: 8px;
  }

  .subject-section {
    padding: 12px;
  }

  .subject-container {
    gap: 8px;
    padding: 4px;
  }

  .subject-section {
    min-height: 200px;
  }

  .square {
    width: 70px;
    height: 70px;
    padding: 6px;
  }

  .square img {
    width: 35px;
    height: 35px;
    margin-bottom: 3px;
  }

  .square p {
    font-size: 0.55rem;
  }

  .subject-section h2 {
    font-size: 1rem;
    margin-bottom: 10px;
  }

  h2 {
    font-size: 1.1rem;
    margin: 18px 0 8px;
  }

  h3 {
    font-size: 0.9rem;
    margin: 0 auto 15px;
  }

  .neon-title {
    font-size: 1.4rem;
  }
}

/* Ajustes adicionales para pantallas muy pequeñas */
@media (max-width: 360px) {
  .subjects-grid {
    gap: 10px;
    padding: 6px;
  }

  .subject-section {
    padding: 10px;
    min-height: 180px;
  }

  .subject-container {
    gap: 6px;
    padding: 3px;
  }

  .square {
    width: 65px;
    height: 65px;
    padding: 5px;
  }

  .square img {
    width: 32px;
    height: 32px;
  }

  .square p {
    font-size: 0.5rem;
  }

  .subject-section h2 {
    font-size: 0.9rem;
    margin-bottom: 8px;
  }

  .nav-links li a {
    font-size: 0.75rem;
  }

  h2 {
    font-size: 1rem;
    margin: 15px 0 6px;
  }

  .neon-title {
    font-size: 1.2rem;
  }
}

/* Agregar estilos para mejorar la accesibilidad */
.square:focus-visible,
.neon-square:focus-visible {
  outline: 2px solid var(--accent-red);
  outline-offset: 2px;
}

/* Estilos para los botones de compiladores */
.compiler-button {
  background-color: var(--background-light);
  border-radius: 10px;
  padding: 15px;
  transition: all var(--transition-speed);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 2px solid var(--accent-red);
}

.compiler-button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(242, 99, 99, 0.1));
  opacity: 0;
  transition: opacity var(--transition-speed);
}

.compiler-button:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(242, 99, 99, 0.2);
  background-color: var(--accent-red);
}

.compiler-button:hover::before {
  opacity: 1;
}

.compiler-button a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.compiler-button img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  transition: transform var(--transition-speed);
  margin-bottom: 10px;
}

.compiler-button:hover img {
  transform: scale(1.1);
}

.compiler-button p {
  margin: 0;
  color: var(--text-gray);
  font-weight: 600;
  transition: color var(--transition-speed);
  text-align: center;
  font-size: 0.9rem;
}

.compiler-button:hover p {
  color: #fff;
}


