/* --- Estilos Generales --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Roboto', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(ellipse at center, #0f1419 0%, #000000 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: white;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

/* --- Estilos para el HEADER SUPERIOR y Navegación --- */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #1A2735;
    color: white;
    position: relative;
    z-index: 1000;
}

.spacer {
    flex-grow: 1;
}

.top-header h1 {
    font-size: 1.5em;
    margin: 0;
    font-weight: 900;
    background: linear-gradient(to right, #a882ff, #6243ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Notable', sans-serif;
}

.mobile-menu-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

#menu-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.1em;
    cursor: pointer;
    padding: 12px 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

#menu-btn svg {
    fill: white;
    height: 24px;
    width: 24px;
}

#menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1A2735;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    padding: 10px 0;
    width: 80%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1001;
}

#menu-dropdown a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s ease, padding-left 0.2s ease;
    font-size: 1.05em;
    white-space: normal;
}

#menu-dropdown a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    padding-left: 25px;
}

.search-icon-desktop {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
}

.search-icon-desktop svg {
    fill: white;
    height: 20px;
    width: 20px;
}

.main-nav-desktop {
    display: none;
    justify-content: flex-start;
    align-items: center;
    background-color: #0f1419;
    padding: 12px 30px;
    gap: 30px;
    position: relative;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.main-nav-desktop a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05em;
    padding: 5px 0;
    transition: color 0.2s ease;
}

.main-nav-desktop a:hover {
    color: #d1e2f7;
}

.main-nav-desktop .social-icons {
    margin-left: auto;
    display: flex;
    gap: 15px;
    align-items: center;
}

.main-nav-desktop .social-icons a {
    font-size: 1.3em;
    color: white;
    transition: color 0.2s ease;
}

.main-nav-desktop .social-icons svg {
    fill: white;
    height: 20px;
    width: 20px;
}

/* --- Estilos de la Sección HERO (hero-section) --- */
.hero-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 70vh;
    padding: 40px 20px;
    box-sizing: border-box;
    padding-bottom: 80px;
    margin-bottom: 0;
    width: 100%;
    max-width: 1000px;
    padding-left: 20px;
    padding-right: 20px;
    overflow: visible;
    margin-top: -60px;
}

.hero-woman-image {
    max-width: 350px;
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.8));
    opacity: 0.95;
    margin-bottom: 0;
    margin-top: 20px;
}

.visual-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 40px;
    margin-top: 30px;
}

.visual-left, .visual-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    gap: 20px;
}

.visual-left .world-container {
    width: 100%;
    height: 400px;
}

/* Estilos de los botones de la sección hero */
.hero-cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: -50px;
    width: 100%;
    max-width: 300px;
}

