/* Paleta actualizada basada en el logo (sin variables :root) */
html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: #007C8C;
    color: #FFFFFF;
    line-height: 1.6;
    max-width: 1920px; /* Limita el ancho máximo del body */
    margin-left: auto;
    margin-right: auto;
}

/* ========================================================= */
/* MODIFICACIÓN: ESTILO GENERAL PARA ENLACES (LINEA 18) */
/* Esto afectará a enlaces que no tienen un estilo más específico (como los de la navbar) */
/* ========================================================= */
a {
    color: #65C9D2; /* Color de tu marca para enlaces */
    text-decoration: underline;
    transition: color 0.3s ease;
}

a:hover {
    color: #FFFFFF; /* Color al pasar el ratón, por ejemplo blanco */
}


/* Navbar */
.navbar {
    background-color: #007C8C; /* ¡EDITADO AQUÍ: MISMO COLOR QUE EL BODY! */
    padding: 0.6rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: calc(0.6rem + env(safe-area-inset-top));
    transition: padding 0.3s ease, background-color 0.3s ease;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: #65C9D2;
}

.hamburger {
    display: none; /* Oculto por defecto en desktop */
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px;
}

.hamburger span {
    width: 30px;
    height: 4px;
    background-color: white;
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Para animar el icono hamburguesa al abrir */
.hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translateY(9px);
}
.hamburger.open span:nth-child(2) {
    opacity: 0;
}
.hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translateY(-9px);
}

/* Hero */
.hero {
    /* Quitamos la imagen estática para usar vídeo */
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #FFFFFF;
    padding: 2rem 1rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 175, 193, 0.8);
  z-index: 0;
}

.bg-video {
  position: absolute;
  top: 50%; left: 50%;
  width: auto; height: 100%;
  min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -1;    /* para quedar bajo el overlay */
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding-top: 80px;
}

.logo-img {
    opacity: 0;
    transform: translateY(-20px);
    animation: fadeInSlideDown 1s ease-out forwards;
    animation-delay: 0.5s;
}

.logo-img img {
    max-width: 500px;
    height: auto;
    margin-bottom: 20px;
}

.main-taglines {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 1s ease-out forwards;
    animation-delay: 1s;
    
    width: 100%;
    max-width: 500px;
    margin: 0 auto 30px auto;
    text-align: center;
}

.tagline-expertos {
    font-size: 40px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.1;
    color: #FFFFFF;
    margin: 0;
    padding: 0 10px;
}

.tagline-principal {
    font-size: 30px;
    font-weight: 600;
    text-transform: none;
    line-height: 1.4;
    color: #DCEFF1;
    margin-top: 15px;
    padding: 0 20px;
}

/* CTA Button */
.cta-button {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 1s ease-out forwards;
    animation-delay: 1.5s;

    display: inline-block;
    margin-top: 10px;
    margin-bottom: 20px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    background-color: #00AFC1;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; 
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Reglas de display para el texto del botón (solución al problema doble) */
.cta-button .desktop-only-text {
    display: inline; /* Visible por defecto en escritorio */
}

.cta-button .mobile-only {
    display: none; /* Oculto por defecto en escritorio */
}

.cta-button:hover {
    background-color: #65C9D2;
    transform: translateY(-3px) scale(1.05); 
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); 
}

@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
  0%, 100%   { transform: translateY(0) translateX(0); }
  50%        { transform: translateY(-10px) translateX(5px); }
}

