@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
    outline: none;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
}

:root {
    --bg-color: #000000;
    --second-bg-color: #000000;
    --text-color: #fff;
    --main-color: #6e2af3;
}
html {
    font-size: 62.5%;
    overflow-x: hidden;
}
body {
    background: var(--bg-color);
    font-family: "Poppins", sans-serif;
    color: var(--text-color);
    padding-top: 8rem;
}
html::-webkit-scrollbar {
    width: 0.8rem;
}
html::-webkit-scrollbar-track{
    background: var(--bg-color);
}
html::-webkit-scrollbar-thumb {
    background: var(--main-color);
}

.header{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 3rem 9%;
    background: rgba(0,0,0,0.7);
    filter: drop-shadow(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}
.logo {
    font-size: 3rem;
    color: var(--main-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.5s ease;
}
.logo:hover {
    transform: scale(1.1);
}
.navbar a {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease;
    border-bottom: 3px solid transparent;
}
.navbar a:hover,
.navbar a.active {
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}
.menu-icon {
    font-size: 3.6rem;
    color: var(--main-color);
    display: none;
}
@media (max-width:995px) {
    .menu-icon {
        display: block
    }
    .navbar {
        position: absolute;
        top: 100%;
        right: 0;
        width: 40%;
        border-left: 3px solid var(--main-color);
        border-bottom: 3px solid var(--main-color);
        border-bottom-left-radius: 2rem;
        padding: 1rem 3%;
        background-color: var(--second-bg-color);
        border-top: 0.1rem solid rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    .navbar.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
    .navbar a {
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
    }
    .navbar a:hover, 
    .navbar a.active {
        padding: 1rem;
        border-radius: 0.5rem;
        border-bottom: 0.5rem solid var(--main-color);
    }
}
section {
    padding: 4rem 7%;
    min-height: auto;
}
span {
    color: var(--main-color);
}
.click {
    color: var(--main-color);
    text-align: center;
    line-height: 2;
    font-size: 7rem;
    font-size: 10rem;
    font-weight: 500;
}
.descripciones {
    text-align: left;
}
.home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8rem;
    background: var(--bg-color);
    padding-top: 6rem;
    padding-bottom: 4rem;
}
.home .home-content h1 {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1.2;
}
.home-content h3 {
    font-size: 4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.home-img {
    border-radius: 50%;
}
.home-img img {
    position: relative;
    width: 32vw;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    cursor: pointer;
}
.home-img image:hover {
    transform: scale(1.01);
    filter: drop-shadow( 0 0 25px var(--main-color));
}
.home-content p {
    font-size: 1.8rem;
    font-weight: 500;
}
.social-icon a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 4rem;
    height: 4rem;
    background: transparent;
    border: 0.2rem solid var(--main-color);
    font-size: 2rem;
    border-radius: 50%;
    color: var(--main-color);
    margin: 2rem 1rem 2rem 0;
    transition: 0.3s ease;
}
.social-icon a:hover {
    color: black;
    transform: scale(1.3)translateY(-5px);
    background: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
}
.btn {
    display: inline-block;
    padding: 1rem 2.8rem;
    color: var(--main-color);
    background: var(--bg-color);
    border-radius: 4rem;
    font-size: 1.6rem; 
    counter-reset: var(--main-color);
    border: 2px solid var(--main-color);
    letter-spacing: 0.1rem;
    font-weight: 600;
    transition: 0.3s ease;
    cursor: pointer;
}
.btn:hover {
    transform: scale(1.03);
    background-color: var(--main-color);
    color: black;
    box-shadow: 0 0 25px var(--main-color);
}
.typing-text {
    font-size:  4rem;
    font-weight: 700;
    position: relative;
    min-height: 5rem;
}
.typing-text span {
    position: relative;
    padding-left: 1.0ch;
}
.typing-text span::before {
    content: '';
    position: absolute;
    left: 1.0ch;
    top: 0;
    bottom: 0;
    color: var(--main-color);
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid var(--main-color);
    animation:
    change-words   9s infinite,
        typing-effect  9s steps(11) infinite, 
        cursor-blink   0.75s infinite;
}
@keyframes change-words {
    0%, 33.32% {
        content: 'Diseño';
    }
    33.33%, 66.65% {
        content: 'Desarrollo';
    }
    66.66%, 100% {
        content: '& Edición';
    }
}

@keyframes typing-effect {
    0%, 33.33%,
    66.66%,
    100% {
        width: 0;
    }
    10%, 28% {width: 8ch; }
    43%, 61% {width: 11ch; }
    76%, 94% {width: 10ch; }
}
@keyframes cursor-blink {
    0%, 100% {border-right-color: var(--main-color); }
    50% {border-right-color: transparent;}
}
@media (max-width:1000px){
    .home {
        gap: 4rem;
    }
}
@media (max-width:995px) {
    .home {
        flex-direction: column;
        margin: 5rem 4rem;
    }
    .home .home-content h3 {
        font-size: 2.5rem;
    }
    .home-content h1  {
        font-size: 5rem;
    }
    .home-img img {
        width: 70vw;
        margin-top: 4rem;
    }

}
.heading {
    text-align: center;
    font-size: 3.5rem;
    margin-bottom: 3rem;
}

/*Service Section*/

.services {
    background: var(--second-bg-color);
}
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.service-box {
    background-color: var(--bg-color);
    border: 1px solid var(--main-color);
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 3rem;
    cursor: pointer;
    transition: 0.3s ease;
}
.service-box-link {
    text-decoration: none; /* Quita el subrayado del enlace */
    color: inherit; /* Hace que el texto herede el color de su contenedor, en lugar de ser azul */
}

.service-box-link:hover .service-box {
    background: transparent;
    color: var(--text-color);
    transform: scale(1.03);
}
.service-box .service-info {
    display: flex;
    flex-direction: column;
    text-align: left;
    max-height: 200px;
    justify-content: center;
    align-items: center;
    padding: 3em;
}
.service-info h4 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}
.service-info p {
    font-size: 1.6rem;
    font-weight: 400;
    max-height: 100px;
    margin: auto;
}
@media (max-width:991px) {
    section {
        padding: 9rem 3% 2rem;
    }
    .services {
        padding-bottom: 7rem;
    }
}

/*About Section*/

.about {
    background: var(--bg-color);
}
.about-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.about-box {
        background-color: var(--bg-color);
        border: 1px solid var(--main-color);
        min-height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 3rem;
        cursor: pointer;
        transition: 0.3s ease;
        padding: 3rem;
}
.about-box-link {
    text-decoration: none;
    color: inherit;
}
.about-box-link:hover .about-box {
    background: transparent;
    color: var(--text-color);
    transform: scale(1.03);
    border-color: var(--main-color);
}
.about-info h4 {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-align: center;
}
.about-info p {
    font-size: 1.6rem;
    font-weight: 400;
    max-height: 150px;
    margin: auto;
}
        /*i iconos*/
        .about-box i {
            font-size: 5rem;
            color: var(--main-color);
            margin-bottom: 2rem;
            transition: 0.3s ease;
        }
        .about-box-link:hover .about-box i {
            color: var(--text-color);
        }

/* Footer Section*/

.footer {
    position: relative;
    bottom: 0;
    width: 100%;
    padding: 40px 0;
    background-color: var(--main-color);
}
.footer .social {
    text-align: center;
    padding-bottom: 25px;
    color: black;
}
.footer .social a {
    font-size: 25px;
    color: black;
    border: 2px solid black;
    width: 42px;
    height: 42px;
    display: inline-block;
    text-align: center;
    border-radius:  50%;
    margin: 0 10px;
    transition: 0.3s ease;
}
.footer .social a:hover {
    transform: scale(1.2)translateY(-5px);
    background: black;
    color: var(--main-color);
}
.footer ul {
    margin-top: 0;
    padding: 0;
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 0;
    text-align: center;
}
.footer ul li a {
    color: black;
    border-bottom: 3px solid transparent;
    transition: 0.3s ease;
}
.footer ul li a:hover {
    border-bottom: 3px solid black;
}
.footer ul li {
    display: inline-block;
    padding: 0 15px;
}
footer .copyright {
    margin-top: 50px;
    text-align: center;
    font-size: 16px;
    color: black;
}

/*Projects section*/

.projects {
    background: var(--bg-color);
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}
.project-card {
    background: var(--second-bg-color);
    border-radius: 2rem;
    border: 1px solid transparent;
    box-shadow: 0 0 1rem rgba(0, 0, 0, 0.5);
    overflow: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.project-card:hover {
    border-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
}

.project-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    transform: translateZ(35px); /* Efecto de profundidad para la imagen */
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 2.5rem;
    text-align: center;
    transform-style: preserve-3d;
}

.project-title {
    font-size: 2.2rem;
    color: var(--main-color);
    margin-bottom: 1rem;
    transform: translateZ(60px);
}

.project-info p {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    transform: translateZ(40px);
}

.project-info .btn {
     transform: translateZ(20px);
}

@media(max-width:1285px) {
    html{
        font-size: 55%;
    }
}
@media(max-width:991px) {
    .header {
        padding: 2rem 3%;
    }
    .section {
        padding: 10rem 3% 2rem;
    }
    .services {
        padding-bottom: 7rem;
    }
    .footer {
        padding: 2rem 3%;
    }
}
@media (max-width: 768px) {
    .footer ul li {
        display: block;
        margin: 1rem 0;
    }
}

/*Form Section*/

.contact-container {
    width: 100%;
    max-width: 60rem; /* Ancho máximo para el contenedor */
    margin: 0 auto;
    gap: 3rem;
    padding: 2.5rem;
    background: var(--bg-color); /* Fondo negro */
    border-radius: 2rem;
    border: 1px solid var(--main-color); /* Marco morado */
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-box {
    position: relative;
}

.input-box input,
.input-box textarea {
    width: 100%;
    padding: 1.5rem;
    outline: none;
    background: rgba(255,255,255, 0.05);
    border: 2px solid transparent; 
    border-radius: 0.8rem;
    letter-spacing: 1px;
    transition: .3s;
    color: var(--text-color);
    font-size: 1.5rem;
}

.input-box textarea {
    resize: none;
    height: 150px;
}

.input-box input::placeholder,
.input-box textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-box input:focus,
.input-box textarea:focus {
    box-shadow: 0 0 15px var(--main-color);
    border-color: var(--main-color);
    animation: shake .2s;
}

.input-box i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 15px;
    color: rgba(255, 255, 255, 0.5);
    transition: .3s;
}

.input-box input:focus ~ i,
.input-box textarea:focus ~ i {
    color: var(--main-color);
}

.contact-form .btn {
    width: 100%;
    padding: 1.2rem 2.8rem;
    outline: none;
    background: transparent;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    border-radius: 4rem;
    transition: .3s;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
}

.contact-form .btn:hover {
    box-shadow: 0 0 25px var(--main-color);
    background: var(--main-color);
    color: black;
    transform: scale(1.03);
}
/* Contenedor */
.consent-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  font-size: 1.4rem;
  color: var(--text-color);
  flex-wrap: wrap;
}

