/* ===================================================================
   HOJA DE ESTILOS PARA CCS TECNOLÓGICA
   Versión 2.2 - Con nueva paleta de color y mejoras de UI
   =================================================================== */

/* --- 1. VARIABLES GLOBALES Y CONFIGURACIÓN BASE --- */
:root {
    --dark-gray: #222222;
    --medium-gray: #333;
    --light-gray: #f4f4f4;
    --accent-color: #007BFF; /* NUEVO: Azul profesional como color de acento */
    --white: #ffffff;
    --font-family: 'Poppins', sans-serif;
    --transition-speed: 0.3s;
    --border-radius: 8px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    margin: 0;
    font-family: var(--font-family);
    background-color: var(--white);
    color: var(--dark-gray);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-weight: 600;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-gray);
}

section {
    padding: 6rem 0;
}

a {
    color: var(--accent-color);
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: #0056b3; /* Un azul más oscuro para el hover */
}

/* --- 2. BARRA DE NAVEGACIÓN (HEADER) --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

#main-header.scrolled {
    background-color: rgba(34, 34, 34, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    height: 50px;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center; /* Alinear verticalmente los ítems */
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a.cta-button {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all var(--transition-speed) ease;
}

.nav-links a.cta-button:hover {
    color: var(--white);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.4);
}

/* Estilo MEJORADO para el ícono de WhatsApp en la navegación */
.nav-links .whatsapp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #25D366;
    color: var(--white);
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-right: 0.5rem;
}

.nav-links .whatsapp-icon:hover {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
}


/* --- 3. SECCIÓN PRINCIPAL (HERO) --- */
#hero {
    position: relative;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 2rem;
    overflow: hidden;
}

#hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: -2;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-button {
    background-color: var(--white);
    color: var(--dark-gray);
    padding: 1rem 2.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-button:hover {
    background-color: var(--accent-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

.volume-button {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: all var(--transition-speed) ease;
}

.volume-button:hover {
    background: rgba(0, 123, 255, 0.2);
    border-color: var(--accent-color);
}

.scroll-down-arrow {
    display: block;
    margin: 60px auto 0;
    color: var(--white);
    font-size: 2rem;
    text-decoration: none;
    animation: float 2.5s infinite ease-in-out;
}

@keyframes float {
  0% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-15px); opacity: 1; }
  100% { transform: translateY(0); opacity: 0.8; }
}

/* --- 4. SECCIÓN PROYECTOS --- */
#proyectos {
    background-color: var(--light-gray);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    margin: 1.5rem 1.5rem 0.5rem;
    color: #1a1a1a;
}

.project-card p {
    margin: 0 1.5rem 1.5rem;
    font-size: 0.95rem;
    color: #555;
}

/* Archivo: style.css */

/* ============================================= */
/* 5. SECCIÓN DE MARCAS (CON CARRUSEL)             */
/* ============================================= */

#marcas .subtitle {
    text-align: center;
    max-width: 600px;
    margin: -1.5rem auto 4rem; /* Aumentamos el margen inferior */
    color: #666;
}

/* El contenedor principal del carrusel */
.logo-carousel {
    position: relative;
    width: 100%;
    overflow: hidden; /* Oculta los logos que están fuera de la pantalla */
    /* Máscara con gradiente para que los logos aparezcan y desaparezcan suavemente */
    -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0));
    mask-image: linear-gradient(to right, rgba(0,0,0,0), rgba(0,0,0,1) 15%, rgba(0,0,0,1) 85%, rgba(0,0,0,0));
}

/* La 'pista' que contiene todos los logos y que se animará */
.logo-slide-track {
    display: flex;
    /* Ancho total: (Nº de logos) x (ancho de cada logo + margen) */
    /* En nuestro caso: 16 logos * 200px = 3200px */
    width: calc(200px * 16);
    animation: scroll 30s linear infinite; /* La animación que lo mueve */
}

/* Pausa la animación cuando el cursor está sobre el carrusel */
.logo-carousel:hover .logo-slide-track {
    animation-play-state: paused;
}

/* La animación de desplazamiento infinito */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        /* Mueve la pista la mitad de su ancho total */
        transform: translateX(calc(-200px * 8));
    }
}

/* Estilos para cada logo individual */
.logo-slide-track img {
    height: 60px; /* Altura fija para todos los logos */
    width: 200px; /* Ancho y espacio entre logos */
    padding: 0 40px;
    object-fit: contain; /* Asegura que el logo se vea bien sin deformarse */
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.4s ease;
}