.hero-door {
    position: relative;
    width: 100%;
    min-height: 160px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 15px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    border: 2px solid;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.hero-door:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.hero-door h2 {
    font-size: 1.6rem;
    margin-bottom: auto;
    padding-top: 10px;
    background: linear-gradient(135deg, #4DB6AC 0%, #00796B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.hero-cta-button {
    width: 100%;
    padding: 10px 0;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    color: white;
}

.hero-cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

#hero-export-btn {
    background-image: linear-gradient(to right, #4A90E2, #81d4fa);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#hero-import-btn {
    background-image: linear-gradient(to right, #a882ff, #6243ff);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* --- Estilos de Microtexto de Confianza --- */
.micro-trust-section {
    padding: 20px;
    text-align: center;
    color: white;
    padding-bottom: 0;
}

.micro-trust-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 500px;
    margin: -30px auto 0;
}

.micro-trust-container p {
    margin: 0;
    white-space: nowrap;
    color: white; 
    font-size: 1.4em;
}

/* --- Estilos de la sección de Beneficios --- */
.benefits-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.benefits-card {
    background-color: #1A2735;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    flex: 1 1 450px;
    transition: transform 0.3s ease;
}

.benefits-card:hover {
    transform: translateY(-5px);
}

.benefits-card h2 {
    text-align: center;
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 25px;
    background: linear-gradient(to right, #a882ff, #6243ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.benefits-card ul {
    list-style: none;
    padding: 0;
}

.benefits-card li {
    font-size: 1.2em;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
}

.benefits-card li:last-child {
    border-bottom: none;
}

/* --- Estilos de la sección de Blogs por Temática Horizontal --- */
.blog-topics-section {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-topics-section .topic-title {
    text-align: left;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-weight: 800;
    background: linear-gradient(to right, #a882ff, #6243ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.blog-list-horizontal {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 20px;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

.blog-item {
    flex: 0 0 250px;
    background-color: #1A2735;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    text-align: left;
}

.blog-thumbnail {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.blog-item .blog-title {
    font-size: 0.5em;
    font-weight: 600;
    margin: 15px 15px 5px 15px;
    color: white;
}

.blog-item .blog-date {
    font-size: 0.9em;
    color: #999;
    margin: 0 15px 15px 15px;
}

.more-link {
    display: block;
    text-align: right;
    margin-top: 20px;
    color: #a882ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
    transition: color 0.2s ease;
}

.more-link:hover {
    color: #6243ff;
}

/* --- Estilos de la Sección de Noticias (News) --- */
.section-container {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    color: #e0e0e0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid #b0b0b0;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.section-header .title-block {
    display: flex;
    align-items: center;
    flex-basis: 100%;
}

.section-header .color-block {
    width: 25px;
    height: 40px;
    background-color: #ff6600;
    margin-right: 15px;
}

.section-header h2 {
    font-size: 2em;
    font-weight: 700;
    color: white;
    margin: 0;
    flex-grow: 1;
    word-break: break-word;
}

.section-header .see-more {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    transition: color 0.3s;
    white-space: nowrap;
    margin-top: 10px;
}

.section-header .see-more:hover {
    color: #ff6600;
}

.section-header .arrow {
    margin-left: 5px;
    font-size: 1.5em;
}

.categories-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.category-card {
    background-color: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.category-image-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

.category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

/* --- Estilos para animaciones --- */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Media Queries --- */
@media (max-width: 1024px) {
    .mobile-menu-wrapper {
        display: flex;
    }
    .main-nav-desktop {
        display: none;
    }
    .top-header h1 {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-section {
        min-height: auto;
        padding-bottom: 50px;
        margin-top: -30px;
    }
    .visual-left .world-container {
        height: 400px;
    }
    .hero-cta-buttons {
        flex-direction: column;
        margin-top: -50px;
        max-width: 400px;
        align-items: center;
    }
    .hero-door {
        height: auto;
        min-height: 160px;
        width: 100%;
    }

    /* EDICIÓN: Ajustes para el texto de confianza en tablet */
    .micro-trust-container {
        margin-top: -40px;
    }
    .micro-trust-container p {
        font-size: 1.3em;
    }
}

@media (max-width: 768px) {
    /* Reglas para asegurar el correcto ancho y evitar desbordamientos */
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    .container, .hero-section, .benefits-section, .section-container, .blog-topics-section {
        width: 100%;
        max-width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    .section-container .categories-container {
        grid-template-columns: 1fr;
        gap: 15px;
        width: 100%;
        padding: 0;
    }
    .category-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
    }
    .micro-trust-container, .micro-trust-container p {
        width: 100%;
        max-width: 100%;
        white-space: normal;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* MODIFICACIONES SOLICITADAS Y CORRECCIONES */
    /* Solución definitiva para centrar "Abriendo Mercados" */
    .top-header h1 {
        flex-grow: 1; /* Esto hace que ocupe el espacio disponible */
        text-align: center; /* Esto lo centra */
        position: static;
        transform: none;
    }

    /* Centrar "Tu Puerta al Comercio Internacional" y el texto debajo */
    .visual-left {
        text-align: center;
        align-items: center; 
    }

    .visual-left h1, .visual-left p {
        text-align: center;
        width: 100%;
    }

    /* Agrandar la foto de la mujer */
    .hero-woman-image {
        max-width: 300px;
        height: auto;
    }
    
    /* Cambiar color de "Tu Puerta al Comercio Internacional" */
    .hero-door h2 {
        background: linear-gradient(135deg, #a882ff, #4A90E2);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        text-shadow: 0 0 10px rgba(255,255,255,0.3);
    }
    
    /* FIN DE MODIFICACIONES SOLICITADAS */

    /* Estilos de la sección HERO */
    .hero-section {
        padding-bottom: 50px;
        margin-top: 0;
    }
    .visual-hero {
        flex-direction: column;
        gap: 20px;
    }
    .visual-left, .visual-right {
        width: 100%;
        order: unset;
        text-align: center;
        align-items: center;
    }
    
    .visual-left .world-container {
        height: 300px;
        width: 100%;
    }
    .hero-cta-buttons {
        flex-direction: column;
        gap: 20px;
        max-width: 90%;
        margin-top: -50px;
        align-items: center;
    }
    .hero-door {
        width: 100%;
        height: auto;
        min-height: 140px;
        padding: 15px;
    }

    /* Estilos de las demás secciones */
    .benefits-section {
        padding: 30px 10px;
        margin: 0;
    }
    .benefits-card {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
    /* Estilos generales de tipografía e imágenes */
    h1, h2, h3, h4, p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    img, video {
        max-width: 100%;
        height: auto;
    }
    .header p {
        font-size: 1.1rem;
    }
    .top-header {
        flex-direction: row;
        padding: 15px 8px;
        justify-content: space-between;
    }
    .top-header h1 {
        font-size: 1.4em;
        margin: 0;
    }
    .mobile-menu-wrapper {
        display: flex;
        order: -1;
        width: 100%;
    }
    .search-icon-desktop {
        display: none;
    }
    .main-nav-desktop {
        display: none;
    }
    #menu-dropdown {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 300px;
        background-color: #1A2735;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 0 0 5px 5px;
        padding: 10px 0;
        z-index: 1001;
    }
    #menu-dropdown a {
        padding: 12px 20px;
        font-size: 1em;
        white-space: nowrap;
    }
    .header {
        margin-top: 20px;
        margin-bottom: 30px;
    }
    .header h1 {
        font-size: 2.2rem;
    }
    .hero-door h2 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    .hero-cta-button {
        padding: 10px 0;
        font-size: 0.9rem;
    }
    .hero-section {
        margin-bottom: 50px;
        padding-bottom: 50px;
    }

    /* EDICIÓN: Ajustes para el texto de confianza en móvil */
    .micro-trust-container {
        margin-top: -40px;
    }
    .micro-trust-container p {
        font-size: 1.3em;
    }
}

/* Estilos de la versión de PC */
@media (min-width: 992px) {
    /* Ajustes para el menú de PC */
    .top-header h1 {
        position: static;
        transform: none;
        margin-right: auto;
        padding-left: 0;
    }
    .mobile-menu-wrapper {
        display: none;
    }
    .main-nav-desktop {
        display: flex;
    }
    /* Estilos para la sección HERO */
    .hero-section {
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        padding-top: 60px;
        padding-bottom: 80px;
        margin-top: 0;
    }
    .visual-hero {
        flex-direction: row;
        align-items: flex-start;
        gap: 60px;
        max-width: 1000px;
        margin-top: 0;
    }
    .visual-right {
        order: 1;
        align-items: flex-start;
        text-align: left;
    }
    .visual-left {
        order: 2;
        width: 55%;
        height: 500px;
    }
    .hero-cta-buttons {
        flex-direction: row;
        justify-content: flex-start;
        margin-top: -30px;
        max-width: none;
    }
    .hero-door {
        width: 50%;
        min-height: 200px;
    }
}
    
/* --- Estilos para el FOOTER --- */
footer {
    background-color: #1A2735;
    padding: 40px 20px;
    text-align: center;
    color: #e0e0e0;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #a882ff;
}

footer p {
    margin: 5px 0;
    font-size: 0.9em;
    color: #b0b0b0;
}

footer p a {
    color: #d1e2f7;
    text-decoration: none;
    transition: color 0.3s;
}

footer p a:hover {
    color: #a882ff;
}