/* RESPONSIVE */

@media (max-width: 3800px) {
  .home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(6rem, 8vw, 18rem);
    max-width: 1600px;
    margin: 0 auto;
    padding: clamp(3rem, 5vw, 6rem) 3rem;
    flex-wrap: wrap;
  }

  .home-content {
    max-width: 620px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    align-items: center;
    justify-content: center;
    padding: clamp(2.4rem, 4vw, 5rem);
    box-sizing: border-box;
    position: relative;
    z-index: var(--z-normal);
  }

  .home-content h1 {
    font-size: clamp(5.8rem, 7vw, 10rem);
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 700;
    line-height: 1;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    color: var(--blanco);
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }

  .elguapo,
  .texto,
  .mas {
    margin: 0 0 1rem 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    width: 100%;
    max-width: 600px;
    padding: 0 1.6rem;
    font-size: clamp(2rem, 2.6vw, 2.5rem);
    font-weight: 700;
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
  }

  .contenedorcartas {
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: var(--z-normal);
    overflow: hidden;
  }

  .titulo :is(h1, h2) {
    padding: 2rem 0 0 0;
    font-size: clamp(4.6rem, 6vw, 10rem);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    color: var(--blanco);
    text-shadow: 2px 2px 3px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    max-width: 900px;
    width: 100%;
    font-family: "Poppins", sans-serif;
    font-style: normal;
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-transform: uppercase;
  }

  .herramientas {
    margin-top: 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: var(--z-normal);
    overflow: hidden;
  }
}

@media (max-width: 1024px) {
  section {
    padding: 9rem 6% 2rem;
  }

  .header {
    width: calc(100% - 24px);
    padding: 8px 12px;
    top: 12px;
  }

  .logo {
    height: 44px;
  }

  .logo img,
  .logo .logo-mark {
    width: auto;
    height: 44px;
    max-width: 83px;
  }

  .navbar {
    gap: 0.8rem;
  }

  .navbar a {
    font-size: 1.4rem;
    padding: 0.5rem 0.8rem;
  }

  .navbar .solluna,
  .navbar .lang-toggle {
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 1150px) {
  .home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    overflow: hidden;
  }

  .home-content h1 {
    margin-top: 90px;
  }

  .home-content {
    padding: 20px;
    margin: 10px auto;
  }

  .elguapo,
  .texto,
  .mas {
    margin: 0 auto 20px auto;
  }

  .contenedorcartas {
    justify-content: center;
  }

  .titulo :is(h1, h2) {
    padding: 2rem 0 0rem 0;
  }

  .herramientas {
    margin-top: 3rem;
  }
}

