@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;600&display=swap');

:root {
    --primary: #ffffff;
    --bg-dark: #0a0a0a;
    --accent: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Evita que el navbar fijo tape el título de la sección */
}

body {
    background-color: var(--bg-dark);
    color: var(--primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

h1, h2, .brand-font {
    font-family: 'Playfair Display', serif;
}

/* Efecto de Vidrio mejorado */
.glass {
    background: rgba(255, 255, 255, 0.02);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-10px) scale(1.02);
}

/* FONDO DE PUNTOS ANIMADOS GOOOD*/
.particles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
}

.dot {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    from { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    to { transform: translateY(-100vh) translateX(20px); opacity: 0; }
}

/* Partículas exclusivas para Programación (más densas y variadas) */
.programming-dot {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: float-programming linear forwards;
    contain: layout paint style;
    will-change: transform, opacity;
}

@keyframes float-programming {
    from { transform: translateY(0) translateX(0); }
    to { transform: translateY(-120vh) translateX(30px); }
}

/* Gradiente animado para el Hero */
.hero-gradient {
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #000 100%);
    background-size: 200% 200%;
    animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #888 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-outline {
    position: relative;
    border: 1px solid white;
    padding: 12px 30px;
    overflow: hidden;
    transition: color 0.4s;
    z-index: 1;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    transform: translateX(-110%);
    transition: transform 0.35s cubic-bezier(0.2,0.8,0.2,1);
    z-index: -1;
}

.btn-outline:hover::before {
    transform: translateX(0);
}

.btn-outline:hover {
    color: black;
}

/* Ensure outline buttons don't become full-width blocks */
.btn-outline {
    display: inline-block;
    white-space: normal; /* Permite wrapping en texto largo */
    text-align: center; /* Asegura centrado del texto en multiples lineas */
    box-sizing: border-box;
}

/* Animaciones de aparición */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
}

.portfolio-item i {
    transition: all 0.5s ease;
}

.portfolio-item:hover i {
    transform: scale(1.2);
    color: white;
}

/* Estilo específico para el logo del águila */
.logo-eagle {
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.5));
    transition: filter 0.5s ease;
}

.logo-eagle:hover {
    filter: drop-shadow(0 0 30px rgba(255,255,255,0.8));
}

/* Nuevas clases para reemplazar estilos en línea (inline-styles) */

/* Brillo del águila en el Hero */
.eagle-glow {
    filter: drop-shadow(0 0 25px rgba(30,230,255,0.3));
}

/* Fondo de puntos decorativo dentro del chat */
.chat-bg-dots {
    background-image: radial-gradient(#fff 1px, transparent 1px);
    background-size: 20px 20px;
}

/* contactos */

/* Personalización de input autofill para que no rompa el diseño */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
    -webkit-text-fill-color: #000;
    -webkit-box-shadow: 0 0 0px 1000px #fff inset;
    transition: background-color 5000s ease-in-out 0s;
}
/* Clase para mensajes de error generados por JS */
.error-msg {
    color: #dc2626; /* red-600 */
    font-size: 0.75rem; /* text-xs */
    margin-top: 0.25rem;
}   

/* photos */
/* Ocultar barra de scroll en contenedores específicos si es necesario */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
    .no-scrollbar {
    -ms-overflow-style: none; /* IE y Edge antiguo */
    scrollbar-width: none; /* Firefox */
    }

/* 3D Carousel Styles */
.carousel-container {
    perspective: 1500px;
    perspective-origin: 50% 35%; /* Mirar sutilmente desde arriba */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.carousel-3d {
    position: relative;
    width: 280px;
    height: 380px;
    transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: rotateX(-8deg); /* Inclinación mucho más sutil */
}

.carousel-item {
    position: absolute;
    width: 280px;
    height: 380px;
    left: 0;
    top: 0;
    background: #f3f4f6;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.5s ease;
    backface-visibility: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
}

.carousel-item.active {
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
.carousel-3d {
    width: 220px;
    height: 300px;
    }
.carousel-item {
    width: 220px;
    height: 300px;
    }
}

/* Service Card Carousel */
.service-carousel-container {
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}

.service-carousel {
    width: 100%;
    height: 100%;
}

/* Estilos base para evitar saltos visuales */
.carousel {
    display: flex !important;
    gap: 16px;
    overflow-x: hidden;
    scroll-behavior: auto; /* Importante para que el JS no pelee con el CSS */
    width: 100%;
    user-select: none;
    cursor: grab;
}

.carousel:active {
    cursor: grabbing;
}

.carousel-item {
    flex-shrink: 0;
}

/* Ocultar el carrusel hasta que esté listo para evitar el flash vertical */
.carousel-wrap {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    min-height: 40vh; /* Reserva el espacio para que la página no salte */
}

.carousel-wrap.ready {
    opacity: 1;
    visibility: visible;
}

/* OPTIMIZACIONES DE RENDIMIENTO (FPS FIX) */
.carousel-item, 
.portfolio-item, 
.service-carousel,
.carousel-3d,
.dot {
    will-change: transform; /* Prepara al navegador para animaciones */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0); /* Fuerza el uso de la GPU */
}

/* Reducir carga de blur en scroll para evitar lag */
.glass {
    transform: translateZ(0);
}

/* Optimización de partículas */
.dot {
    contain: layout paint style; /* Aísla el renderizado de cada punto */
}

/* Si hay mucho lag, suavizamos el desenfoque */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    /* Específico para Chrome/Brave/Opera */
    .glass {
        backdrop-filter: blur(8px); /* Reducimos ligeramente el blur para ganar FPS */
    }
}


