body {
    margin: 0;
    padding: 0;
    position: relative;
    font-family: 'Arial', sans-serif;
    background-color: #000000;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Permitir crecimiento */
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior: none;
    box-sizing: border-box;
}

p {
    word-break: break-word;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    height: auto; /* Permitir crecimiento dinámico */
    position: relative;
}

.hero-section {
    height: 100vh;
    width: 100%;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    position: sticky;
    top: 0;
}

.welcome-text {
    position: absolute;
    top: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    color: #fff;
    z-index: 30;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.welcome-text.visible {
    opacity: 1;
}

.hero-logo {
    max-width: 80%;
    height: auto;
    z-index: 20;
    transition: transform 0.5s ease, top 0.5s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-logo.fixed {
    top: 60px;
    transform: translateX(-50%);
    max-width: 50%;
}

.sparkles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.content-box {
    padding: 2rem;
    background: #fff;
    color: #000000;
    width: 200vh; /* Mantener ancho original */
    height: auto; /* Permitir altura dinámica */
    min-height: 50vh;
    box-shadow: 0 0 0 #0000004d, 0 9px 20px #0000004a, 0 37px 37px #00000042, 0 84px 50px #00000026, 0 149px 60px #0000000a, 0 233px 65px #00000003;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: none;
}

.content-box2 {
    padding: 2rem;
    background: #fff;
    color: #000000;
    width: 200vh; /* Mantener ancho original */
    height: 85vh; /* Permitir altura dinámica */
    min-height: 50vh;
    box-shadow: 0 0 0 #0000004d, 0 9px 20px #0000004a, 0 37px 37px #00000042, 0 84px 50px #00000026, 0 149px 60px #0000000a, 0 233px 65px #00000003;
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: none;
}

.section-content {
    margin-left: 50px;
    margin-top: 70px;
    margin-bottom: 50px;

}

.section-title {
    text-align: left;
    margin-left: 200px;
}

.section-introduction {
    padding: auto;
    display: block;
}
.section-introduction h2 {
    text-align: center;
    text-overflow: clip;
    margin-top: -20px;
}

.centered-container h2 {
    display: block;
    margin: 0 40%;
    font-size: 2rem;
    width: 100vh;
    text-align: left;
}

h2.centered-small-text {
    font-size: 1.5rem;
    color: #a81753d6;
}

.centered-container h3 {
    font-size: 1rem;
    width: 100vh;
    text-align: center;
}

.centered-container h2:first-child {
    margin-top: 20px;
}

.centered-container h2:last-child {
    margin-bottom: 50px;
}

#contact h2 {
    margin-bottom: 50px;
}

.centered-container p {
    display: block;
    margin: 60px 40%;
    font-size: 1.5rem;
    width: 100vh;
    text-align: left;
}

span.focus-small-text {
    font-style: italic;
    color: #a81753d6;
}

span.line-small-text {
    font-style: italic;
    text-decoration-line: underline;
}

.centered-container button {
    display: block;
    margin: 0 40%;
    margin-top: 50px;
}

.centered-container-contact h2 {
    display: block;
    margin: 0 auto;
    font-size: 2rem;
    width: 100vh;
    text-align: center;
}

.centered-container-contact h3 {
    font-size: 1rem;
    width: 100vh;
    text-align: center;
}

.centered-container-contact h2:last-child {
    margin-bottom: 50px;
}

.centered-container-contact p {
    display: block;
    margin: 0 auto;
    font-size: 1.5rem;
    width: 100vh;
    text-align: center;
}

.centered-container-contact button {
    display: block;
    margin: 0 40%;
    margin-top: 50px;
}

.thanks-visit {
    margin: 50px auto;
    color: #a81753d6;
}

/* Botón Proyectos */
.cta {
    border: none;
    background: none;
    cursor: pointer;
}

.cta span {
    padding-bottom: 7px;
    letter-spacing: 4px;
    font-size: 14px;
    padding-right: 15px;
    text-transform: uppercase; 
}

.cta svg {
    transform: translateX(-8px);
    transition: all 0.3s ease;
}

.cta:hover svg {
    transform: translateX(0);
}

.cta:active svg {
    transform: scale(0.9);
}

.hover-underline-animation {
    position: relative;
    color: black;
    padding-bottom: 20px;
}

.hover-underline-animation:after {
    content: "";
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #000000;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.cta:hover .hover-underline-animation:after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Modal Proyectos */
#modalOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 200%;
    background: rgba(0, 0, 0, 0.6); /* Oscurece el fondo */
    z-index: 399; /* Debe ser menor que tu modal */
    display: none; /* Solo mostrar cuando el modal esté abierto */
}

#projectsModal {
    position:fixed;
    padding: 40px;
    width: 600px;
    height: 420px;
    top: 19.5vh;
    left:50%;
    transform:translate(-50%,-30%);
    background:#fff;
    border-radius:8px;
    box-shadow:0 4px 32px rgba(0,0,0,.15);
    z-index:400;
    text-align: center;
    overflow: hidden;
}

