/* --- Variables y Estilos Globales --- */
:root {
    --primary-color: #FFFFFF;
    --secondary-color: #212529;
    --accent-color: #0a4a2acc;
    --font-family: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--secondary-color);
    line-height: 1.6;
    background-color: var(--primary-color);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: left;
}

.regions-section h2,
.contact-section h2 {
    text-align: center;
}

/* --- Header y Navegación --- */
.main-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #eee;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 40px;
}

.main-nav {
    position: relative;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav ul li {
    margin-left: 1.5rem;
}

.main-nav a {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 4px;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
    width: 0;
}

.main-nav a:hover {
    color: var(--accent-color);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
}

.mobile-nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    transition: all 0.3s ease;
}

/* --- Sección Hero --- */
.hero-section {
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--primary-color);
}

.hero-content {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2rem;
    border-radius: 10px;
}

.logo-hero img {
    max-width: 400px;
}

.hero-content p {
    font-size: 1.2rem;
}

/* --- Secciones de Contenido --- */
.content-section {
    padding: 6rem 0;
}

.content-section .container {
    display: flex;
    align-items: center;
    gap: 4rem;
}

.content-section.reverse .container {
    flex-direction: row-reverse;
}

.text-content {
    flex: 1;
    max-width: 550px; /* Limita el ancho para mejor lectura */
}

.text-content p {
    font-size: 1.1rem;
    line-height: 1.7;
}

.text-content p + p {
    margin-top: 1.5rem; /* Espacio entre párrafos */
}

.image-content {
    flex: 1;
}

.image-content img {
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* --- Estilos del Carrusel --- */
.carousel {
    position: relative;
}

.carousel-track-container {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    height: 250px;
}

.carousel-track {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    transition: transform 250ms ease-in;
}

.carousel-slide {
    flex-shrink: 0;
    width: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: 0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-button:hover {
    background: rgba(0,0,0,0.7);
}

.carousel-button img {
    width: 20px;
    box-shadow: none;
    border-radius: 0;
}

.carousel-button--left {
    left: -20px;
}

.carousel-button--right {
    right: -20px;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.carousel-indicator {
    border: 0;
    border-radius: 50%;
    width: 15px;
    height: 15px;
    background: rgba(0,0,0,0.3);
    margin: 0 8px;
    cursor: pointer;
}

.carousel-indicator.current-slide {
    background: rgba(0,0,0,0.7);
}

.is-hidden {
    display: none;
}

/* --- Sección Regiones --- */
.regions-section {
    padding: 6rem 0;
    background-color: #f9f9f9;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Estilos para el efecto de volteo */
.region-card-container {
    perspective: 1000px;
    height: 350px;
}

.region-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.region-card-container:hover .region-card {
    transform: rotateY(180deg);
}

.region-card-front,
.region-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 10px;
    overflow: hidden;
}

.region-card-front {
    background-size: cover;
    background-position: center;
    color: var(--primary-color);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

.region-card-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

.region-card-front h3 {
    position: relative;
    z-index: 2;
    font-size: 1.8rem;
}

.region-card-back {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    transform: rotateY(180deg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.region-card-back h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.region-card-back p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.region-card-back ul {
    list-style: none;
    padding-top: 0.5rem;
    border-top: 1px solid #555;
}

.region-card-back li {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}


/* --- Sección Certificaciones --- */
.certifications-section {
    padding: 4rem 0;
    /* background-color: #f9f9f9; */
}

.certifications-section .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.certifications-section h2 {
    text-align: center;
}

.certifications-section img {
    max-width: 80%;
    opacity: 0.8;
}

.certifications-images {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.certifications-images img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    opacity: 0.8;
}

/* --- Sección Contacto --- */
.contact-section {
    padding: 6rem 0;
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.contact-section h2 {
    color: var(--primary-color);
}

.contact-details {
    margin-top: 2rem;
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.8rem 2rem;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-radius: 50px;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* --- Footer --- */
.main-footer {
    padding: 2rem 0;
    background-color: #f4f4f4;
}

.main-footer .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-footer p {
    font-size: 0.9rem;
    text-align: center;
}

/* --- Responsividad --- */
@media (max-width: 768px) {
    h2 {
        font-size: 2rem;
    }

    .main-header .container {
        flex-wrap: wrap;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        background-color: white;
        position: absolute;
        top: 65px;
        left: 0;
        padding: 1rem 0;
    }
    
    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul li {
        margin: 0;
        text-align: center;
        padding: 1rem 0;
    }

    .mobile-nav-toggle {
        display: block;
    }

    .hero-section {
        height: auto;
        min-height: 100vh;
    }

    /* Mejoras para carruseles en móvil */
    .carousel-button {
        width: 30px;
        height: 30px;
    }

    .carousel-button--left {
        left: 5px;
    }

    .carousel-button--right {
        right: 5px;
    }

    .carousel-indicator {
        width: 10px;
        height: 10px;
    }
}

#purpose {
    background-color: #f9f9f9;
}

#logistics {
    background-color: #f9f9f9;
}

#quality .carousel-track-container {
    object-fit: cover;
    height: 700px;
}
