/* Configuración básica */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f4f9; /* Fondo suave */
    color: #333;
}

/* CLASE GLOBAL CONTAINER: SOLO MÁRGENES Y ANCHO */
.container {
    width: 80%;
    margin: auto;
    /* Las reglas de Flexbox se aplican solo a header .container */
}

/* ------------------------------------------------------------------ */
/* 1. ENCABEZADO (HEADER) - USANDO FLEXBOX */
/* ------------------------------------------------------------------ */
header {
    background: #004d99;
    color: #ffffff;
    min-height: 70px;
    border-bottom: #003366 3px solid;
    padding: 0;
}

/* APLICACIÓN DE FLEXBOX SÓLO AL ENCABEZADO PARA ALINEAR TODO */
header .container {
    display: flex; 
    justify-content: space-between; /* Espacio entre logo, nav y botón */
    align-items: center; /* Centrado vertical */
    min-height: 70px;

}

/* ESTILOS DEL LOGO */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

.logo-image {
    height: 105px !important; /* TAMAÑO CORREGIDO Y FORZADO */
    width: auto !important; 
    display: block;
}

/* ESTILOS DE NAVEGACIÓN */
header nav {
    flex-grow: 1; /* Ocupa el espacio central restante */
    text-align: center;
    margin: 0 20px;
}

header ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

header ul li {
    display: inline;
    padding: 0 10px;
}

header a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    text-transform: uppercase;
}

header a:hover {
    color: #ffcc00;
}

/* ESTILOS DEL BOTÓN DE ACCESO AL SISTEMA */
.system-login-button {
    display: inline-block;
    background: #ffcc00;
    color: #003366;
    padding: 8px 15px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 14px;
    transition: background 0.3s;
    border: 2px solid #ffcc00;
    white-space: nowrap; 
}

.system-login-button:hover {
    background: #e6b800;
    border-color: #e6b800;
}

/* ------------------------------------------------------------------ */
/* 2. SECCIÓN HERO/INICIO - AHORA CON IMAGEN DE MAPAMUNDI Y OVERLAY */
/* ------------------------------------------------------------------ */
.hero {
    /* CLAVE: Usamos la imagen y cubrimos el área */
    background: url('mapamundi-bg.jpg') no-repeat center center/cover;
    color: #ffffff;
    text-align: center;
    padding: 100px 0;
    background-color: #003366; /* Fondo de respaldo si no carga la imagen */
    
    /* Configuración para el overlay */
    position: relative; 
    overflow: hidden; /* Asegura que la capa no se salga */
    z-index: 1; /* Necesario para que el contenido de texto quede encima del overlay */
}

/* Capa oscura (Overlay) para mejorar la legibilidad del texto */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Color azul oscuro semi-transparente */
    background: rgba(0, 51, 102, 0.6); /* #003366 con 60% de opacidad */
    z-index: 2; /* Coloca el overlay encima de la imagen pero debajo del contenido */
}

/* Reglas para asegurar que el contenido (H2, P, Botón) esté encima del overlay */
.hero .container, .hero h2, .hero p, .hero .cta-button {
    position: relative;
    z-index: 3;
}

.hero h2 {
    font-size: 40px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background: #ffcc00;
    color: #003366;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}

.cta-button:hover {
    background: #e6b800;
}

/* ------------------------------------------------------------------ */
/* 3. CINTILLO DE MARCAS */
/* ------------------------------------------------------------------ */
.brands-strip {
    background: #e0eaf4; 
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #ccc;
    border-bottom: 1px solid #ccc;
}

.brands-strip h4 {
    margin-bottom: 15px;
    color: #004d99;
    font-size: 18px;
    font-weight: normal;
}

.logo-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap; 
    gap: 15px;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 15px;
    color: #333;
    font-size: 14px;
    font-weight: bold;
    min-width: 100px;
}

.logo-item i {
    color: #004d99;
    margin-bottom: 5px;
}

/* ------------------------------------------------------------------ */
/* 4. SECCIÓN DE IMPORTACIÓN */
/* ------------------------------------------------------------------ */
.import-detail-section {
    padding: 80px 0;
    background-color: #ffffff; 
    text-align: center;
}

.import-detail-section h3 {
    color: #003366;
    font-size: 34px;
    margin-bottom: 10px;
}

.import-detail-section .subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 50px;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 40px;
}

.step-item {
    flex-basis: 22%; /* Ajustado para 4 columnas */
    text-align: center;
    padding: 20px;
    border: 1px dashed #ccc;
    border-radius: 8px;
}

