body { 
    font-family: 'Segoe UI', sans-serif; 
    scroll-behavior: smooth; 
}
html {
  scroll-behavior: smooth;
}

.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../img/fondo-tecnologia1.jpg') center/cover no-repeat;
    color: white;
    text-align: center;
    overflow: hidden;
}

.animated-text {
    opacity: 1; /* Hacemos que sea visible desde el inicio para el script */
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s forwards;
}

.fade-in.delay { 
    animation-delay: 1s; /* Reducimos el delay para que aparezca más rápido */
}

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

.section-title { 
    margin-top: 60px; 
    margin-bottom: 40px; 
    font-weight: bold; 
}

.card-icon { 
    font-size: 2.5rem; 
    color: #0d6efd; 
    margin-bottom: 15px; 
}

.about-bg {
    background: url('../img/bg-about.svg') center center / cover no-repeat;
    padding: 80px 0;
    color: white;
    position: relative;
}

.about-bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(1, 29, 55, 0.8); /* Un color más corporativo */
    z-index: 1;
}

.about-bg .container {
    position: relative;
    z-index: 2;
}

footer a { 
    text-decoration: none; 
    transition: color 0.3s ease;
}
footer a:hover {
    color: #0d6efd !important;
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    padding: 15px;
    font-size: 24px;
    z-index: 999;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    transition: background-color 0.3s ease;
}

.whatsapp-float:hover { 
    background-color: #1ebd5a; 
}

#preloader {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    text-align: center;
    z-index: 1;
}

.spinner {
    width: 40px;
    height: 40px;
    margin-top: 20px;
    border: 4px solid #fff;
    border-top: 4px solid #0d6efd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin { 
    to { transform: rotate(360deg); } 
}

.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.navbar-brand img {
    height: 50px; /* Un poco más pequeño para un look más refinado */
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}
.navbar-nav .nav-link:hover {
    color: #0d6efd;
}

/* --- ESTILOS PARA SLIDER ANTES Y DESPUÉS --- */

.comparison-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3; /* LÍNEA AÑADIDA: Define la proporción (ancho / alto) */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    cursor: col-resize;
    height: 800px;
}

.before-image, .after-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.after-image {
    /* Por defecto, el "después" es visible */
    z-index: 1;
}

.before-image {
    /* El "antes" se recorta con JS */
    z-index: 2;
    width: 50%; /* Inicia a la mitad */
}

.slider-handle {
    position: absolute;
    top: 0;
    left: 50%; /* Inicia a la mitad */
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background-color: white;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-handle:before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid white;
    border-radius: 50%;
    transform: translateX(-18px); /* Centra el círculo */
}

.slider-arrow {
    width: 0;
    height: 0;
    border-style: solid;
    position: absolute;
}

.slider-arrow.left {
    border-width: 8px 10px 8px 0;
    border-color: transparent white transparent transparent;
    left: -15px;
}

.slider-arrow.right {
    border-width: 8px 0 8px 10px;
    border-color: transparent transparent transparent white;
    right: -15px;
}

/* Efecto para los íconos de servicios */
.card-icon {
    transition: transform 0.3s ease;
}
.col-md-6:hover .card-icon {
    transform: scale(1.1);
    color: #0d6efd; /* Color primario de Bootstrap */
}

/* Efecto para las imágenes de proyectos */
#proyectos img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#proyectos .col-md-4:hover img {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}