/* CSS/style.css */

/* 1. Definimos la fuente local Variable */
@font-face {
    font-family: 'Host Grotesk';
    src: url('../Host_Grotesk/HostGrotesk-VariableFont_wght.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-style: normal;
}

body {
    position: relative;
    font-family: 'Host Grotesk', sans-serif;
    background-color: #0a0a0a;
    color: #e5e7eb;
}

html {
    scroll-padding-top: 80px;
    overflow-x: hidden;
    width: 100%;
}

#three-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    z-index: -50;
    pointer-events: none;
}

/* Efecto de aura/glow que sigue al cursor */
#cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(29, 78, 216, 0.15) 0%, rgba(29, 78, 216, 0) 60%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: background 0.2s ease;
    z-index: -1;
}

@media (max-width: 768px) {
    #cursor-glow {
        width: 400px;
        height: 400px;
        opacity: 0.5;
    }
}

/* Animación para las "burbujas" de fondo */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: -1;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: rgba(79, 70, 229, 0.5);
    top: -100px;
    left: -100px;
    animation: move-blob-1 15s infinite alternate;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: rgba(168, 85, 247, 0.4);
    bottom: -150px;
    right: -150px;
    animation: move-blob-2 20s infinite alternate;
}

@media (max-width: 768px) {
    .blob-1 {
        width: 250px;
        height: 250px;
        top: -50px;
        left: -50px;
    }

    .blob-2 {
        width: 300px;
        height: 300px;
        bottom: -50px;
        right: -50px;
    }
}

@keyframes move-blob-1 {
    from {
        transform: translate(-10px, -20px) scale(1);
    }

    to {
        transform: translate(30px, 40px) scale(1.1);
    }
}

@keyframes move-blob-2 {
    from {
        transform: translate(20px, 30px) scale(1.1);
    }

    to {
        transform: translate(-40px, -10px) scale(1);
    }
}

/* Clase para animaciones al hacer scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Estilo para los bordes con gradiente en las tarjetas */
.gradient-border {
    position: relative;
    background: rgba(31, 41, 55, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gradient-border:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    border: 2px solid transparent;
    background: linear-gradient(120deg, rgba(79, 70, 229, 0), rgba(168, 85, 247, 0)) border-box;
    -webkit-mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) padding-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    transition: background 0.4s ease;
    z-index: 0;
}