/* Animación flotante para ilustraciones de robots */
.robot {
  display: inline-block;      /* para que respete su caja y pueda animarse */
  will-change: transform;
  animation: float 4s ease-in-out infinite;
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Secciones (About, Services, Contact) */
section {
    padding: 80px 0;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

section.is-visible {
    opacity: 1;
    transform: translateY(0);
}
h2 {
    font-size: 30px;
    margin-bottom: 20px;
    text-transform: uppercase;
    font-weight: 700;
    color: #FFFFFF;
    transition: color 0.3s ease;
}

/* Resto del CSS permanece igual para about, services, contact, footer y media queries */


.about {
    background-color: #007C8C;
}

.about-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.about-text {
    flex: 1;
    min-width: 300px;
    max-width: 580px;
    text-align: justify;
    padding: 20px;
    background-color: rgba(0, 124, 140, 0.9);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
}

.about-text:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.about-image {
    flex: 1;
    min-width: 280px;
    max-width: 420px;
    text-align: center;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image img:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.about p {
    font-size: 20px;
    font-weight: 400;
    color: #DCEFF1;
    text-align: justify;
    line-height: 1.6; /* Añadido para consistencia */
    margin: 0;
}

.services {
    background: linear-gradient(rgba(0, 124, 140, 0.7), rgba(0, 124, 140, 0.7)), url("assets/conn.webp") no-repeat center center;
    background-size: cover;
    color: #FFFFFF;
}

.service-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.service {
    background-color: #005B66;
    padding: 40px 20px;
    border-radius: 12px;
    text-align: center;
    max-width: 300px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out, box-shadow 0.3s ease;
}

.service.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.service:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.service-icon {
    width: 150px;
    height: 150px;
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(40px);
    animation: fadeUp 1s ease-out forwards;
}

.service:nth-child(2) .service-icon {
    animation-delay: 0.2s;
}
.service:nth-child(3) .service-icon {
    animation-delay: 0.4s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pega esto justo después de tu @keyframes fadeUp { … } */

/* Flotación suave: mueve ±10px en X y ±8px en Y */
@keyframes floatSoft {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(10px, -8px); }
  50%  { transform: translate(0, -5px); }
  75%  { transform: translate(-10px, 8px); }
  100% { transform: translate(0, 0); }
}

/* Sustituye tu bloque .service-icon por este: */
.service-icon {
  width: 150px;     /* ajusta si quieres más grande/pequeño */
  height: 150px;
  margin-bottom: 24px;

  /* fadeUp de entrada, luego floatSoft en bucle */
  animation:
    fadeUp    1s ease-out forwards,
    floatSoft 6s ease-in-out infinite 1s;
  transform-origin: center center;
}


.contact {
    background-color: #005B66;
    text-align: center;
    opacity: 0;
    transform: translateY(50px);
}

.contact-text-group {
    max-width: 550px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 60px;
}

.contact-combined-text {
    font-size: 19px;
    line-height: 1.5;
    color: #DCEFF1;
    margin: 0;
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.contact-form {
    background-color: #007C8C;
    padding: 30px 40px;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    box-sizing: border-box;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.contact-form::before {
    content: "Formulario de contacto";
    display: block;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    margin-bottom: 30px;
}

.contact-form label {
    display: block;
    text-align: left;
    margin-top: 20px;
    margin-bottom: 8px;
    color: #FFFFFF;
    font-weight: 600;
    font-size: 15px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    background-color: #FFFFFF;
    color: #000000;
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 80px;
}

.contact-form button {
    width: 100%;
    padding: 12px;
    margin-top: 20px;
    margin-bottom: 0;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    background-color: #00AFC1;
    color: #FFFFFF;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.contact-form button:hover {
    background-color: #65C9D2;
}

.footer {
    background-color: #007C8C;
    color: #DCEFF1;
    padding: 30px 20px;
    font-size: 14px;
    text-align: center;
}

.footer-icon img {
    width: 24px;
    height: 24px;
}

.about h2:hover,
.services h2:hover,
.contact h2:hover {
    color: #65C9D2;
}

/* Página de Gracias */
.page-gracias {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    background-color: #007C8C;
    text-align: center;
}

.page-gracias h1 {
    font-size: 2.5em;
    color: #FFFFFF;
    margin-bottom: 20px;
}

.page-gracias p {
    font-size: 1.2em;
    color: #DCEFF1;
    margin-bottom: 30px;
}

.page-gracias a {
    text-decoration: none;
    color: #FFFFFF;
    background-color: #00AFC1;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.page-gracias a:hover {
    background-color: #65C9D2;
}

/* --- Banner de Cookies --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #005B66;
    color: #DCEFF1;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    gap: 10px;
}

.cookie-banner a {
    color: #65C9D2;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-banner button {
    background-color: #00AFC1;
    color: #FFFFFF;
    border: none;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.cookie-banner button:hover {
    background-color: #65C9D2;
}

@media (min-width: 600px) {
    .cookie-banner {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ========================================================= */
/* ESTILOS AÑADIDOS: Botón "Volver al inicio" */
/* ========================================================= */

.back-to-home-button {
    display: inline-block; /* Para que parezca un botón y acepte padding/margin */
    margin-top: 20px; /* Espacio superior */
    margin-bottom: 20px; /* Espacio inferior */
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    background-color: #00AFC1; /* Color principal de tu CTA */
    color: #FFFFFF; /* Color del texto */
    border: none;
    border-radius: 8px;
    text-decoration: none; /* Quita el subrayado del enlace */
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease; 
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra sutil */
    text-align: center;
}

.back-to-home-button:hover {
    background-color: #65C9D2; /* Color de hover */
    transform: translateY(-3px) scale(1.05); /* Efecto hover ligero */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Sombra más pronunciada al hover */
}

/* --- Media Query para Móvil (dentro de @media (max-width: 768px)) --- */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        padding: 1.5rem 1rem;
        justify-content: flex-start;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 1rem;
        position: absolute;
        top: calc(70px + env(safe-area-inset-top));
        right: 1rem;
        background-color: #007C8C; /* ¡EDITADO AQUÍ TAMBIÉN para móvil! */
        padding: 1rem;
        border-radius: 8px;
        z-index: 999;
        width: calc(100% - 2rem);
        max-width: 250px;
        align-items: flex-start;
    }

    .nav-links.open {
        display: flex;
    }

    .hamburger {
        display: flex;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }

    /* Hero - YA NO USAMOS IMAGEN, SÓLO VÍDEO */
    .hero {
        position: relative;
        overflow: hidden;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        justify-content: space-evenly;
        height: 100%;
        padding-top: 5vh;
        padding-bottom: 10vh;
        flex-grow: 1;
    }

    .logo-img img {
        max-width: 80%;
        width: 100%;
        margin-top: 0;
        margin-bottom: 20px;
    }

    /* Reglas para las frases en móvil */
    .main-taglines {
        max-width: 95%; 
        margin: 0 auto 25px auto;
    }

    .tagline-expertos {
        font-size: 28px;
        letter-spacing: -0.5px;
        line-height: 1.1;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        padding: 0 10px;
    }

    .tagline-principal {
        font-size: 20px;
        margin-top: 10px;
        padding: 0 10px;
        line-height: 1.3;
        font-weight: 600;
        text-transform: none;
    }

    /* SOLUCIÓN AL PROBLEMA DOBLE EN ESCRITORIO (aplicado en móvil) */
    .cta-button .desktop-only-text {
        display: none;
    }

    .cta-button .mobile-only {
        display: inline;
    }
    
    /* Otros elementos */
    h2 {
        font-size: 24px;
        padding: 0 10px;
    }

    .contact-text-group {
        max-width: 90%;
        margin-bottom: 30px;
    }

    .contact-combined-text {
        font-size: 16px;
        padding: 0 10px;
    }

    .contact-form {
        padding: 20px;
        max-width: 320px;
    }

    .contact-form label {
        margin-top: 15px;
    }

    .about-content {
        flex-direction: column;
        gap: 30px;
    }

    .about-text {
        text-align: center;
        padding: 15px;
        margin: 0 auto;
    }

    .about p {
        font-size: 18px;
        text-align: center;
        padding: 0 10px;
    }

    .service-items {
        gap: 30px;
    }

    .service {
        padding: 30px 15px;
    }

    /* ESTILOS AÑADIDOS: Ajustes para el botón "Volver al inicio" en móvil */
    .back-to-home-button {
        padding: 12px 24px; /* Ajusta el padding para móviles si es necesario */
        font-size: 14px; /* Ajusta el tamaño de fuente para móviles */
        margin-top: 30px; /* Puede que necesites ajustar el margen en móvil */
    }
}
/* ——— Partículas en el fondo de “¿QUÉ HACEMOS?” ——— */
.about {
  position: relative;
  overflow: hidden; /* para que las partículas queden dentro */
}
#particles-about {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;            /* Detrás de tu .about-content (que debería tener z-index:1) */
  pointer-events: none;  /* No interfiere con clicks ni hovers */
}
.about-content {
  position: relative;
  z-index: 1;            /* Para que el texto y la imagen queden por encima */
}

