* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Roboto, sans-serif; }
html { scroll-behavior: smooth; }
body { line-height: 1.6; color: #333; background-color: #f9f9f9; overflow-x: hidden; }

/* NAVEGACIÓN */
header { 
    background: #1a2a3a; 
    color: white; 
    padding: 5px 5%; 
    position: fixed; 
    width: 100%; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); 
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    max-width: 1200px; 
    margin: 0 auto; 
}

/* Nuevo contenedor para alinear imagen y texto */
.logo-container {
    display: flex;
    flex-direction: row;
    align-items: center; /* Centra verticalmente el contenido */
    gap: 15px;            /* Espacio entre la imagen y el texto */
    cursor: default;    /* Indica que no es un enlace */
}

.header-logo-img {
    height: 60px;         /* Tamaño ajustado para reducir altura de barra */
    width: auto;
    display: block;
}

/* Ajustes del texto del logo */
/* (logo text removed - not used) */

/* Menú */
nav ul { display: flex; list-style: none; }

nav ul li a { 
    color: white; 
    text-decoration: none; 
    margin-left: 25px; 
    font-weight: 500; 
    transition: 0.3s; 
}

nav ul li a:hover { color: #3498db; }

.menu-hamburguesa {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    z-index: 1100;
    line-height: 1;
}

/* HERO */
.hero {
    position: relative;
    min-height: 85vh; display: flex; align-items: center; justify-content: center;
    text-align: center; color: white; padding: 140px 20px 80px;
    overflow: hidden;
}

.hero-slides {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}

.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0;
    animation: fade 15s infinite;
}
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }

@keyframes fade {
    0%, 33% { opacity: 0; }
    8%, 25% { opacity: 1; }
    33%, 100% { opacity: 0; }
}

/* put content above slides */
.hero-content { position: relative; z-index: 1; }

