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

html, body {
  height: 100%;
  font-family: 'Manrope', sans-serif;
  background-color: #fff;
}

/*NAV*/

#main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: top 0.3s;
}

.nav-wrapper {
  background-color: #2D3B40;
  padding: 1rem 2rem;
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  pointer-events: all;
  margin-top: 10px;
}

.nav-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5rem;
}

.logo {
  color: #fff;
  font-size: 1.5rem;
  font-family: "Vidaloka", serif;
  font-style: normal;
  font-weight: 400;
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links a, .nav-links button {
  color: #fff;
  text-decoration: none;
}

.nav-links a:hover, .nav-links button:hover {
  color: #d1dbb9;
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

.login-links {
  padding-left: 30px;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  font-size: 1.8rem;
  color: #fff;
  cursor: pointer;
}

/*NAV RESPONSIVE*/

@media (max-width: 900px) {
    .nav-container {
        gap: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        bottom: -220px;
        left: 55%;
        background-color: #2D3B40;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        border-radius: 10px;
        display: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        width: 150px;
        z-index: 1200;

        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: all 0.5s ease; 
    }

    .nav-links.active {
        display: flex;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .login-links {
      padding-left: 0;
    }
}

@media (max-width: 900px) {
  #user-dropdown {
    position: absolute !important;
    top: 35px !important; /* más pegado al navbar */
    right: -16px !important;
    background-color: #2D3B40 !important;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.25);
    width: 150px !important; /* más ancho para que el texto no salte */
    padding: 0.5rem;
    z-index: 1300 !important;
  }

  #user-dropdown button {
    width: 100%;
    background-color: #2D3B40;
    color: #DCE1D1;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    white-space: nowrap; /* 👈 fuerza el texto en una sola línea */
    transition: color 0.3s ease;
  }

  #user-dropdown button:hover {
    color: #d1dbb9;
    background-color: #2D3B40; /* mantiene fondo */
  }
}



/*MAIN*/

.main {
  flex: 1;
  min-height: 100vh;
}

.banner {
  position: relative;
  background-image: url(./assets/images/10.jpeg);
  background-size: cover;
  background-position: top;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 5%;
  color: #2D3B40;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0.15) 40%, rgba(255,255,255,0.9) 100%);
  z-index: 1;
}

.banner-content {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 500px;
  text-shadow: 1px 1px 4px #f1e8d9;
}

.banner-content h1 {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  font-family: "Vidaloka", serif;
  font-style: normal;
  font-weight: 400; 
}

.banner-content p {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 550;
  line-height: 1.5;
}

/*BANNER RESPONSIVE*/

/* Tablets (pantallas medianas) */
@media (max-width: 992px) {
  .banner {
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    background-position: center;
  }

  .banner-content {
    max-width: 80%;
  }

  .banner-content h1 {
    font-size: 4rem;
  }

  .banner-content p {
    font-size: 1.5rem;
  }
}

/* Móviles (pantallas pequeñas) */
@media (max-width: 600px) {
  .banner {
    height: 80vh;
    justify-content: center;
    align-items: center;
    padding: 0 1rem;
    background-position: center;
  }

  .banner::before {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0) 0%,      
      rgba(255, 255, 255, 0.15) 25%,  
      rgba(255, 255, 255, 0.9) 100%   
    );
  }

  .banner-content {
    text-align: center;
    max-width: 90%;
  }

  .banner-content h1 {
    font-size: 2.5rem;
  }

  .banner-content p {
    font-size: 1.3rem;
  }
}

/*VIDEOS*/

.videos-recientes {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
}

.videos-recientes h2 {
  font-size: 1.6rem;
  margin-bottom: 20px;
  color: #2D3B40;
}

.ultimo-video {
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 40px;
}

.ultimo-video iframe {
  width: 65%;
  border: none;
}

.ultimo-video .info-card {
  padding: 20px;
  padding-top: 0;
  width: 35%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ultimo-video .titulo-video {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.3;
}

.ultimo-video .desc-video {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 20px;
  line-height: 1.6;
  user-select: text;
  flex-grow: 1;
}

.videos-anteriores {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 30px;
}

.video-anterior {
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.video-anterior iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
}

.video-anterior .info-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding-top: 15px;
  padding-bottom: 15px;
}

.video-anterior .titulo-video {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 20px;
}

.info-link {
  text-decoration: none;
  display: block;
  color: inherit;
  user-select: none;
}

.info-link:hover {
  cursor: default;
}

.tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  padding: 5px 12px;
  border-radius: 999px;
  border: solid .5px #e5e5e5;
  font-size: 0.75rem;
  font-weight: bold;
  color: #222;
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tag:hover {
  background-color: #B5174C;
  color: #fff;
  cursor: pointer;
  border-color: #B5174C;
}

/*BOTON*/

.boton-mas {
  display: block;
  width: fit-content;
  margin: 50px auto 0;
  padding: 10px 20px;
  background-color: #2D3B40;
  color: #fff;
  text-decoration: none;
  border-radius: 90px;
  font-weight: bold;
  transition: background-color 0.2s ease;
  text-align: center;
}

.boton-mas:hover {
  background-color: #DCE1D1;
  color: #2D3B40;
  box-shadow: 0 3px 9px rgba(0,0,0,0.2);
}

