/* 
   Page: Nosotros (Professional Reconstruction)
   Context: Clean Code Migration (Zero Elementor)
   Methodology: BEM, Mobile-First, Flex/Grid
   Version: 1.0.5 (Responsive Fixes)
*/

/* --- 1. Scoped Reset & Variables --- */
.nosotros {
    --nos-yellow: #FFD200;
    --nos-black: #1A1A1A;
    --nos-gray-text: #666666;
    --nos-light-gray: #F5F5F7;
    --nos-white: #ffffff;
    --nos-shadow-card: 0px 10px 30px rgba(0, 0, 0, 0.08);
    /* Soft shadow */
    --nos-font: 'Myriad Pro', sans-serif;

    font-family: var(--nos-font);
    color: var(--nos-black);
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    /* SAFETY: Prevent horror scroll */
}

.nosotros * {
    box-sizing: border-box;
}

.nosotros img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- 2. Shared Utilities --- */
.nosotros__container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    /* Reduced side padding for mobile */
    width: 100%;
}

.nosotros__title {
    font-size: 28px;
    /* Mobile first size */
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 24px;
    line-height: 1.1;
    color: var(--nos-black);
}

.nosotros__title--center {
    text-align: center;
    margin-bottom: 48px;
}

@media (min-width: 768px) {
    .nosotros__title {
        font-size: 32px;
    }
}

