:root {
    --negro: #1A1A1A;
    --blanco: #EFECE3;
    --amarillo: #F5D825; /* solo acento */
    --gris: #302F2B;     /* transición */
}

body,
#nuestros-proyectos h2,
#nuestros-servicios h2,
header h1,
#contacto h2 {
    font-family: 'Poppins', sans-serif;
}

/* Tipografía Prompt (secundaria) */
.servicio-texto,
header a,
#contacto p {
    font-family: 'Prompt', sans-serif;
}

body {
    background-color: var(--blanco);
    color: var(--blanco);
    margin: 0;
    padding: 0;
}

/* Estilo secciones */
header {
    background-color: var(--negro);
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

/* Logo container con tamaño controlado */
/*animacion */

#logo {
    cursor: pointer;
    transition: opacity 0.35s ease, transform 0.35s ease, filter 0.35s ease;   
}

#logo.fade {
    opacity: 0;
    transform: scale(0.96);
    filter: brightness(0.6);
}

#logo-container {
    width: 120px;
    margin: 0 auto 15px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    animation: brilloLogo 3s ease-in-out infinite;
}

#logo-container:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.9));
}

@keyframes brilloLogo {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.9));
    }
}

#logo-container img {
    width: 100%;
    height: auto;
}

header h1 {
    margin: 0;
    font-size: 2em;
    letter-spacing: 3px;
    color: var(--blanco);
}

header div {
    margin-top: 10px;
}

header a {
    color: var(--blanco);
    margin: 0 15px;
    font-size: 16px;
    text-decoration: none;
    font-family: 'Prompt', sans-serif;
    position: relative;
    transition: color 0.3s ease;
}

header a:hover {
    color: var(--gris);
}

header a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--blanco);
    transition: width 0.3s ease;
}

header a:hover::after {
    width: 100%;
}

/* Preloader */
#preloader {
    position: fixed;
    width: 100%;
    height: 100%;
    background-color: var(--negro);
    top: 0;
    left: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
}

#loader-content {
    text-align: center;
}

#loader-content img {
    width: 150px;
    height: auto;
}

/* Animación estilo "encendido de TV" */
@keyframes powerOn {
    0% {
        opacity: 0;
        filter: brightness(0.2) blur(4px) drop-shadow(0 0 0 transparent);
        transform: scale(0.9);
    }
    40% {
        opacity: 1;
        filter: brightness(1.5) blur(2px) drop-shadow(0 0 10px #fff);
    }
    70% {
        filter: brightness(0.9) drop-shadow(0 0 20px #fff);
    }
    85% {
        filter: brightness(1.3) drop-shadow(0 0 40px #fff);
    }
    100% {
        opacity: 1;
        filter: brightness(1) drop-shadow(0 0 30px #fff);
        transform: scale(1);
    }
}

.power-on {
    animation: powerOn 2.5s ease-out forwards;
}

#nuestros-proyectos,
#nuestros-servicios {
    text-align: center;
    margin-top: 0;
    font-size: 28px;
    color: var(--negro);
    background-color: var(--blanco);
    padding: 40px 0 30px;
    letter-spacing: 2px;
}

#nuestros-proyectos h2,
#nuestros-servicios h2 {
    margin: 0;
    position: relative;
    display: inline-block;
}

#nuestros-proyectos h2::after,
#nuestros-servicios h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--negro);
}

/* Sección completa de proyectos con fondo blanco */
#seccion-proyectos {
    background-color: var(--blanco);
    padding: 0;
}

/* Carrusel de videos */
#carrete {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 90px; 
    background-color: var(--blanco);
    position: relative;
}

#carrete .slick-dots {
  display: none !important;
}

/* Wrapper responsive para videos 16:9 */
.video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}

/* Videos en formato 16:9 correcto */
.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

#carrete-servicios {
    width: 100vw;
    height: 100vh;
    margin: 0;
    margin-left: calc(-50vw + 50%);
    text-align: center;
    overflow: hidden;
    position: relative;
}

#carrete-servicios .slick-slide {
    display: flex !important;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100vh;
}

#carrete-servicios img {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease-out;
}

#carrete-servicios .slick-slide.slick-active img {
    animation: zoomIn 0.8s ease-out forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(1.1);
        opacity: 0.8;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.servicio-texto {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--blanco); 
    font-size: 48px; 
    font-weight: bold;
    text-align: center;
    width: 80%; 
    z-index: 1;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.7);
    letter-spacing: 2px;
    animation: fadeInText 0.8s ease-out;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}
.espacio-visual {
    height: 120px;
    background-color: var(--blanco);
}

#redes-sociales {
    background: transparent;
    padding: 40px 0;
    text-align: center;
}

