@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

@import 'animate.css';

/* ===== Variables ===== */
:root {
  --font-sans: "Poppins", sans-serif;

  --background: #ffffff;
  --text: #3B3B3B;
  --primary-color: #3F81E5;
  --secondary-color: #6B7280;
  --border: #d1d5db;
  --card-color: #F8F8F8;
  --secondary-text: #424242;

  --font-header-size: clamp(0.8rem, 2vw, 1rem);
  --font-header-weight: 400;

  --font-title-size: clamp(1rem, 3.5vw, 1.9rem);
  --font-title-weight: 500;

  --font-abstract-size: clamp(0.6rem, 1.8vw, 1rem);
  --font-abstract-weight: 400;

  --font-subtitle-size: clamp(.8rem, 3.5vw, 1.5rem);
  --font-subtitle-weight: 500;

  --font-text-size: clamp(1rem, 2.2vw, 1.1rem);
  --font-text-weight: 400;

  --font-button-size: clamp(0.9rem, 2vw, 1.2rem);
  --font-button-weight: 100;

  --font-home-title-size: clamp(1.5rem, 4vw, 2.7rem);
  --font-home-title-weight: 400;
}

/* ===== Transiciones globales para navegación ===== */
* {
  transition: all 0.3s ease-in-out;
}



body {
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* Transiciones para elementos de navegación */
nav a {
  transition: color 0.3s ease-in-out, transform 0.3s ease-in-out;
}

nav a:hover {
  transform: translateY(-2px);
}

/* Transiciones para botones */
.buttons a {
  transition: all 0.3s ease-in-out;
}

.buttons a:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Transiciones para imágenes */
img {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

img:hover {
  transform: scale(1.02);
}

/* ===== Global Section Styles ===== */
.section-title {
  text-align: center;
  padding-top: 2rem;
  margin-bottom: 40px;
}

.section-title h1 {
  color: var(--text);
  font-size: var(--font-title-size);
  font-weight: var(--font-title-weight);
}

.section-abstract {
  color: var(--secondary-text);
  font-size: var(--font-abstract-size);
  font-weight: var(--font-abstract-weight);
}

.section-subtitle h1 {
  color: var(--text);
  font-size: var(--font-subtitle-size);
  font-weight: var(--font-subtitle-weight);
}

.section-description {
  color: var(--secondary-text);
  font-size: var(--font-text-size);
  font-weight: var(--font-text-weight);
}

.dark {
  --background: #181A20;
  --text: #E3E6ED;
  --primary-color: #5A8DEE;
  --secondary-color: #AAB4C0;
  --border: #23272F;
  --card-color: #23272F;
  --secondary-text: #AAB4C0;
}

/* ===== Reset ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;

  font-family: var(--font-sans);
}

body {
  background-color: var(--background);
}

.logo {
  display: flex;
  align-items: center;
  flex-direction: row;
  border-radius: 50%;
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 10px;
  display: none;
}

.logo-text {
  white-space: nowrap;
}




li {
  list-style: none;
  font-size: var(--font-header-size);
  font-weight: var(--font-header-weight);
}

/* ===== Navbar ===== */
header {
  width: 100%;
  max-width: 100vw;
  padding: 0 15%;
  border-bottom: 2px solid var(--border);
  background-color: var(--background);
  color: var(--text);
  position: sticky;
  top: 0;
  z-index: 10;
}

header a {
  font-weight: var(--font-header-weight);
  background: none;
  color: inherit;
  padding: 0;
  border: none;
  text-decoration: none;
  border-radius: 0;
  position: relative;
  transition: color 0.2s;
}

header a::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 3px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}

header a.active::after,
header a:hover::after,
header a:focus::after {
  transform: scaleX(1);
}

header a.active,
header a:hover,
header a:focus {
  color: var(--primary-color);
}

header a.active {
  transform: translateY(-4px);
  transition: color 0.2s, transform 0.2s;
}

nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav ul {
  display: flex;
  gap: 5vw;
}

.menu-icon {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* ===== Main Layout ===== */
main {
  max-width: 100vw;
  display: flex;
  padding: 20px 15%;
  height: calc(100vh - 100px);
}

.buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 1.7rem;
}

.buttons a {
  background-color: var(--primary-color);
  color: var(--background);
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 15px rgba(63, 129, 229, 0.3);
}

.buttons a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.buttons a:hover {
  transform: translateY(-3px) scale(1.05);
  background-color: #2c5aa0;
  box-shadow: 0 8px 25px rgba(63, 129, 229, 0.4);
}

.buttons a:hover::before {
  left: 100%;
}

.buttons .btn2 {
  background-color: var(--background);
  color: var(--text);
  border: 3px solid var(--primary-color);
  font-weight: var(--font-subtitle-weight);
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: 0 4px 15px rgba(63, 129, 229, 0.2);
}

.buttons .btn2::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(63, 129, 229, 0.1), transparent);
  transition: left 0.5s;
}

.buttons .btn2:hover {
  transform: translateY(-3px) scale(1.05);
  background-color: transparent;
  color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(63, 129, 229, 0.2), inset 0 0 0 1px var(--primary-color);
}

.buttons .btn2:hover::before {
  left: 100%;
}

/* Icons */

.icons {
    color: var(--text);
    font-size: 1.6rem;
    transition: color 0.2s, transform 0.2s;
}
.icons:hover {
    color: var(--primary-color); 
    transform: scale(1.2);
    cursor: pointer;
}

.dark-mode-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text);
  transition: color 0.2s;
}

/* Logo */
.logo-text{
    font-size: 1.4rem;
    font-weight: 600;
}
/* Responsive Design */

@media (max-width: 1000px) {
  nav{
    position: relative;
  }

  .logo-img {
    display: block;
  }
  
  .menu-icon {
    display: block;
    flex : 1;
    margin-right: 10px;
  }

  .nav-links{
    z-index: 3;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--background);
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 2px solid var(--border);
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    /* Animación suave */
    display: flex;
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, max-height 0.3s ease;
    will-change: opacity, max-height;
  }

  /* Estado abierto del menú móvil */
  .nav-links.menu-active {
    visibility: visible;
    opacity: 1;
    max-height: 500px; /* suficientemente grande para el contenido */
    pointer-events: auto;
  }

  /* Evitar transiciones internas que causen desfase de íconos/textos */
  .nav-links *,
  .nav-links li,
  .nav-links a,
  .nav-links i {
    transition: none !important;
  }
  .nav-links li{
    min-width: 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }

    header {
    padding: 0 10%;
  }

  .logo{
    flex: 9;
  }

  .nav {
    display: flex;
    gap: 5vw;
  }


  
  .dark-mode-toggle {
    flex: 1;
  }
}

@media (max-width: 768px) {



}

.menu-active {
    display: flex;
}

.disable-icons {
    display: none;
    pointer-events: none;
}