/* --- 3. Hero Section (Split) --- */
.nosotros__hero {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.nosotros__hero-image {
    min-height: 400px;
    background-image: url('https://grupokamasa.com/wp-content/uploads/2024/07/timeline01-1.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    width: 100%;
}

/* Grupo Kamasa Text Overlay */
.nosotros__hero-overlay-text {
    position: absolute;
    bottom: -15px;
    /* Slight offset downwards like reference */
    left: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    line-height: 0.8;
}

.nosotros__hero-grupo {
    font-size: 80px;
    font-weight: 900;
    color: var(--nos-yellow);
    text-transform: capitalize;
    /* Or uppercase depending on font */
}

.nosotros__hero-kamasa {
    font-size: 80px;
    font-weight: 900;
    color: #fff;
    text-transform: capitalize;
}

.nosotros__hero-content {
    background-color: var(--nos-yellow);
    padding: 60px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.nosotros__year {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1;
    color: var(--nos-black);
}

.nosotros__subtitle-hero {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
}

/* Desktop Hero */
@media (min-width: 1024px) {
    .nosotros__hero {
        flex-direction: row;
        height: 450px;
        /* Fixed height matching original */
        min-height: auto;
    }

    .nosotros__hero-image {
        width: 53%;
        /* Precise Extracted Ratio */
        flex: 0 0 53%;
    }

    .nosotros__hero-content {
        width: 47%;
        /* Precise Extracted Ratio */
        flex: 0 0 47%;
        padding: 80px 30px;
        /* 80px Vertical (Reference), 30px Horizontal (Requested "cerca") */
        align-items: flex-start;
    }

    .nosotros__year {
        font-size: 64px;
    }

    .nosotros__hero-grupo,
    .nosotros__hero-kamasa {
        font-size: 100px;
        /* Larger on desktop */
    }

    .nosotros__hero-overlay-text {
        bottom: 0px;
        /* Lift up to prevent cut-off */
        left: 40px;
    }
}

/* --- 4. Brands (Grid) --- */
.nosotros__brands {
    padding: 64px 0 32px;
    background-color: var(--nos-white);
}

.nosotros__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
    /* Mobile default */
}

.nosotros__card {
    background: #fff;
    border: 1px solid #E5E5E5;
    padding: 32px 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    /* For header strip if needed */
    border-top: 6px solid transparent;
    /* Prepare for colored border */
}

/* Brand Specific Colors & Logic */
.nosotros__card--kamasa {
    border-top-color: #000000;
}

/* Kamasa Black/Yellow theme */
.nosotros__card--kaili {
    border-top-color: #0056D2;
}

/* Kaili Blue */
.nosotros__card--asaki {
    border-top-color: #FF4400;
}

/* Asaki Orange */

.nosotros__card-logo {
    /* height: 64px; Removed to adjust individually */
    width: auto;
    margin-bottom: 24px;
    object-fit: contain;
    /* Removed grayscale to show original brand colors */
    transition: transform 0.3s ease;
}

/* Visual Balancing: Tune heights individually */
.nosotros__card--kamasa .nosotros__card-logo {
    height: 60px;
    /* Slightly compacted */
}

.nosotros__card--kaili .nosotros__card-logo {
    height: 35px;
    /* Wider appearance */
    transform: scale(1.3);
    /* Boost visual weight */
}

.nosotros__card--asaki .nosotros__card-logo {
    height: 48px;
    transform: scale(1.1);
}

.nosotros__card:hover {
    transform: translateY(-8px);
    box-shadow: var(--nos-shadow-card);
    border-color: transparent;
    /* Keep top border, hide side borders on hover if desired, or keep as is */
}

.nosotros__card:hover .nosotros__card-logo {
    /* Hover scale effect adjustment */
    transform: scale(1.15);
}

.nosotros__card--kaili:hover .nosotros__card-logo {
    transform: scale(1.45);
}

.nosotros__card--asaki:hover .nosotros__card-logo {
    transform: scale(1.25);
}

@media (min-width: 768px) {
    .nosotros__grid--3-cols {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- 5. IDENTITY & VALUES (Split Layout) --- */
.nosotros__identity-values {
    padding: 64px 0;
    background-color: var(--nos-light-gray);
}

/* Mobile: Stack everything */
.nosotros__grid-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.nosotros__col-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nosotros__card-item,
.nosotros__values-card {
    background: #fff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: var(--nos-shadow-card);
}

.nosotros__card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.nosotros__icon-wrapper {
    width: 48px;
    height: 48px;
    background-color: var(--nos-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nosotros__icon-svg {
    width: 24px;
    height: 24px;
}

.nosotros__subtitle {
    font-size: 20px;
    font-weight: 700;
    color: var(--nos-black);
    margin: 0;
}

/* Desktop Identity */
@media (min-width: 1024px) {
    .nosotros__grid-split {
        grid-template-columns: 1fr 1fr;
        /* 50/50 split only on large screens */
    }

    .nosotros__card-item,
    .nosotros__values-card {
        padding: 40px;
        /* Restore large padding */
    }
}

/* --- 6. Certifications (Infinite Marquee) --- */
.nosotros__certifications {
    padding: 64px 0;
    background-color: #fff;
    overflow: hidden;
    /* Safety */
}

.nosotros__marquee {
    position: relative;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.nosotros__marquee-track {
    display: flex;
    gap: 80px;
    /* Space between logos */
    width: max-content;
    animation: scroll 30s linear infinite;
}

.nosotros__cert-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    /* Full color by default as requested */
    transition: all 0.3s ease;
}

.nosotros__cert-logo:hover {
    transform: scale(1.05);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Move half way (since we duplicated contents) */
}

/* Pause on hover if requested, or keep it flowing */
.nosotros__marquee:hover .nosotros__marquee-track {
    animation-play-state: paused;
}

/* Mobile Tweak */
@media (max-width: 767px) {
    .nosotros__cert-logo {
        height: 40px;
    }

    .nosotros__marquee-track {
        gap: 40px;
    }
}

/* --- 7. SERVICE SECTION (New Grid Layout) --- */
.nosotros__service-new {
    padding: 64px 0;
    background-color: var(--nos-light-gray);
}

/* Mobile: Stack (Map Top, Features Bottom) */
.nosotros__service-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

/* Map Card */
.nosotros__map-card {
    background: #fff;
    border-radius: 16px;
    /* Extracted: 16px */
    box-shadow: 0 8px 16px rgba(127, 136, 139, 0.4);
    /* Extracted shadow */
    padding: 0;
    /* Extracted: 0px (Image flush) */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
    height: 100%;
    /* Fill height */
}

/* Banner Title */
.nosotros__map-header {
    background-color: var(--nos-yellow);
    padding: 12px 24px;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 24px;
    max-width: 100%;
    /* Safety */
}

.nosotros__service-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--nos-black);
    margin: 0;
    line-height: 1.1;
}

.nosotros__service-subtitle {
    font-weight: 400;
    display: block;
    font-size: 16px;
    margin-top: 4px;
}

/* Map Image Logic */
.nosotros__map-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nosotros__map-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    /* Cover to fill if needed, or contain */
    display: block;
}

/* Feature Stack */
.nosotros__features-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* Extracted: 20px */
}

.nosotros__feature-card {
    background: #fff;
    padding: 25px;
    /* Extracted: 25px */
    border-radius: 16px;
    /* Extracted: 16px */
    box-shadow: 0 8px 16px rgba(127, 136, 139, 0.4);
    /* Extracted shadow */
    display: flex;
    flex-direction: column;
    /* Mobile: Stack icon + text */
    align-items: center;
    text-align: center;
    gap: 16px;
}

.nosotros__icon-circle-yellow {
    width: 40px;
    /* Extracted: 40px */
    height: 40px;
    background-color: var(--nos-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Adjust icon size inside circle */
.nosotros__icon-circle-yellow img,
.nosotros__icon-circle-yellow svg {
    width: 20px;
    height: auto;
}

.nosotros__feature-content {
    display: flex;
    flex-direction: column;
}

.nosotros__feature-title {
    font-size: 18px;
    /* Adjusted to match look */
    font-weight: 700;
    color: var(--nos-black);
    margin-bottom: 4px;
}

/* Desktop Service Grid */
@media (min-width: 1024px) {
    .nosotros__service-grid {
        grid-template-columns: 1.85fr 1fr;
        /* Extracted Ratio: 793px / 427px */
        align-items: stretch;
        /* Match heights */
        gap: 60px;
        /* Extracted: 60px */
    }

    .nosotros__map-card {
        padding: 40px;
    }

    .nosotros__feature-card {
        flex-direction: row;
        /* Row layout for features on desktop */
        text-align: left;
        padding: 25px;
        /* Ensure 25px on desktop too */
        align-items: center;
    }

    .nosotros__service-title {
        font-size: 28px;
    }

    .nosotros__service-subtitle {
        font-size: 20px;
    }
}