/* Efecto al pasar el cursor sobre un logo */
.logo-slide-track img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* ============================================= */
/* 6. SECCIÓN DE CONTACTO (CÓDIGO A PRUEBA DE BALAS) */
/* ============================================= */

#contactos {
    /* ¡ESTA LÍNEA ES LA MÁS IMPORTANTE! Fuerza el fondo oscuro. */
    background-color: #222222 !important; 
    
    color: #f4f4f4; /* Color de texto general para la sección */
    padding: 6rem 0;
}

.contact-container {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.contact-info, .contact-form-wrapper {
    flex: 1;
}

.contact-logo {
    height: 60px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

/* Título "Hablemos de su Proyecto" */
.contact-info h3 {
    font-size: 2.2rem;
    color: #007BFF; /* Azul profesional */
    margin-bottom: 1rem;
}

/* Párrafo de descripción */
.contact-info .description-text {
    color: #b0b0b0; /* Gris claro para diferenciar */
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

/* Todos los párrafos con datos de contacto */
.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

/* Iconos */
.contact-info i {
    color: #007BFF; /* Azul profesional */
    margin-right: 15px;
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
}

/* Enlaces de la sección de contacto */
.contact-info a {
    color: #007BFF; /* AHORA EL COLOR AZUL ES EL PREDETERMINADO */
    text-decoration: none; /* Sin subrayado por defecto */
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Efecto al pasar el cursor sobre los enlaces */
.contact-info a:hover {
    /* Al pasar el cursor, se subraya para indicar que es un enlace */
    text-decoration: underline; 
}

/* Texto del RUC */
.contact-info .ruc-text {
    color: #007BFF; /* BLANCO PURO para el RUC */
    font-weight: 500;
}

/* Título del formulario */
.contact-form-wrapper h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #007BFF;
}

/* ... (el resto de los estilos del formulario no necesitan cambios) ... */

.form-group {
    margin-bottom: 1rem;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--medium-gray);
    background-color: var(--dark-gray);
    color: var(--white);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 1rem;
    box-sizing: border-box;
    transition: all var(--transition-speed) ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.submit-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

/* --- 7. FOOTER --- */
footer {
    background-color: #000;
    color: #aaa;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}

/* --- 8. ASISTENTE VIRTUAL (CHATBOT) --- */
.chat-bubble {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 9998;
    transition: transform 0.3s ease;
    animation: pulse 2.5s infinite 5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 350px;
    max-width: 90vw;
    height: 500px;
    max-height: 75vh;
    background-color: var(--white);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    transform: scale(0.5) translateY(50px);
    opacity: 0;
    visibility: hidden;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.chat-window.open {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: linear-gradient(90deg, var(--accent-color) 0%, #0056b3 100%);
    color: var(--white);
    padding: 1rem;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-close-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity var(--transition-speed) ease;
}

.chat-close-btn:hover {
    opacity: 1;
}

.chat-messages {
    flex-grow: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    padding: 0.7rem 1rem;
    border-radius: 18px;
    max-width: 80%;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.5s forwards;
}

.bot-message {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.user-message {
    background-color: var(--dark-gray);
    color: var(--white);
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chat-input-area {
    display: flex;
    border-top: 1px solid #e0e0e0;
    padding: 0.5rem;
    background-color: var(--light-gray);
}

#chat-input {
    flex-grow: 1;
    border: none;
    background: none;
    padding: 0.8rem;
    font-size: 1rem;
    outline: none;
    color: var(--dark-gray);
}

#chat-send-btn {
    background: none;
    border: none;
    color: var(--dark-gray);
    font-size: 1.2rem;
    padding: 0 1rem;
    cursor: pointer;
    transition: color var(--transition-speed) ease;
}

#chat-send-btn:hover {
    color: var(--accent-color);
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- 9. RESPONSIVIDAD --- */
@media (max-width: 768px) {
    h2 { font-size: 2rem; }
    .nav-links { display: none; } /* Ocultar menú en móvil, requeriría un menú hamburguesa */
    .hero-content h1 { font-size: 2.5rem; }
    .contact-container { flex-direction: column; }
    section { padding: 4rem 0; }
    .chat-window {
        width: 100%;
        height: 100%;
        max-height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }
    .volume-button { bottom: 20px; right: 20px; width: 45px; height: 45px; font-size: 1rem; }
    .scroll-down-arrow { margin-top: 30px; font-size: 1.5rem; }
}