/* Ocultar el checkbox original */
.consent-box input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  background-color: transparent;
  border: 2px solid var(--main-color);
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  display: inline-block;
  transition: all 0.2s ease;
}

/* Mostrar check cuando esté marcado */
.consent-box input[type="checkbox"]:checked::after {
  content: '✔';
  position: absolute;
  color: var(--main-color);
  font-size: 1.1rem;
  left: 0.2rem;
  top: 0rem;
}

/* Texto */
.consent-box span {
  line-height: 1.4;
  flex: 1;
}

/* Link */
.consent-box a {
  color: var(--main-color);
  text-decoration: underline;
}

.consent-box a:hover {
  color: #a260f7;
}

@keyframes shake {
    0%, 100% {transform: translateX(0);}
    10%, 30%, 50%, 70%, 90% {transform: translateX(-5px);}
    20%, 40%, 60%, 80% {transform: translateX(5px);}
}

/* --- MEDIA QUERIES PARA LA SECCIÓN DE CONTACTO --- */
@media screen and (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .contact-info {
        text-align: center;
        align-items: center;
    }
    .contact-data p {
        justify-content: center;
    }
}

/* Esta media query también afecta al formulario en móviles */
@media (max-width: 768px) {
    .contact form .input-box input {
        width: 100%;
    }
}

@media (max-width: 768px) {
  section.contact {
    min-height: auto !important;
    padding-bottom: 7rem !important;
    padding-top: 7rem !important; /* antes era 2rem */
  }
}

@media (max-width: 995px) {
    body {
        padding-top: 6rem; /* menos espacio para header más pequeño */
    }
    section {
        padding: 2rem 5%;
    }
}

/*Aviso de Privacidad Cookies*/

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--main-color);
  color: black;
  padding: 1rem 2rem;
  display: none;
  justify-content: space-between;
  align-items: center;
  font-size: 1.6rem;
  z-index: 9999;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
}

.cookie-banner p {
  margin: 0;
  flex: 1;
}

.cookie-banner a {
  color: black;
  text-decoration: underline;
}

.cookie-banner button.btn {
  background-color: black;
  color: var(--main-color);
  border: none;
  padding: 0.6rem 1.5rem;
  border-radius: 4rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
}

.cookie-banner button.btn:hover {
  background-color: #222;
}