@media (max-width: 904px) {
  .education {
    margin-bottom: 5rem;
  }

  .education .education-row {
    gap: 3.6rem;
  }

  .centrado .contacto-contenido {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

@media (max-width: 750px) {
  section {
    padding: 8.8rem 5% 2rem;
  }

  .logo {
    height: 35px;
  }

  .logo img,
  .logo .logo-mark {
    width: auto;
    height: 35px;
    max-width: 66px;
  }

  .header {
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    padding: 0.8rem 1.2rem;
  }

  #menu-icon {
    display: inline-flex;
  }

  .navbar {
    position: absolute;
    overflow: visible;
    top: -1000%;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 72vh;
    padding: 1.2rem 1.6rem;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    box-shadow: var(--nav-shadow);
    backdrop-filter: blur(18px);
    transition: 0.25s ease;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
  }

  .navbar.active {
    transition-delay: 0s;
    left: 0;
    top: 100%;
    border-radius: 24px;
    text-align: center;
    justify-content: center;
    overflow: visible;
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  .navbar a {
    display: block;
    font-size: 1.85rem;
    margin: 0.9rem 0;
    line-height: 1.2;
    white-space: normal;
    text-align: center;
    max-width: 90%;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .navbar .solluna,
  .navbar .lang-toggle {
    display: inline-flex;
    margin: 1.6rem auto;
    width: 38px;
    height: 38px;
  }

  .navbar .navbar-actions {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin: 0.4rem 0 1rem;
  }

  .titulo {
    padding: 0 1rem;
    overflow: visible;
  }

  .titulo :is(h1, h2) {
    font-size: 4.6rem;
    padding: 1.8rem 0 1.2rem;
    letter-spacing: -0.01em;
    text-transform: none;
    overflow-wrap: anywhere;
    hyphens: auto;
    font-family:
      "Archivo",
      system-ui,
      -apple-system,
      "Segoe UI",
      "Apple Color Emoji",
      "Segoe UI Emoji",
      "Noto Color Emoji",
      sans-serif;
  }

  .social {
    margin-top: 18px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
  }

  .social a {
    margin: 0 0.8rem;
  }

  #certificado iframe {
    width: 90%;
    height: auto;
  }

  .education-content .content {
    padding: 1.2rem;
  }

  .education-content .content h3 {
    font-size: 2.2rem;
  }

  .education-content .content p {
    font-size: 1.8rem;
    max-width: 95%;
    line-height: 1.4;
  }

  .education-group-toggle {
    padding-left: 0;
  }

  .contact-card {
    width: 100%;
  }

  .navigation {
    flex-wrap: wrap;
  }
}

@media (max-width: 744px) {
  .herramientas {
    margin-top: 0rem;
    margin-bottom: 4rem;
  }

  .cartas {
    margin-top: 2rem;
  }
}

@media (max-width: 600px) {
  html {
    font-size: 45%;
    overflow-x: hidden;
  }

  section {
    padding: 8.4rem 4.5% 2rem;
  }

  .home {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1%;
    overflow: hidden;
  }

  .home-content h1 {
    margin-top: 60px;
  }

  .home-content {
    padding: 16px;
    gap: 1.4rem;
  }

  .home-content p {
    font-size: 1.85rem;
    line-height: 1.6;
    margin-top: 1.6rem;
  }

  .titulo :is(h1, h2) {
    font-size: 4rem;
    padding: 1.6rem 0 1.2rem;
    letter-spacing: -0.01em;
    text-transform: none;
    overflow-wrap: anywhere;
  }

  .elguapo {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .elguapo .profesion {
    margin-left: 0;
    font-weight: 700;
    font-size: 3.2rem;
    text-align: center;
  }

  .imgyo {
    width: 160px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  .social {
    margin-top: 14px;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .social i {
    font-size: 4rem;
    margin-right: 0;
  }

  .education-toggle-btn {
    width: 100%;
  }

  .botones {
    width: 100%;
    max-width: 34rem;
    height: auto;
    flex-direction: column;
    gap: 1rem;
  }

  .botones .btn {
    width: 100%;
    margin-top: 0;
    height: 5.6rem;
  }

  .education-content .content .anio,
  .education-content .content h3,
  .education-content .content p {
    max-width: 92%;
  }

  .course-item-enter {
    animation-duration: 0.4s;
  }

  .contenidodatos .botondatos,
  .copy-btn {
    min-height: 5.4rem;
  }

  .copy-btn {
    width: 100%;
    margin-left: 0;
    margin-top: 1rem;
  }

  .iconotexto {
    width: 100%;
  }

  .navigation {
    gap: 0.8rem;
    padding: 1rem;
  }

  #titulo-pdf {
    font-size: 2.4rem;
  }
}

@media (max-width: 480px) {
  section {
    padding: 8rem 4% 2rem;
  }

  .education .education-row {
    gap: 3rem;
  }

  .education-content .content {
    padding: 1rem;
    border-radius: 35px;
  }

  .education-content .content h3 {
    font-size: 2rem;
  }

  .education-content .content p {
    font-size: 1.6rem;
    max-width: 100%;
  }

  .navbar a {
    font-size: 1.75rem;
  }

  .home-content h1 {
    font-size: 4.8rem;
    line-height: 1.05;
  }

  .titulo :is(h1, h2) {
    font-size: 3.5rem;
  }

  .popup-content {
    width: min(92vw, 32rem);
  }
}

@media (max-width: 380px) {
  .titulo :is(h1, h2) {
    font-size: 3.2rem;
  }
}

@media (max-width: 360px) {
  html {
    font-size: 33%;
  }

  .navbar {
    padding: 1rem 1.2rem;
  }

  .imgyo {
    width: 120px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }
}