.gradient-border:hover::before {
    background: linear-gradient(120deg, #4f46e5, #a855f7) border-box;
}

.gradient-border>* {
    position: relative;
    z-index: 1;
}

.imagen-servicios {
    width: 80px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Estilos para el Chatbot */
/*
#chatbot-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #4f46e5, #a855f7);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
}

#chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(121, 95, 247, 0.5);
}

#chatbot-window {
    position: fixed;
    bottom: 7rem;
    right: 2rem;
    width: 90%;
    max-width: 400px;
    height: 500px;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    z-index: 999;
}

#chatbot-window.visible {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.chat-message {
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    max-width: 80%;
    line-height: 1.5;
}

.user-message {
    background-color: #3b82f6;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
}

.bot-message {
    background-color: #374151;
    color: #d1d5db;
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
}
*/

/* === INICIO: Animación Logo Hero === */
.logo-animation-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.logo-text-wrapper {
    display: inline-block;
    opacity: 0;
    clip-path: inset(0 50% 0 50%);
    animation: reveal-text 0.8s ease-out 0.7s forwards;
}

.logo-bracket {
    display: inline-block;
    opacity: 0;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateZ(0);
}

.bracket-left {
    animation:
        appear-center-left 0.5s ease-out forwards,
        move-left 0.8s ease-in-out 0.5s forwards;
}

.bracket-right {
    animation:
        appear-center-right 0.5s ease-out forwards,
        move-right 0.8s ease-in-out 0.5s forwards;
}

@keyframes reveal-text {
    from {
        opacity: 0;
        clip-path: inset(0 50% 0 50%);
    }

    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

@keyframes appear-center-left {
    from {
        opacity: 0;
        transform: translateX(1.8em);
    }

    to {
        opacity: 1;
        transform: translateX(1.8em);
    }
}

@keyframes move-left {
    from {
        transform: translateX(1.8em);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes appear-center-right {
    from {
        opacity: 0;
        transform: translateX(-1.8em);
    }

    to {
        opacity: 1;
        transform: translateX(-1.8em);
    }
}

@keyframes move-right {
    from {
        transform: translateX(-1.8em);
    }

    to {
        transform: translateX(0);
    }
}

/* === FIN: Animación Logo Hero === */

/* --- Estilos para el Nav Activo (Scroll Spy) --- */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, #60a5fa, #a855f7);
    transition: width 0.3s ease-out;
}

.nav-link.active {
    color: #ffffff;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* === NUEVO: Estilos para la sección Sobre Nosotros (Imágenes flotantes) === */

.owners-container {
    perspective: 1000px;
    /* Da profundidad 3D para la rotación */
}

.owner-card img {
    /* Filtro leve para unificar tono (opcional), se puede quitar si las fotos son buenas */
    filter: brightness(0.9) contrast(1.1);
    transition: all 0.5s ease;
}

.owner-card:hover img {
    filter: brightness(1.1) contrast(1.1);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
    /* Brillo azul al pasar el mouse */
    z-index: 50;
    /* Traer al frente */
}

/* Ajustes Responsive para la sección de fotos */
@media (max-width: 768px) {
    .owners-container {
        height: 300px;
        /* Menor altura en celular para que no ocupe tanto */
        transform: scale(0.9);
    }

    /* En móvil las fotos laterales se pegan un poco más al centro */
    .owner-card.left-0 {
        left: -10px;
    }

    .owner-card.right-0 {
        right: -10px;
    }
}

.perspective-container {
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Efecto rebote suave */
    transform-style: preserve-3d;
    /* Variables CSS para el efecto Tilt (inclinación) */
    --rotateX: 0deg;
    --rotateY: 0deg;
}

/* Esta clase se añade con JS al hacer click */
.is-flipped .card-inner {
    transform: rotateY(180deg);
}

.user-message {
    background-color: #3b82f6;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
}

.bot-message {
    background-color: #374151;
    color: #d1d5db;
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
}

/* === INICIO: Animación Logo Hero === */
.logo-animation-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.logo-text-wrapper {
    display: inline-block;
    opacity: 0;
    clip-path: inset(0 50% 0 50%);
    animation: reveal-text 0.8s ease-out 0.7s forwards;
}

.logo-bracket {
    display: inline-block;
    opacity: 0;
    background: #60a5fa;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: translateZ(0);
}

.bracket-left {
    animation:
        appear-center-left 0.5s ease-out forwards,
        move-left 0.8s ease-in-out 0.5s forwards;
}

.bracket-right {
    animation:
        appear-center-right 0.5s ease-out forwards,
        move-right 0.8s ease-in-out 0.5s forwards;
}

@keyframes reveal-text {
    from {
        opacity: 0;
        clip-path: inset(0 50% 0 50%);
    }

    to {
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

@keyframes appear-center-left {
    from {
        opacity: 0;
        transform: translateX(1.8em);
    }

    to {
        opacity: 1;
        transform: translateX(1.8em);
    }
}

@keyframes move-left {
    from {
        transform: translateX(1.8em);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes appear-center-right {
    from {
        opacity: 0;
        transform: translateX(-1.8em);
    }

    to {
        opacity: 1;
        transform: translateX(-1.8em);
    }
}

@keyframes move-right {
    from {
        transform: translateX(-1.8em);
    }

    to {
        transform: translateX(0);
    }
}

/* === FIN: Animación Logo Hero === */

/* --- Estilos para el Nav Activo (Scroll Spy) --- */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(to right, #60a5fa, #a855f7);
    transition: width 0.3s ease-out;
}

.nav-link.active {
    color: #ffffff;
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%;
}

/* === NUEVO: Estilos para la sección Sobre Nosotros (Imágenes flotantes) === */

.owners-container {
    perspective: 1000px;
    /* Da profundidad 3D para la rotación */
}

.owner-card img {
    /* Filtro leve para unificar tono (opcional), se puede quitar si las fotos son buenas */
    filter: brightness(0.9) contrast(1.1);
    transition: all 0.5s ease;
}

.owner-card:hover img {
    filter: brightness(1.1) contrast(1.1);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
    /* Brillo azul al pasar el mouse */
    z-index: 50;
    /* Traer al frente */
}

/* Ajustes Responsive para la sección de fotos */
@media (max-width: 768px) {
    .owners-container {
        height: 300px;
        /* Menor altura en celular para que no ocupe tanto */
        transform: scale(0.9);
    }

    /* En móvil las fotos laterales se pegan un poco más al centro */
    .owner-card.left-0 {
        left: -10px;
    }

    .owner-card.right-0 {
        right: -10px;
    }
}

.perspective-container {
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Efecto rebote suave */
    transform-style: preserve-3d;
    /* Variables CSS para el efecto Tilt (inclinación) */
    --rotateX: 0deg;
    --rotateY: 0deg;
}

/* Esta clase se añade con JS al hacer click */
.is-flipped .card-inner {
    transform: rotateY(180deg);
}

/* Si NO está girada, aplicamos la inclinación del mouse (Tilt) */
.card-wrapper:not(.is-flipped) .card-inner {
    transform: rotateX(var(--rotateX)) rotateY(var(--rotateY));
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    /* Oculta la cara trasera */
    -webkit-backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
}

.card-back {
    transform: rotateY(180deg) translateZ(1px);
}

.card-front {
    transform: translateZ(1px);
}

.glare-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at var(--glareX) var(--glareY),
            rgba(255, 255, 255, 0.15) 0%,
            transparent 80%);
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: overlay;
    z-index: 20;
    /* Ensure glare is on top */
}

.card-wrapper:hover:not(.is-flipped) .glare-overlay {
    opacity: 1;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.floating-icon {
    animation: float 4s ease-in-out infinite;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
    /* Helps with nested 3D elements */
}

/* === NUEVO: Efecto de Brillo/Reflejo en Texto === */
.shiny-text {
    background: linear-gradient(to right,
            #b8b8b8 0%,
            #ffffff 50%,
            #b8b8b8 100%);
    background-size: 200% auto;
    color: #fff;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* === NUEVO: Animación Infinite Scroll (Carrusel Móvil) === */
@keyframes infinite-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.animate-infinite-scroll {
    animation: infinite-scroll 20s linear infinite;
}

.animate-infinite-scroll:hover {
    animation-play-state: paused;
}

/* Máscara de gradiente para suavizar bordes del carrusel */
.mask-gradient {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Ocultar scrollbar pero permitir scroll */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* === NUEVO: Estilos para la sección Conoce al Equipo === */
.team-member {
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-photo {
    border-color: var(--cup-color);
}

.social-icon-link .w-10 {
    transition: all 0.3s ease;
}

.social-icon-link:hover .w-10 {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* === Custom Colors === */
:root {
    --cup-color: #60a5fa;
    /* Color de los brackets del hero (< >) */
}

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

.border-cup {
    border-color: var(--cup-color);
}

/* Animation for floating effect */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.member-photo-container {
    animation: float 6s ease-in-out infinite;
}

/* === NUEVO: Estilos para el Carrusel del Equipo (Móvil) === */
.swiper-button-next,
.swiper-button-prev {
    color: #60a5fa !important;
    /* Azul cup-color */
    transform: scale(0.7);
}

@media (min-width: 768px) {

    /* En desktop, desactivamos estilos de Swiper que puedan interferir con el grid */
    .team-slider .swiper-wrapper {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
    }

    .team-slider .swiper-slide {
        height: auto;
        width: auto !important;
        /* Sobrescribir ancho de Swiper */
    }
}