/* ==========================================
   PALETA DE COLORES Y VARIABLES GLOBALES
   ========================================== */
:root {
    --azul-xtech: #0046ad;
    --azul-oscuro: #002d72;
    --blanco: #ffffff;
    --gris-fondo: #f4f7f9;
    --texto-principal: #1e293b;
    --texto-secundario: #475569;
}

/* ==========================================
   ESTILOS BASE
   ========================================== */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--gris-fondo);
    color: var(--texto-principal);
    line-height: 1.6;
}

/* ==========================================
   ENCABEZADO Y NAVEGACIÓN (HEADER)
   ========================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0); 
    z-index: 1000;
    transition: all 0.4s ease;
    padding: 20px 0;
}

header.scrolled {
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 5%;
    box-sizing: border-box;
}

/* ==========================================
   LOGOTIPO (EFECTO ESFERA 3D)
   ========================================== */
.logo a {
    display: inline-block;
    border-radius: 50%;
    transition: all 0.4s ease;
}

.logo img {
    height: 100px;
    width: 100px;
    object-fit: cover;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 
        inset -8px -10px 15px rgba(0, 0, 0, 0.15),
        inset 5px 8px 12px rgba(255, 255, 255, 0.9),
        0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
}

.logo img:hover {
    transform: scale(1.08) translateY(-5px);
    box-shadow: 
        inset -8px -10px 15px rgba(0, 0, 0, 0.15),
        inset 5px 8px 12px rgba(255, 255, 255, 0.9),
        0 15px 25px rgba(0, 0, 0, 0.4);
}

header.scrolled .logo a {
    background: transparent;
    border: none;
    box-shadow: none;
    transform: translateY(0);
    padding: 0;
}

header.scrolled .logo img {
    height: 70px;
    width: 70px;
    box-shadow: 
        inset -5px -5px 10px rgba(0, 0, 0, 0.1),
        inset 5px 5px 10px rgba(255, 255, 255, 0.9),
        0 4px 10px rgba(0, 0, 0, 0.15);
}

/* ==========================================
   MENÚ DE OPCIONES
   ========================================== */
nav {
    margin-left: auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
}

nav a {
    text-decoration: none;
    color: var(--blanco);
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s, text-shadow 0.3s;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

header.scrolled nav a {
    color: var(--azul-oscuro);
    text-shadow: none;
}

nav a:hover, header.scrolled nav a:hover {
    color: var(--azul-xtech);
}

/* ==========================================
   SECCIÓN SUPERIOR (COMPARTIDA)
   ========================================== */
.top-section, .hero-home {
    background-image: linear-gradient(rgba(0, 45, 114, 0.75), rgba(0, 45, 114, 0.6)), url('fondo_header.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--blanco);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-home {
    height: 100vh;
}

.top-section {
    padding-top: 150px;
    padding-bottom: 100px;
}

.hero-home h1, .top-section h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    padding: 0 20px;
}

.hero-home p {
    font-size: 1.2rem;
    max-width: 650px;
}

/* ==========================================
   CONTENEDORES Y TARJETAS (CARDS)
   ========================================== */
.content-container {
    max-width: 900px;
    margin: -60px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.card {
    background-color: var(--blanco);
    padding: 40px 50px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    border-left: 8px solid var(--azul-xtech);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card h2 {
    color: var(--azul-oscuro);
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 15px;
}

.card p {
    font-size: 1.1rem;
    color: var(--texto-secundario);
}

/* ==========================================
   SECCIONES DE DOS COLUMNAS E IMÁGENES
   ========================================== */
.info-section, .visor-section, .section-container {
    padding: 80px 10%;
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.info-section {
    background-color: var(--blanco);
}

.info-image, .visor-text, .section-left {
    flex: 1;
}

.info-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.info-text, #canvas-3d, .visor-3d {
    flex: 1;
}

.info-text h2, .visor-text h2, .section-left h2 {
    font-size: 2.5rem;
    color: var(--azul-oscuro);
    margin-bottom: 20px;
}

.info-text p, .visor-text p, .section-left p {
    font-size: 1.1rem;
    color: var(--texto-secundario);
}

.visor-3d {
    height: 450px;
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* ==========================================
   PIE DE PÁGINA (FOOTER)
   ========================================== */
footer {
    text-align: center;
    padding: 40px;
    background-color: var(--azul-oscuro);
    color: var(--blanco);
    font-size: 0.9rem;
    margin-top: auto;
}

/* ==========================================
   RESPONSIVE DESIGN (SOLUCIÓN PARA MÓVILES)
   ========================================== */
@media (max-width: 768px) {
    /* 1. Ajuste del menú y logo para que no ocupen todo el espacio */
    header {
        padding: 10px 0; /* Menos espacio arriba y abajo del menú */
    }
    
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }

    nav {
        margin-left: 0;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px; /* Opciones del menú más juntas */
    }

    nav a {
        font-size: 0.85rem; /* Letra del menú más pequeña */
    }

    /* Achicamos la esfera en móviles para que no estorbe */
    .logo img {
        height: 65px;
        width: 65px;
    }

    /* 2. Achicamos los textos gigantes del banner */
    .hero-home h1, .top-section h1 {
        font-size: 1.8rem; /* ¡Pasamos de 3.5 a 1.8! */
        margin-top: 80px; /* Empuja el texto hacia abajo para que el menú no lo tape */
        padding: 0 15px;
    }

    .hero-home p {
        font-size: 1rem;
        padding: 0 15px;
    }

    /* 3. Ajuste de las tarjetas y secciones para que queden en una columna */
    .info-section, .visor-section, .section-container {
        flex-direction: column;
        padding: 50px 5%;
        text-align: center; /* Centramos el texto en el celular para mejor lectura */
    }
    
    .card {
        padding: 30px 25px; /* Menos margen interno en la tarjeta blanca */
    }

    .card h2, .info-text h2, .visor-text h2, .section-left h2 {
        font-size: 1.6rem; /* Achicamos los títulos secundarios */
    }

    .visor-3d {
        height: 250px; /* La foto de la pieza es más baja en celulares */
    }
}