/*VIDEOS RESPONSIVE*/

@media (max-width: 900px) {
    .ultimo-video {
        flex-direction: column;
    }

    .ultimo-video iframe,
    .ultimo-video .info-card {
        width: 100%;
    }

    .ultimo-video iframe {
        aspect-ratio: 16/9;
    }

    .ultimo-video .info-card {
        padding-top: 15px;
        padding-bottom: 15px;
        padding-left: 0;  
        padding-right: 0; 
    }

    .ultimo-video .titulo-video {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .videos-anteriores {
        grid-template-columns: 1fr;
    }
}


/*TEMAS*/

.temas {
  text-align: start;
  padding: 3rem 1rem;
  background: #fff;
  max-width: 1200px;
  margin: 0 auto;
}

.temas h2 {
  text-align: start;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #2D3B40;
  font-weight: 700;
}

.box-topics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
  margin-top: 3rem;
}

.topic {
  background: white;
  color: #2D3B40;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: all 0.25s ease;
  border: 1px solid #2D3B40;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.topic:hover {
  background: #2D3B40;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.12);
}

/*TEMAS RESPONSIVE*/

@media (max-width: 768px) {
    .box-topics {
        grid-template-columns: repeat(2, 1fr); 
    }
}

@media (max-width: 480px) {
    .box-topics {
        grid-template-columns: 1fr; 
    }
}

/*CONTACT ME*/

.contact-wrapper button {
  background-color: #2D3B40;
}

.contact-wrapper button:hover {
  background-color: #DCE1D1;
  color: #2D3B40;
}

/*ABOUT ME*/

.about-wrapper {
  margin-top: 3rem;
}

/*ESSAYS*/

.ensayos {
  margin-top: 4rem;
}

/*TEMAS*/

.temas-wrapper {
  margin-top: 3.5rem;
}

.listas {
  margin-top: 2rem;
}

/*Login*/

.login-container {
  border-radius: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.35);
  position: relative;
  overflow: hidden;
  width: 768px;
  max-width: 100%;
  min-height: 480px;
}

.login-container h1 {
  font-size: 2rem;
  color: #2D3B40;
}

.login-container p {
  font-size: 14px;
  line-height: 20px;
  margin: 15px 0 10px;
}

.login-container span {
  font-size: 15px;
}

.login-container a {
  color: #333;
  font-size: 13px;
  text-decoration: none;
  margin: 15px 0 10px;
}

.login-container button {
  background-color: #2D3B40;
  color: #fff;
  font-size: 12px;
  padding: 10px 45px;
  border: 1px solid transparent;
  border-radius: 90px;
  font-weight: bold;
  text-transform: uppercase;
  margin-top: 10px;
  cursor: pointer;
}

.login-container button:hover {
  background-color: #DCE1D1;
  color: #2D3B40;
  box-shadow: 0 3px 9px rgba(0,0,0,0.2);
  font-weight: bold;
}

.login-container button.hiden {
  border-color: #fff;
}

.login-container button.hiden:hover {
  border-color: #DCE1D1;
}

.login-container form {
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  height: 100%;
}

.login-container input {
  background-color: #eee;
  margin: 8px 0;
  padding: 10px 15px;
  font-size: 13px;
  border-radius: 8px;
  width: 100%;
  outline-color: #B5174C;
}

.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  transition: all 0.6s ease-in-out;
}

.sign-in {
  left: 0;
  width: 50%;
  z-index: 2;
}

.login-container.active .sign-in {
  transform: translateX(100%);
}

.sign-up {
  left: 0;
  width: 50%;
  opacity: 0;
  z-index: 1;
}

.login-container.active .sign-up {
  transform: translateX(100%);
  opacity: 1;
  z-index: 5;
  animation: move 0.6s;
}

.social-icons {
  margin: 30px 0;
}

.social-icons a {
  border: 1px solid #ccc;
  border-radius: 20%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 3px;
  width: 40px;
  height: 40px;
  background-color: #2D3B40;
  color: #fff;
}

.social-icons a:hover {
  background-color: #DCE1D1;
  color: #2D3B40;
}

.toggle-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: all 0.6s ease-in-out;
  border-radius: 150px 0 0 100px;
  z-index: 1000;
}

.login-container.login-container.active .toggle-container {
  transform: translateX(-100%);
  border-radius: 0 150px 100px 0;
}

.toggle {
  background-color: #2D3B40;
  height: 100%;
  background: linear-gradient(to right, #2D3B40, #4A5C61);
  color: #fff;
  position: relative;
  left: -100%;
  width: 200%;
  transform: translateX(0);
  transition: all 0.6 ease-in-out;
}

.login-container.login-container.active .toggle {
  transform: translateX(50%);
}

.toggle-panel {
  position: absolute;
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 30px;
  top: 0;
  transform: translateX(0);
  transition: all 0.6s ease-in-out;
  background-color: #2D3B40;
}

.toggle-left {
  transform: translateX(-200%);
}

.login-container.active .toggle-left {
  transform: translateX(0);
}

.toggle-right {
  right: 0;
  transform: translateX(0);
}

.login-container.active .toggle-right {
  transform: translateX(200%);
}

.toggle h1 {
  color: #fff;
}