#redes-sociales a {
    color: var(--blanco);
    margin: 0 20px;
    font-size: 32px;
    transition: all 0.3s ease;
    display: inline-block;
}

#redes-sociales a:hover {
    color: var(--gris);
    transform: scale(1.1);
}

#contacto {
    background-color: var(--negro);
    padding: 40px 20px 30px;
    text-align: center;
    color: var(--blanco);
    position: relative;
}

#contacto::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 0;
}

#contacto * {
    position: relative;
    z-index: 1;
}

#contacto h2 {
    font-size: 32px;
    margin: 15px 0 10px;
    letter-spacing: 2px;
    
}

#contacto p {
    margin: 8px 0;
    font-size: 18px;
}

#contacto p:first-child {
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 15px;
}

/* Estilos para las flechas del carrusel */
.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 58px;
    height: 58px;
    background-color: var(--blanco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    color: var(--negro);
    font-size: 22px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background-color: var(--negro);
    color: var(--blanco);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* FUERA DEL VIDEO */
.carousel-prev {
    left: -55px;
}

.carousel-next {
    right: -55px;
}

/* Estilos para thumbnails de video */
.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: var(--blanco);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.play-button:hover {
    background-color: var(--negro);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.play-button i {
    color: var(--negro);
    font-size: 32px;
    margin-left: 5px;
}
.play-button:hover i {
    color: var(--blanco);
}

.video-wrapper.playing .video-thumbnail,
.video-wrapper.playing .play-button {
    display: none;
}

/* ---- Filtros de trabajo: estilo texto con línea animada ---- */
.filtro-trabajo {
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 20px 0 32px;
  background-color: var(--blanco);
}

.filtro-trabajo button {
  background: transparent;
  color: var(--negro);
  border: none;
  padding: 4px 0;
  font-family: 'Prompt', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
}

/* La línea debajo */
.filtro-trabajo button::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--negro);
  transition: width 0.3s ease;
}

/* Hover: la línea se dibuja */
.filtro-trabajo button:hover::after {
  width: 100%;
}

/* Activo: línea completa siempre visible */
.filtro-trabajo button.activo::after {
  width: 100%;
}

/* Ocultar secciones inactivas */
.contenido-trabajo {
  display: none;
  animation: fadeInWork 0.35s ease;
}

.contenido-trabajo.visible {
  display: block;
}

@keyframes fadeInWork {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* Responsive */
@media (max-width: 768px) {
    #nuestros-proyectos,
#nuestros-servicios {
    font-size: 22px;
}
    header h1 {
        font-size: 1.2em;
    }

    header a {
        display: block;
        margin: 10px 0;
    }

    #carrete { 
        width: 95%;
        padding: 30px 10px;
    }

    .servicio-texto {
        font-size: 32px;
    }

    .carousel-prev,
    .carousel-next {
        font-size: 20px;
        padding: 5px 10px;
    }
    .carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.carousel-prev,
.carousel-next {
    width: 55px;
    height: 55px;
    font-size: 22px;
}
}


@media (max-width: 480px) {
    .servicio-texto {
        font-size: 26px;
        width: 90%;
    }
}

/* Botón volver arriba */
#btn-volver-arriba {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--amarillo);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

#btn-volver-arriba.visible {
    opacity: 1;
    visibility: visible;
}

#btn-volver-arriba:hover {
    background-color: var(--negro);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

#btn-volver-arriba i {
    color: var(--negro);
    font-size: 20px;
}

#btn-volver-arriba:hover i {
    color: var(--amarillo);
}

/* Permitir interacción real con el iframe cuando el video está activo */
.video-wrapper.playing {
    pointer-events: none;
}

.video-wrapper.playing iframe {
    pointer-events: auto;
}

#btn-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
}

#btn-whatsapp .wa-circle {
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    position: relative;
}

#btn-whatsapp .wa-circle::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid #25D366;
    opacity: 0;
    animation: waPulse 2.2s ease-out infinite;
}

#btn-whatsapp .wa-circle::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid #25D366;
    opacity: 0;
    animation: waPulse 2.2s ease-out infinite 0.6s;
}

@keyframes waPulse {
    0%   { opacity: 0.6; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.5); }
}

#btn-whatsapp .wa-label {
    background: var(--negro);
    color: var(--blanco);
    font-family: 'Prompt', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    padding: 7px 14px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

#btn-whatsapp:hover .wa-label {
    opacity: 1;
    transform: translateX(0);
}

#btn-whatsapp:hover .wa-circle {
    background: #1ebe5d;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.65);
}

@media (max-width: 600px) {
    #btn-whatsapp {
        bottom: 20px;
        left: 16px;
    }
    #btn-whatsapp .wa-label {
        display: none;
    }
}

.logo-texto {
    width: 150px;  
    height: auto;
    display: block;
    margin: 10px auto 0;
}