.step-item i {
    margin-bottom: 15px;
}

.step-item h4 {
    color: #004d99;
    font-size: 22px;
    margin-bottom: 10px;
}

.big-cta {
    font-size: 20px;
    padding: 15px 30px;
}

/* ------------------------------------------------------------------ */
/* 5. SECCIÓN DE SERVICIOS */
/* ------------------------------------------------------------------ */
.services {
    padding: 40px 0;
    text-align: center;
}

.services h3 {
    font-size: 30px;
    margin-bottom: 30px;
    color: #004d99;
}

.service-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; 
}

.service-item {
    background: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex-basis: 47%;
    min-width: 300px; 
    text-align: left;
    margin-bottom: 20px;
}

/* ------------------------------------------------------------------ */
/* 6. SECCIÓN DE CRÉDITO */
/* ------------------------------------------------------------------ */
.credit-request {
    padding: 60px 0;
    background-color: #ffffff;
    text-align: center;
}

.credit-request h3 {
    color: #004d99;
    margin-bottom: 15px;
    font-size: 30px;
}

.credit-request p {
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.credit-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.submit-button {
    background: #004d99;
    color: #ffffff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
    font-weight: bold;
    width: 100%;
    margin-top: 10px;
}

.submit-button:hover {
    background: #003366;
}

.nota {
    font-size: 14px;
    color: #666;
    margin-top: 20px;
}

/* ------------------------------------------------------------------ */
/* 7. SECCIÓN DE CONTACTO Y FOOTER */
/* ------------------------------------------------------------------ */
.contact {
    background: #e0eaf4;
    padding: 40px 0;
    text-align: center;
}

.contact h3 {
    color: #004d99;
    margin-bottom: 20px;
}

footer {
    background: #333;
    color: #ffffff;
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* 8. RESPONSIVIDAD (MÓVIL) */
/* ------------------------------------------------------------------ */
@media (max-width: 900px) {
    /* Ajuste para Importación: 4 pasos apilados */
    .process-steps {
        flex-direction: column;
    }
    .step-item {
        flex-basis: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    /* Encabezado: Apilar logo, botón y nav verticalmente */
    header .container {
        flex-direction: column;
        padding: 10px 0;
    }

    .logo-link {
        order: 1; 
        padding-bottom: 5px;
        justify-content: center;
    }
    
    .system-login-button {
        order: 2; 
        margin: 10px auto;
        width: 80%;
    }

    header nav {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    header nav ul {
        padding: 10px 0;
    }

    header nav ul li {
        display: block; /* Cada enlace en una línea en móvil */
        padding: 5px 0;
    }

    /* Otras secciones en móvil */
    .service-item {
        flex-basis: 100%;
        margin-bottom: 20px;
    }

    .hero {
        padding: 60px 0;
    }

    .container {
        width: 90%;
    }
}
/* ------------------------------------------------------------------ */
/* 9. SCROLL HORIZONTAL DE CATEGORÍAS (Ajustes para que no se pegue y se centre) */
/* ------------------------------------------------------------------ */

/* Contenedor que establece el ancho de 80% y centra el bloque */
.container-scroll {
    /* CLAVE: Usamos Flexbox para alinear todos los ítems en una fila */
    display: flex;
    
    /* CLAVE: Centra los elementos horizontalmente cuando NO hay scroll */
    justify-content: center; 
    
    /* Permite el scroll si el contenido es más grande que el 80% */
    width: fit-content; 
    min-width: 100%; /* Asegura que ocupe todo el espacio del padre */
    
    /* El área visible se limita al 80% de ancho del .container */
    max-width: 80%; 
    margin: 0 auto; /* Centra el área visible del scroll */
    
    overflow-x: scroll;
    overflow-y: hidden;
    
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

/* Ocultar la barra de desplazamiento para WebKit */
.container-scroll::-webkit-scrollbar {
    display: none;
}
.category-item {
    /* Mínimo de ancho para cada ítem */
    min-width: 100px; 
    
    /* Espacio entre los ítems */
    margin: 0 15px; 
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    
    padding: 5px 0;
    cursor: pointer;
    transition: color 0.3s;
}

.category-item i {
    color: #004d99; /* Icono azul corporativo */
    margin-bottom: 5px;
}

.category-item span {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    white-space: nowrap; /* Evita que el texto se rompa */
}

.category-item:hover {
    color: #ffcc00; /* Efecto de hover */
}

.category-item:hover i {
    color: #ffcc00; /* Ícono amarillo al pasar el mouse */
}