#projectsModal h2 {
    margin: 0;
    margin-left: 200px;
    margin-bottom: 10px;
    text-align: left;
}

#projectsModal p {
    margin: 0;
    font-size: 15px;
    margin-left: 210px;
    text-align: left;
}

#projectsModal button {
    margin-top: 10px;
    margin-left: 250px;
    position: fixed;
}

/* Memoji modal Proyectos */
.modal-design {
    height: 200px;
    width: 220px;
    border-radius: 40px;
    box-shadow: 3px 11px 5px grey;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255) 30%,
      rgba(200, 200, 200) 100%
    );
    position: fixed;
    margin-top: 590px;
    margin-left: -20px;
    overflow: hidden;
}

#memoji_9 {
    width: 300px;
    margin-top: -15px;
    margin-left: -45px;
}

/* modal card */
.modal-card {
    margin-left: 260px;
    margin-top: 185px;
    height: 130px;
    width: 300px;
    border-radius: 40px;
    box-shadow: 3px 11px 5px grey;
    background: linear-gradient(180deg, rgba(255, 255, 255) 30%, rgba(200, 200, 200) 100%);
}

.modal-small-text {
    font-style: italic;
}

/* Botón close modal */
/* From Uiverse.io by Galahhad */ 
.ui-btn {
  --btn-default-bg: rgb(41, 41, 41);
  --btn-padding: 15px 20px;
  --btn-hover-bg: rgb(51, 51, 51);
  --btn-transition: .3s;
  --btn-letter-spacing: .1rem;
  --btn-animation-duration: 1.2s;
  --btn-shadow-color: rgba(0, 0, 0, 0.137);
  --btn-shadow: 0 2px 10px 0 var(--btn-shadow-color);
  --hover-btn-color: #FAC921;
  --default-btn-color: #fff;
  --font-size: 16px;
  /* 👆 this field should not be empty */
  --font-weight: 600;
  --font-family: Menlo,Roboto Mono,monospace;
  /* 👆 this field should not be empty */
}

/* button settings 👆 */

.ui-btn {
  background-color: transparent;
  box-sizing: border-box;
  padding: var(--btn-padding);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  font: var(--font-weight) var(--font-size) var(--font-family);
  border: none;
  cursor: pointer;
  transition: var(--btn-transition);
  overflow: hidden;
}

.ui-btn span {
  letter-spacing: var(--btn-letter-spacing);
  transition: var(--btn-transition);
  box-sizing: border-box;
  position: relative;
}

.ui-btn span::before {
  box-sizing: border-box;
  position: absolute;
  content: "";
}

.ui-btn:hover span, .ui-btn:focus span {
  color: #ad1957;
}

#btnAnim {
  transition: color .3s;
  font-family: Menlo,Roboto Mono,monospace;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .1rem;
}

/* Cápsula Memoji */
.center {
    display: flex;
    justify-content: left;
    align-items: center;
}
.design {
    height: 230px;
    width: 250px;
    border-radius: 40px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255) 13%,
      rgba(200, 200, 200) 100%
    );
    box-shadow: 3px 11px 5px grey;
    position: fixed;
    margin-top: 430px;
    margin-left: 200px;
    overflow: hidden;
}

.design2 {
    height: 230px;
    width: 250px;
    border-radius: 40px;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255) 13%,
      rgba(200, 200, 200) 100%
    );
    box-shadow: 3px 11px 5px grey;
    position: fixed;
    margin-top: 685px;
    margin-left: 200px;
    overflow: hidden;
}

.color-border {
    border-radius: 50%;
    background-color: #ffffff20;
    box-shadow: 0px 0px 10px 2px rgba(0, 0, 0, 0.1);
}

#memoji_2 {
    width: 200px;
    margin-top: 5px;
    margin-left: 20px;
}

#memoji_5 {
    width: 230px;
    margin-top: 30px;
    margin-left: 5px;
}

/* Box de contacto */
.card {
    max-width: 450px;
    height: 100px;
    margin: 100px auto;
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255) 13%,
      rgba(200, 200, 200) 100%
    );
    box-shadow: 3px 11px 5px grey;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 20px;
}

.small-text, .title, .desc {
    font-weight: 600;
}

.title, .desc {
    margin: 8px 0;
}

.small-text {
    color: #000000;
    font-size: 14px;
    text-align: center;
}

.title {
    color: #000000;
    font-size: 26px;
    line-height: 26px;
}

.desc {
    color: rgb(151 153 167);
    font-size: 13px;
    text-align: center;
}