/* ---- TikTok carrusel vertical ---- */
#redes {
  display: none;
}
#redes.visible {
  display: block;
}

#tiktok-carousel-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 30px 20px 40px;
}

#tiktok-btn-up,
#tiktok-btn-down {
  background: transparent;
  border: 2px solid var(--negro);
  color: var(--negro);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, color 0.3s ease;
}

#tiktok-btn-up:hover,
#tiktok-btn-down:hover {
  background: var(--negro);
  color: var(--blanco);
}

.tiktok-feed {
  width: 100%;
  max-width: 325px;
  height: 575px;
  position: relative;  /* ← clave */
  overflow: hidden;
  border-radius: 16px;
}

.tiktok-card {
  position: absolute;  /* ← clave, apiladas una encima de otra */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.tiktok-card.abajo {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.tiktok-card.activo {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.tiktok-card.arriba {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.tiktok-card a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.tiktok-thumb {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--negro);
  border-radius: 16px;
  overflow: hidden;
}

.tiktok-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.tiktok-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tiktok-card:hover .tiktok-overlay { opacity: 1; }
.tiktok-card:hover .tiktok-thumb img { transform: scale(1.05); }

.tiktok-overlay i { font-size: 42px; color: var(--blanco); }

.tiktok-overlay span {
  font-family: 'Prompt', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blanco);
}

.tiktok-autor {
  position: absolute;
  bottom: 14px;
  left: 0; right: 0;
  text-align: center;
  font-family: 'Prompt', sans-serif;
  font-size: 12px;
  color: var(--blanco);
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

#tiktok-counter {
  font-family: 'Prompt', sans-serif;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--gris);
}

/* ===== CLIENTES ===== */
#clientes {
    background-color: var(--blanco);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 60px 80px;
    text-align: center;
    box-sizing: border-box;
}

#clientes h2 {
    font-family: 'Poppins', sans-serif;
    color: var(--negro);
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin: 0 0 54px;
    display: inline-block;
    position: relative;
}

#clientes h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--negro);
}

#logos-clientes {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.cliente-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cliente-item img {
    width: 80%;
    max-width: 320px;
    height: auto;
    object-fit: contain;
    opacity: 0.75;
    filter: grayscale(100%);
    transition: opacity 0.3s ease, filter 0.3s ease, transform 0.3s ease;
}

.cliente-item img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.07);
}

@media (max-width: 768px) {
    #clientes { padding: 40px 20px; }
    .cliente-item { flex: 0 0 50%; margin-bottom: 30px; }
    .cliente-item img { width: 70%; }
}

@media (max-width: 480px) {
    .cliente-item { flex: 0 0 100%; }
}
/* ===== Indicadores del carrusel de servicios ===== */
#carrete-servicios {
    cursor: grab;
}

#carrete-servicios:active {
    cursor: grabbing;
}

/* Sombra suave abajo para que las rayitas se vean sobre cualquier foto */
#carrete-servicios::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 160px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    pointer-events: none;
    z-index: 2;
}

#carrete-servicios .slick-dots {
    display: flex !important;
    justify-content: center;
    gap: 12px;
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    z-index: 5;
}

#carrete-servicios .slick-dots li {
    width: 60px;
    height: 24px; /* área de toque más grande */
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

#carrete-servicios .slick-dots li button {
    position: relative;
    width: 100%;
    height: 3px;
    padding: 0;
    border: none;
    border-radius: 2px;
    background: rgba(239, 236, 227, 0.35);
    cursor: pointer;
    overflow: hidden;
    font-size: 0;
}

#carrete-servicios .slick-dots li button::before {
    display: none;
}

#carrete-servicios .slick-dots li button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--blanco);
    transform: scaleX(0);
    transform-origin: left;
}

#carrete-servicios .slick-dots li.slick-active button::after {
    animation: llenarBarra 5s linear forwards;
}

@keyframes llenarBarra {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@media (max-width: 480px) {
    #carrete-servicios .slick-dots {
        bottom: 30px;
        gap: 8px;
    }
    #carrete-servicios .slick-dots li {
        width: 40px;
    }
}
/* ---- Reproductor TikTok embebido ---- */
.tiktok-card iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 16px;
  background: transparent;
  z-index: 1;
}

/* Indicador de carga mientras llega el video */
.tiktok-card { background: var(--negro); border-radius: 16px; }
.tiktok-cargando {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tiktok-cargando span {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: tiktok-giro 0.8s linear infinite;
}
.tiktok-card.listo .tiktok-cargando { display: none; }
@keyframes tiktok-giro { to { transform: rotate(360deg); } }

/* Logos cuadrados (como Oil Works) para que no se vean más grandes que los demás */
.cliente-item img.logo-cuadrado {
    width: 55%;
    max-width: 200px;
}
