/* Variables y Resets */
:root {
    --color-primary: #ff7f50; /* Azul Apple */
    --color-dark: #1c1c1e; /* Fondo oscuro moderno */
    --color-light: #f5f5f7; /* Blanco roto */
    --color-text: #ffffff; /* Texto principal */
    --font-family: 'SF Pro Display', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--color-dark);
    color: var(--color-text);
    scroll-behavior: smooth;
    overflow-x: hidden; /* Evitar scroll horizontal */
}

/* ------------------------------------------------------------------- */
/* UTILERÍAS DE ACCESIBILIDAD */
/* ------------------------------------------------------------------- */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}


/* ------------------------------------------------------------------- */
/* Barra de Navegación */
/* ------------------------------------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 1000;
    background-color: rgba(28, 28, 30, 0.9); 
    backdrop-filter: blur(10px); 
    transition: all 0.3s ease-in-out;
}

.logo {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-light);
}

.navbar nav a {
    color: var(--color-light);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.95em;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.navbar nav a:hover {
    opacity: 1;
}

/* Estilo para el botón de hamburguesa (oculto por defecto en desktop) */
.menu-toggle {
    display: none; 
    cursor: pointer;
    font-size: 1.8em;
    color: var(--color-light);
}

/* ------------------------------------------------------------------- */
/* Secciones de Pantalla Completa (Full-Screen) */
/* ------------------------------------------------------------------- */
.full-screen {
    min-height: 100vh; /* Usamos min-height para evitar cortes de contenido en mobile */
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 100px 20px; /* Padding general para mejor espaciado */
    transition: opacity 1.5s ease-out, transform 1s ease-out;
}

.hidden {
    opacity: 0;
    transform: translateY(50px); 
    pointer-events: none;
}

.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Contenido dentro de las Secciones */
.content-wrapper {
    max-width: 1000px;
    padding: 40px;
    width: 100%;
}

.full-screen h1, .full-screen h2 {
    font-size: 3.5em;
    font-weight: 600;
    margin-bottom: 20px;
}

.full-screen p {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 30px;
    opacity: 0.8;
}

/* Botón de Llamada a la Acción (CTA) */
.cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--color-primary);
    color: var(--color-dark); 
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-button:hover {
    background-color: #005bb5;
    transform: scale(1.05);
}

/* ------------------------------------------------------------------- */
/* SECCIÓN INICIO (VIDEO) */
/* ------------------------------------------------------------------- */
#inicio {
    overflow: hidden; 
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; 
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(28, 28, 30, 0.6); 
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover; 
}


/* ------------------------------------------------------------------- */
/* SECCIÓN IDENTIDAD (MVV) - NUEVOS ESTILOS */
/* ------------------------------------------------------------------- */
.mvv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    text-align: left;
}

.mvv-card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    height: 100%;
}

.mvv-card h3 {
    color: var(--color-primary);
    font-size: 1.5em;
    margin-bottom: 15px;
}

.mvv-card p {
    font-size: 1em;
    margin-bottom: 0;
    opacity: 0.9;
}

.values-list {
    margin-top: 40px;
    text-align: center;
}

.value-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.value-tags span {
    background-color: #2c2c2e;
    color: var(--color-light);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    border: 1px solid var(--color-primary);
}

