/* Estilos generales */
:root {
    --primary-color: #0033a0;
    --secondary-color: #4d4d4d;
    --accent-color: #0066cc;
    --background-color: #e3dede; /* gris claro solicitado (#e3dede) */
    --text-color: #333;
    --highlight-color: #0066cc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Partículas de fondo */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--background-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Encabezado */
header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.logo {
    max-width: 150px;
    margin: 0 auto;
}

.logo img {
    width: 100%;
    height: auto;
}

/* Contenido principal */
main {
    flex: 1;
}

.content {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 1px;
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.separator {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 1rem auto;
    border-radius: 2px;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Animación de impresora 3D */
.construction-animation {
    margin: 1rem auto;
    position: relative;
    height: 100px;
    width: 100px;
}

.printer {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.printer-icon {
    font-size: 5rem;
    color: var(--primary-color);
    animation: pulse 2s infinite ease-in-out;
}

/* Movimiento del hotend (extrusor) dentro del SVG */
.printer-icon .hotend {
    transform-box: fill-box;
    transform-origin: 50% 0%;
    animation: hotend-scan 2.5s ease-in-out infinite alternate;
}

.printing-layer {
    position: absolute;
    bottom: 24px; /* alineado con la cama del SVG */
    left: 10px;   /* coincide con el marco del SVG */
    width: 0;
    height: 5px;
    background-color: var(--accent-color);
    border-radius: 2px;
    animation: printing-grow 4s infinite linear alternate;
}

@keyframes printing {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-40px);
        opacity: 0;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Barrido horizontal del hotend dentro del marco */
@keyframes hotend-scan {
    0% { transform: translateX(-20px); }
    100% { transform: translateX(20px); }
}

/* Crecimiento de la capa de impresión sobre la cama */
@keyframes printing-grow {
    0% { width: 0; }
    100% { width: 80px; }
}

/* Elementos de construcción */
.construction-elements {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.element {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 51, 160, 0.05);
    padding: 1rem;
    border-radius: 8px;
    width: 130px;
    transition: all 0.3s ease;
}

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

.element i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.element span {
    font-weight: 500;
    color: var(--secondary-color);
}

/* Información */
.info {
    margin-top: 2rem;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.info p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info ul {
    list-style: none;
}

.info li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
}

.info li i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* Pie de página */
footer {
    margin-top: 1.5rem;
    text-align: center;
}

.contact {
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    margin: 0.8rem 0;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin: 0 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.email {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 0.8rem;
    cursor: default; /* ya no es clicable */
    display: inline-block;
}

.email:hover {
    text-decoration: none;
}

.copyright {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Formulario de contacto */
.contact-form-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--secondary-color);
    text-align: left;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.submit-btn,
.cancel-btn,
.close-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    margin-right: 1rem;
}

.submit-btn:hover {
    background-color: var(--accent-color);
}

.cancel-btn {
    background-color: #e0e0e0;
    color: var(--secondary-color);
}

.cancel-btn:hover {
    background-color: #d0d0d0;
}

/* Mensaje de confirmación */
.confirmation-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.confirmation-content {
    background-color: white;
    padding: 2.5rem;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.5s ease-out;
}

.confirmation-content i {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.confirmation-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.confirmation-content p {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.close-btn {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 2rem;
}

.close-btn:hover {
    background-color: var(--accent-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Efectos adicionales */
.content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, transparent 70%, rgba(0, 51, 160, 0.1));
}

.content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(315deg, transparent 70%, rgba(0, 51, 160, 0.1));
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .content {
        padding: 2rem 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
}