/* Botones de redes sociales */
.wrapper {
    display: inline-flex;
    margin: 10px auto;
    padding: 0;
    list-style: none;
    font-family: "Poppins", sans-serif;
    justify-content: center;
}

.wrapper .icon {
    position: relative;
    background: #fff;
    border-radius: 50%;
    margin: 10px;
    width: 50px;
    height: 50px;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-shadow: 3px 9px 5px grey;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wrapper .icon:hover {
    box-shadow: 0 1px 5px grey;
    transform: translateY(9px) translateX(3px);
    transition: linear 0.2s;
}

.wrapper .icon:active {
    box-shadow: inset 0 1px 3px black;
}

.wrapper .icon img {
    border-radius: 50%;
    margin-top: 5px;
}

.wrapper .tooltip {
    position: absolute;
    top: 0;
    font-size: 14px;
    background: #fff;
    color: #333; /* Color visible en fondo blanco */
    padding: 5px 8px;
    border-radius: 5px;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    width: 130px;
    text-align: center;
    left: 50%;
    transform: translateX(-50%);
}

.wrapper .tooltip::before {
    position: absolute;
    content: "";
    height: 8px;
    width: 8px;
    background: #fff;
    bottom: -3px;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.wrapper .icon:hover .tooltip {
    top: -45px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    color: #fff; /* Color texto para hover */
}

.wrapper .icon:hover span,
.wrapper .icon:hover .tooltip {
    text-shadow: 0px -1px 0px rgba(0,0,0,0.1);
}

/* Twitter */
.wrapper .twitter:hover,
.wrapper .twitter:hover .tooltip,
.wrapper .twitter:hover .tooltip::before {
    background: #176494;
    color: #fff;
}

/* Instagram */
.wrapper .instagram:hover,
.wrapper .instagram:hover .tooltip,
.wrapper .instagram:hover .tooltip::before {
    background: #e4405f;
    color: #fff;
}

/* Estilo Logo Final */
.end-text {
    text-align: center;
    font-size: 15rem;
    color: white;
}

.content-box-special {
    display: flex;
    background: transparent;
    color: #ffffff;
    box-shadow: none;
    opacity: 1;
}
  
  /* Estilo del logo al final */
  .end-logo {
    background: linear-gradient(to bottom, #000000 55%, #fff 50%); /* Gradiente vertical */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent; /* Muestra el gradiente */
    display: block; 
    font-size: 200px;
    text-align: center;
    height: auto;
    margin: 0 auto; 
    margin-top: -126px;
    z-index: 10; 
  }


main h1 {
    text-align: center;
}

main p {
    font-size: 1.2rem;
    text-align: center;
}

main h3 {
    text-align: center;
    margin-left: 50px;
}

/* Footer */
footer {
    position: relative;
    width: 100%;
    padding: 20px;
    z-index: 10; /* Asegura que el footer esté por encima del logo si es necesario */
    background: transparent; /* Ejemplo, ajusta según tu diseño */
    color: #fff;
    text-align: center;
  }

footer p {
    font-size: 0.9rem;
    color: #cccccc;
    text-align: center;
}

iframe[style*="visibility: hidden"] {
    display: none;
}

#trex-game-1, #trex-game-2 {
    display: block;
    margin: 20px auto;
    border: 2px solid #ffffff;
    border-radius: 10px;
    background-color: #1a1a1a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

#trex-toggle-1, #trex-toggle-2 {
    display: block;
    margin: 10px auto;
    background-color: #ffffff;
    color: #e5568e;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s;
}

#trex-toggle-1:hover, #trex-toggle-2:hover {
    background-color: #cccccc;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

@media (max-width: 768px) {
    .container {
        align-items: stretch; /* Ajustar contenido al ancho */
    }

    .hero-section {
        height: 110vh; /* Reducir altura */
    }

    .welcome-text {
        font-size: 1rem; /* Reducir tamaño */
        top: 10px;
    }

    .hero-logo {
        max-width: 90%; /* Aumentar tamaño relativo */
    }

    .hero-logo.fixed {
        top: 20px; /* Ajustar posición */
        max-width: 70%;
    }

    .content-box {
        width: 100vw; /* Ajustar a viewport, pero mantener proporción */
        height: auto; /* Permitir altura dinámica */
        padding: 1rem; /* Reducir padding */
        min-height: 40vh; /* Menor altura mínima */
    }

    .content-box2 {
        width: 100vw; /* Ajustar a viewport, pero mantener proporción */
        height: auto; /* Permitir altura dinámica */
        padding: 1rem; /* Reducir padding */
        min-height: 40vh; /* Menor altura mínima */
    }

    .content-box-special {
        min-height: 5vh;
        display: flex;
        padding: 0 5px;
        margin-left: 25px;
        justify-content: center;    /* Centra horizontalmente */
    }

    .section-content {
        margin-top: 30px; /* Reducir márgenes */
        margin-bottom: 20px;
        margin-left: -2px;
    }

    .section-title {
        margin-left: 10px; /* Menor margen */
    }

    .centered-container h2 {
        margin: 0 10px; /* Reducir márgenes laterales */
        font-size: 1.5rem; /* Reducir tamaño ligeramente */
        width: 90vw; /* Ajustar ancho */
    }

    h2.centered-small-text {
        font-size: 1rem;
    }

    .centered-container h3 {
        font-size: 0.9rem; /* Reducir tamaño */
        width: 90vw;
    }

    .centered-container p {
        margin: 0 5%; /* Reducir márgenes */
        font-size: 1.0rem; /* Reducir tamaño */
        width: 90vw;
        text-align: left;
    }

    .centered-container button {
        margin: 0 5%; /* Reducir márgenes */
        margin-top: 20px;
    }

    .centered-container-contact h2 {
        margin: 0 auto; 
        font-size: 1.5rem; 
        width: 90vw;
    }

    .centered-container-contact h3 {
        font-size: 0.9rem; /* Reducir tamaño */
        width: 90vw;
    }

    .centered-container-contact p {
        margin: 0 auto; 
        font-size: 1.0rem; 
        width: 90vw;
        text-align: center;
    }

    .centered-container-contact button {
        margin: 0 5%; /* Reducir márgenes */
        margin-top: 20px;
    }

    .center {
        margin-bottom: 10px;
    }

    .thanks-visit {
        margin-top: 25px;
    }

    .cta span {
        font-size: 12px; /* Reducir tamaño */
        letter-spacing: 2px; /* Reducir espaciado */
        padding-right: 8px; /* Reducir padding */
    }

    .cta svg {
        width: 20px; /* Reducir tamaño */
        height: 7px;
        transform: translateX(-5px); /* Ajustar posición */
    }

    .design {
        position: relative; /* Cambiar a relativo */
        height: 150px; /* Reducir */
        width: 150px; /* Reducir */
        margin: 10px 0; /* Ajustar márgenes */
        margin-left: 10px; /* Ajustar posición */
    }

    .design2 {
        position: relative; /* Cambiar a relativo */
        height: 150px; /* Reducir */
        width: 150px; /* Reducir */
        margin: 10px 0; /* Ajustar márgenes */
        margin-left: 10px; /* Ajustar posición */
    }

    #memoji_2 {
        width: 130px; /* Reducir */
        margin-top: 10px;
        margin-left: 10px;
    }

    #memoji_5 {
        width: 150px; /* Reducir */
        margin-top: 20px;
        margin-left: 0;
    }

    .card {
        max-width: 85%; /* Ajustar a pantalla */
        height: 100px; /* Permitir altura dinámica */
        margin: 20px auto; /* Centrar */
        margin-top: 20px;
        margin-bottom: 50px;
        text-align: center;
    }

    .small-text {
        font-size: 12px; /* Reducir */
    }

    .title {
        font-size: 18px; /* Reducir */
        line-height: 18px;
    }

    .desc {
        font-size: 10px; /* Reducir */
    }

    .end-logo {
        font-size: 70px;
        max-width: 100%;
        width: 100%;
        height: auto;
        margin: 0;           /* Elimina márgenes que desvian el centro */
        display: flex;
        justify-content: center;    /* Centra el contenido dentro del h2 */
        align-items: center;
        text-align: center;         /* Centra el texto dentro del h2 */
        margin-top: -50px;
    }

    main h3 {
        margin-left: 10px; /* Reducir margen */
    }

    footer {
        padding: 10px 0; /* Reducir padding */
    }

    footer p {
        font-size: 0.7rem; /* Reducir tamaño */
    }

    /* Modal Proyectos mobile */
    #projectsModal {
        padding: 30px;
        width: 300px;
        height: 80%;
        top: 25.5vh;
        margin-left: auto;
        margin-right: auto;
    }

    #projectsModal h2 {
        position: relative;
        margin-left: 5px;
        margin-bottom: 3px;
        z-index: 15;
    }

    #projectsModal p {
        position: relative;
        margin-left: 25px;
        font-size: 12px;
        z-index: 15;
    }

    .modal-design {
        box-shadow: none;
        transform: none;
        height: 210px;
        width: 130px;
        margin-top: 190px;
        z-index: 10;
    }

    #memoji_9 {
        width: 200px;
        margin-top: 60px;
        margin-left: -37px;
    }

    .modal-card {
        box-shadow: none;
        margin-left: 0;
        margin-top: 220px;
        height: 170px;
    }

    #projectsModal button {
        margin-left: 105px;
    }
}