/* ------------------------------------------------------------------- */
/* SECCIÓN HISTORIA (MOSAICO) */
/* ------------------------------------------------------------------- */
.photo-mosaic {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    grid-auto-rows: 150px;
    gap: 10px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.mosaic-item {
    overflow: hidden;
    border-radius: 8px;
}

.mosaic-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.mosaic-item:hover img {
    transform: scale(1.1);
}

/* Tamaños diferentes para un efecto de mosaico más dinámico */
.mosaic-item:nth-child(3n+1) {
    grid-column: span 2;
    grid-row: span 1;
}
.mosaic-item:nth-child(4n+2) {
    grid-column: span 1;
    grid-row: span 2;
}


/* ------------------------------------------------------------------- */
/* SECCIÓN PROYECTOS (GALERÍA 4 COLUMNAS) */
/* ------------------------------------------------------------------- */
.gallery-proyectos {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 25px;
    margin-top: 40px;
}

.project-card {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5); 
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.project-card figcaption {
    padding: 20px;
}

.project-card h3 {
    margin-bottom: 5px;
    color: var(--color-light);
}

.project-card p {
    font-size: 0.9em;
    opacity: 0.7;
    margin: 0;
}


/* ------------------------------------------------------------------- */
/* SECCIÓN MAQUINARIA (TARJETAS) */
/* ------------------------------------------------------------------- */
.machinery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.machinery-card {
    background-color: #2c2c2e; 
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.machinery-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.machinery-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.machinery-title h3 {
    font-size: 1.2em;
    margin: 0;
}

/* Personalización del Checkbox */
.machinery-title input[type="checkbox"] {
    appearance: none; 
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s, border-color 0.2s;
}

.machinery-title input[type="checkbox"]:checked {
    background-color: var(--color-primary);
}

.machinery-title input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: -2px;
    left: 2px;
    font-size: 14px;
    color: var(--color-dark); 
}

.machinery-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.info-polaroid {
    background: rgba(255, 255, 255, 0.1); 
    color: var(--color-text);
    padding: 10px;
    border-radius: 4px;
    font-size: 0.85em;
    text-align: center;
    box-shadow: none;
}

.info-polaroid strong {
    display: block;
    font-size: 0.9em;
    opacity: 0.7;
    color: var(--color-primary); 
}

/* ------------------------------------------------------------------- */
/* SECCIÓN SERVICIOS (LISTA Y CARDS ESPECIALES) */
/* ------------------------------------------------------------------- */
.special-services {
    margin-bottom: 40px;
}

.service-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.service-list li {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 8px;
    text-align: left;
    font-size: 1.05em;
    transition: background-color 0.3s;
    border-left: 3px solid var(--color-primary);
}

.service-list li:hover {
    background-color: rgba(0, 122, 255, 0.1);
}



/* ------------------------------------------------------------------- */
/* PIE DE PÁGINA */
/* ------------------------------------------------------------------- */
.site-footer {
    text-align: right;
    padding: 30px 20px;
    background-color: var(--color-dark); 
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9em;
    opacity: 0.9;
}

.site-footer p {
    margin: 10px 0;
    line-height: 1.5;
}

.site-footer a {
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.3s;
}

.site-footer a:hover {
    opacity: 0.7;
}

.footer-contact {
    margin-top: 10px;
    font-size: 0.85em;
    opacity: 0.8;
}

/* Contacto (Formulario) */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
    text-align: left;
}

.contact-form input, 
.contact-form textarea {
    padding: 15px;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
    font-size: 1em;
}

.contact-form button {
    cursor: pointer;
    background-color: var(--color-primary);
    color: var(--color-dark);
    font-weight: 600;
    border: none;
    padding: 15px;
    border-radius: 50px;
    transition: background-color 0.3s;
}


/* ------------------------------------------------------------------- */
/* MEDIA QUERIES (RESPONSIVE DESIGN) */
/* ------------------------------------------------------------------- */
@media (max-width: 768px) {
    
    /* Adaptación de la Barra de Navegación */
    .navbar {
        padding: 15px 25px;
    }

    .navbar nav {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 60px; 
        left: 0;
        width: 100%;
        background-color: rgba(28, 28, 30, 0.95);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 10px 0;
    }
    
    .navbar nav.active {
        display: flex; 
    }

    .navbar nav a {
        margin: 0;
        padding: 15px 25px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        text-align: left;
    }
    
    .menu-toggle {
        display: block;
    }
    
    /* Adaptación del Contenido de las Secciones */
    .full-screen {
        padding: 80px 15px;
        min-height: auto; 
    }

    .full-screen h1 {
        font-size: 2.5em;
    }
    
    .full-screen h2 {
        font-size: 2em;
    }

    .full-screen p {
        font-size: 1em;
    }
    
    /* Ajuste de Identidad (MVV) */
    .mvv-grid {
        grid-template-columns: 1fr;
    }
    .mvv-card {
        padding: 20px;
    }

    .value-tags {
        justify-content: flex-start;
    }

    .gallery-proyectos {
        grid-template-columns: 1fr; 
    }

    .project-card img {
        width: 100%; 
        min-height: 180px;
    }

    .machinery-grid {
        grid-template-columns: 1fr;
    }
    
    .service-list {
        grid-template-columns: 1fr; 
    }

}

/* ------------------------------------------------------------------- */
/* MEDIA QUERIES (AJUSTES ADICIONALES) */
/* ------------------------------------------------------------------- */
@media (max-width: 768px) {
    .gallery-proyectos {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }
}
/* ------------------------------------------------------------------- */
/* Estilos para el Mapa de Contacto */
/* ------------------------------------------------------------------- */

/* Contenedor del mapa para darle margen superior y limitar el ancho */
.map-container {
    margin-top: 50px; /* Separación del formulario */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    overflow: hidden; /* Oculta los bordes del iframe */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5); /* Sombra para destacarlo */
}

.map-container iframe {
    /* Asegura que el iframe ocupe todo el contenedor */
    width: 100%;
    /* La altura se controla por el atributo 'height' del iframe en el HTML */
    display: block;
}

/* Ajuste Responsive para que el mapa se vea mejor en móvil */
@media (max-width: 768px) {
    .map-container {
        margin-top: 30px;
        /* Puedes ajustar la altura del iframe si quieres un 'minimapa' más pequeño en móvil */
    }
    .map-container iframe {
        height: 300px; /* Una altura más compacta para dispositivos pequeños */
    }
}