.hero-content { max-width: 900px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.experiencia-tag { background: #3498db; padding: 8px 20px; border-radius: 50px; font-weight: bold; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.1; font-weight: 800; }
.hero h1 span { color: #3498db; display: block; margin-top: 5px; }
.hero p { font-size: 1.3rem; max-width: 650px; opacity: 0.95; }

/* EMPRESA */
#empresa { padding: 100px 5%; background-color: #fff; }
.empresa-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: center; align-items: center; padding: 0 20px; gap: 40px; }
.empresa-image { flex: 1; max-width: 500px; }
.empresa-image img { width: 100%; height: auto; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.empresa-texto { flex: 1; text-align: left; max-width: 1000px; width: 100%; }
.empresa-texto p { max-width: 100%; margin-bottom: 20px; line-height: 1.8; }
.stats { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.stat-item { flex: 1; min-width: 80px; }
.stat-item strong { display: block; font-size: 2.5rem; color: #3498db; line-height: 1; }
.stat-item span { font-size: 0.85rem; color: #666; font-weight: bold; text-transform: uppercase; }
.empresa-imagenes-grid { flex: 1.2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.empresa-imagenes-grid img { width: 100%; height: 350px; object-fit: cover; border-radius: 12px; }

#servicios { padding: 100px 5%; max-width: 1400px; margin: 0 auto; text-align: center; }
.servicios-grid { display: grid; grid-template-columns: repeat(3, minmax(550px, 1fr)); gap: 30px; margin-top: 50px; justify-content: center; align-items: start; }
.servicios-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; justify-content: center; align-items: start; }
.card { background: white; padding: 28px; border-radius: 15px; box-shadow: 0 10px 40px rgba(0,0,0,0.03); border-left: 5px solid #3498db; transition: 0.3s; }
 .card:hover { transform: translateY(-10px); }
 .card-icon { font-size: 3rem; margin-bottom: 20px; display: flex; justify-content: center; align-items: center; }

/* Ensure cards layout vertically so image sits under text */
.card { display: flex; flex-direction: column; }

/* Image inside service card */
.service-img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; margin-top: 18px; }

/* RESEÑAS / OPINIONES */
#resenas { padding: 100px 5%; max-width: 1200px; margin: 0 auto; text-align: center; background-color: #fff; }
.resenas-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 50px; }
.review-card { background: white; padding: 30px; border-radius: 15px; box-shadow: 0 8px 30px rgba(0,0,0,0.1); text-align: left; display: none; }
.review-card:first-child { display: block; }
.review-card p { font-style: italic; color: #2c3e50; line-height: 1.6; }
.review-card .author { margin-top: 15px; font-weight: bold; color: #3498db; text-align: right; font-size: 0.95rem; }
.review-logo { display: block; max-width: 120px; margin-bottom: 15px; }

/* Estilo compartido para tarjetas destacadas (Mercancías y Ganado Vivo) */
.card-highlight {
    text-align: left;
    border-left-color: #3498db; /* acento azul */
    background: linear-gradient(180deg, #ffffff, #fbfcff);
}
.card-highlight .card-icon { font-size: 3.4rem; margin-bottom: 16px; }
.card-highlight h3 {
    color: #1a2a3a;
    font-size: 1.6rem;
    font-weight: 900;
    margin-bottom: 10px;
}
.card-highlight p {
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 1em; /* espacio entre párrafos */
}

/* CONTACTO Y MAPA */
#contacto { padding: 100px 5%; background: #1a2a3a; color: white; }
.contacto-header { text-align: center; margin-bottom: 40px; }
.contacto-container {
    max-width: 1100px; /* Ajusta este ancho según tu diseño */
    margin: 0 auto;
    padding: 20px;
}
.contacto-grid-superior {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas iguales */
    gap: 50px;
    margin-bottom: 40px; /* Espacio antes del mapa */
}
.contacto-form { display: flex; flex-direction: column; gap: 15px; }
input, textarea { padding: 15px; border-radius: 8px; border: none; font-size: 1rem; width: 100%; }
.contacto-mapa {
    width: 100%;
    height: 350px; /* Altura del mapa */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.contacto-info-directa {
    padding-right: 20px;
}
.contacto-info-directa h3 {
    color: #3498db;
    margin-bottom: 10px;
}

.contacto-info-directa p {
    margin-bottom: 25px;
    color: #bdc3c7;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.info-item a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.info-item a:hover {
    color: #3498db;
}

.info-item .icon {
    font-size: 1.5rem;
}

/* Contenedor del Checkbox */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    margin: 5px 0 10px;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3498db;
    cursor: pointer;
    margin-top: 4px;
}

.checkbox-container label {
    font-size: 0.9rem;
    color: #ecf0f1;
    cursor: pointer;
}

.privacidad-texto {
    font-size: 0.75rem;
    color: #bdc3c7;
    text-align: left;
    line-height: 1.4;
    opacity: 0.8;
}

.privacidad-texto strong {
    color: #3498db;
}

/* FOOTER */
footer {
    background: #121d29;
    color: #ffffff;
    padding: 60px 5% 20px;
    border-top: 4px solid #3498db;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    /*align-items: center;*/
    align-items: flex-start;
    gap: 40px;
}

/* footer-brand/footer-img-logo/footer-slogan removed (not used in markup) */

.footer-bottom {
    width: 100%;
    padding-top: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #7f8c8d;
}

.credits {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dev-logo {
    height: 40px; /* Logo del desarrollador: aumentado */
    width: auto;
    opacity: 0.7;
    transition: 0.3s;
}

.dev-logo:hover {
    opacity: 1;
}

/* BOTONES Y WHATSAPP */
.btn, .btn-submit { background: #3498db; color: white; padding: 16px 35px; border-radius: 8px; font-weight: bold; text-decoration: none; border: none; cursor: pointer; transition: 0.3s; }
.btn:hover, .btn-submit:hover { background: #2980b9; transform: translateY(-3px); }
.whatsapp-btn { position: fixed; bottom: 30px; right: 30px; background: #25d366; width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 2000; }


/* Contenedor de Redes Sociales */
.footer-socials {
    display: flex;
    justify-content: center; /* Centrado horizontal */
    gap: 25px;               /* Espacio entre iconos */
    width: 100%;             /* Ocupa todo el ancho para poder centrar */
    margin-bottom: 10px;      /* Espacio respecto a los enlaces legales */
}

.footer-socials img {
    width: 28px;             /* Tamaño discreto y elegante */
    height: 28px;
    transition: transform 0.3s ease, filter 0.3s ease;
    filter: grayscale(100%) opacity(0.7); /* Estilo minimalista gris */
}

.footer-socials img:hover {
    transform: translateY(-3px);
    filter: grayscale(0%) opacity(1); /* Recupera color original al pasar el ratón */
}

/* CONTENEDOR DE ENLACES LEGALES */
.footer-links {
    display: flex;
    flex-wrap: wrap; /* Para que en móviles se ajusten si no caben */
    gap: 15px;
    margin-top: 10px;
    justify-content: center; /* Centra los elementos horizontalmente */
    width: 100%;/* Asegura que use todo el ancho para poder centrar */
}

.footer-links a {
    color: #7f8c8d; /* Color gris suave para que sea discreto */
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3498db; /* Color azul al pasar el ratón */
    text-decoration: underline;
}

/* Separador visual (opcional si no quieres usar el pipe "|" en el HTML) */
.footer-links a:not(:last-child)::after {
    content: "|";
    margin-left: 15px;
    color: #34495e;
    text-decoration: none;
    display: inline-block;
}

/* Estilos para páginas de texto legal */
/* .legal-content defined inline in legal pages; removed from global CSS to avoid duplication */

/* Clase para tabular/sangrar bloques de texto */
.indent-block {
    margin-left: 30px;      /* Empuja el contenido a la derecha */
    margin-bottom: 20px;    /* Espacio inferior para que no pegue con el siguiente h2 */
    border-left: 2px solid #3498db; /* Línea decorativa azul a la izquierda */
    padding-left: 20px;     /* Espacio entre la línea azul y el texto */
    list-style-position: inside; /* Asegura que los puntos de la lista estén alineados */
}

.indent-block p {
    margin-bottom: 8px;     /* Espacio fino entre los datos (Titular, CIF, etc.) */
}

.indent-block li {
    margin-bottom: 10px;    /* Espacio entre los puntos de finalidad */
}

/* Estilo del Botón Volver Arriba */
#backToTop {
    display: none; /* Oculto por defecto */
    position: fixed;
    bottom: 100px; /* Situado encima del botón de WhatsApp */
    right: 30px;
    z-index: 2000;
    border: none;
    outline: none;
    background-color: #1a2a3a; /* Azul oscuro del header */
    color: white;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: background-color 0.3s, transform 0.3s;
}

#backToTop:hover {
    background-color: #3498db; /* Cambia al azul claro al pasar el ratón */
    transform: translateY(-5px);
}

.arrow-up {
    display: block;
    line-height: 50px;
}

/*
==========================================================================
   ESTILOS RESPONSIVE
==========================================================================
*/

/* ----- Breakpoint: 900px (Tablets y escritorios pequeños) ----- */
@media (max-width: 900px) {
    /* Stack flexible containers on smaller screens */
    .empresa-container, .contacto-container {
        flex-direction: column;
        gap: 30px;
    }
    .empresa-texto { text-align: center; }

    /* Services: switch to 2 columns on medium screens */
    .servicios-grid { grid-template-columns: repeat(2, 1fr); }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* ----- Breakpoint: 768px (Móviles) ----- */
@media (max-width: 768px) {
    /* Header */
    .header-logo-img { 
        height: 55px;
    }
    .logo-text span { font-size: 1.1rem; }
    .logo-container { gap: 10px; }

    /* Menú de navegación móvil */
    .menu-hamburguesa {
        display: block;
    }

    nav ul#nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        
        background-color: rgba(26, 42, 58, 0.99);
        backdrop-filter: blur(5px);
        
        list-style: none;
        transition: right 0.4s ease-in-out;
    }

    nav ul#nav-menu.active {
        right: 0;
    }

    nav ul#nav-menu li a {
        margin-left: 0;
        font-size: 1.5rem;
        font-weight: bold;
    }

    /* Contacto */
    .contacto-grid-superior {
        grid-template-columns: 1fr;
    }

    /* Services: single column on mobile */
    .servicios-grid { grid-template-columns: 1fr; }

    /* Footer */
    .footer-brand {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }

    .footer-links {
        justify-content: center;
        width: 100%;
    }

    /* Botón flotante */
    #backToTop {
        bottom: 160px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    /* Reducir tamaño del logo del desarrollador en móvil */
    .dev-logo { height: 30px; }
}