/* ======================================
   RESPONSIVE SECTIONS - CERTIFICACIONES & QUÉ HACEMOS
   Fixed with proper rem-based scaling
   ====================================== */

/* ====================
   REM-BASED FONT SCALING FIX
   ==================== */

/* Ensure proper base font-size scaling */
html {
    font-size: 14px; /* Base for mobile - smaller than desktop */
}

/* Tablet base font size adjustment */
@media (min-width: 768px) {
    html {
        font-size: 15px; /* Slightly larger for tablet */
    }
}

/* Desktop base font size */
@media (min-width: 1024px) {
    html {
        font-size: 16px; /* Standard desktop base */
    }
}

/* ====================
   CERTIFICACIONES SECTION - RESPONSIVE
   ==================== */

/* Mobile First - Certificaciones */
.hero-certifications {
    padding: 2rem 0; /* 28px mobile, 30px tablet, 32px desktop */
}

.certifications-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* 14px mobile, 15px tablet, 16px desktop */
}

.certifications-title {
    font-size: 1.14rem; /* 16px mobile, 17px tablet, 18px desktop */
    font-weight: 600;
    text-align: center;
    color: var(--color-text-primary, #093855);
    margin-bottom: 0.5rem;
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 21.4rem; /* ~300px mobile, scales up */
}

.certification-badge {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.57rem; /* 8px mobile, scales up */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 0.5rem;
    box-shadow: 0 0.14rem 0.57rem rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.certification-badge:hover {
    transform: translateY(-0.14rem);
    box-shadow: 0 0.29rem 0.86rem rgba(0, 0, 0, 0.15);
}

.certification-badge img {
    width: 100%;
    height: auto;
    max-height: 3.57rem; /* 50px mobile, scales up */
    object-fit: contain;
}

/* Tablet - Certificaciones */
@media (min-width: 768px) {
    .hero-certifications {
        padding: 3.33rem 0; /* 50px tablet */
    }

    .certifications-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2rem; /* 30px tablet */
    }

    .certifications-title {
        font-size: 1.2rem; /* 18px tablet */
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .certifications-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 26.7rem; /* 400px tablet */
        gap: 1.33rem; /* 20px tablet */
    }

    .certification-badge img {
        max-height: 4rem; /* 60px tablet */
    }
}

/* Desktop - Certificaciones */
@media (min-width: 1024px) {
    .hero-certifications {
        padding: 4rem 0; /* 64px desktop */
    }

    .certifications-wrapper {
        gap: 2.5rem; /* 40px desktop */
    }

    .certifications-title {
        font-size: 1.5rem; /* 24px desktop */
    }

    .certifications-grid {
        max-width: 31.25rem; /* 500px desktop */
        gap: 1.5rem; /* 24px desktop */
    }

    .certification-badge img {
        max-height: 4.375rem; /* 70px desktop */
    }
}

/* ====================
   QUÉ HACEMOS SECTION - RESPONSIVE
   ==================== */

/* Mobile First - Qué hacemos */
.que-hacemos-section {
    padding: 3rem 0; /* 42px mobile, 45px tablet, 48px desktop */
}

.que-hacemos-section .container {
    width: var(--container-mobile, calc(100% - 32px));
    padding: 0 1rem;
    margin: 0 auto;
    max-width: none;
}

.section-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* 28px mobile, scales up */
}

.content-left {
    order: 2;
}

.content-right {
    order: 1;
}

.section-title-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.decorative-element {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.decorative-element svg {
    width: 1.71rem; /* 24px mobile, scales up */
    height: auto;
}

.section-title {
    font-size: 1.71rem; /* 24px mobile, 27px tablet, 32px desktop */
    line-height: 1.2;
    font-weight: 700;
    color: var(--color-text-primary, #093855);
    margin: 0;
}

.section-description {
    font-size: 1rem; /* 14px mobile, 15px tablet, 16px desktop */
    line-height: 1.5;
    color: var(--color-text-secondary, #333);
    margin-bottom: 1.5rem;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem; /* 10.5px mobile, scales up */
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.bullet-icon {
    width: 0.57rem; /* 8px mobile, scales up */
    height: 0.57rem;
    background-color: var(--color-primary, #EB6929);
    border-radius: 50%;
    margin-top: 0.57rem;
    flex-shrink: 0;
}

.benefit-text {
    font-size: 1rem; /* Matches body text */
    line-height: 1.5;
    color: var(--color-text-secondary, #333);
}

.image-wrapper {
    position: relative;
    width: 100%;
    height: 17.86rem; /* 250px mobile, scales up */
    border-radius: 0.5rem;
    overflow: hidden;
}

.bg-contrast {
    position: absolute;
    top: -0.71rem;
    left: -0.71rem;
    right: 0.71rem;
    bottom: 0.71rem;
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    border-radius: 0.5rem;
    z-index: 1;
}

.top-image {
    position: relative;
    width: 100%;
    height: 100%;
    background-image: url('../assets/pages-assets/home/service_img_1.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 0.5rem;
    z-index: 2;
}

/* Tablet - Qué hacemos */
@media (min-width: 768px) {
    .que-hacemos-section {
        padding: 4rem 0; /* 60px tablet */
    }

    .que-hacemos-section .container {
        width: var(--container-tablet, calc(100% - 64px));
        padding: 0 2rem;
    }

    .section-wrapper {
        flex-direction: row;
        align-items: stretch;
        gap: 2.67rem; /* 40px tablet */
    }

    .content-left {
        flex: 1;
        order: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .content-right {
        flex: 1;
        order: 2;
    }

    .section-title-wrapper {
        align-items: flex-start;
        text-align: left;
    }

    .decorative-element {
        justify-content: flex-start;
    }

    .decorative-element svg {
        width: 1.8rem; /* 27px tablet */
    }

    .section-title {
        font-size: 1.8rem; /* 27px tablet */
    }

    .image-wrapper {
        height: 26.67rem; /* 400px tablet */
    }
}

/* Desktop - Qué hacemos */
@media (min-width: 1024px) {
    .que-hacemos-section {
        padding: 5rem 0; /* 80px desktop */
    }

    .que-hacemos-section .container {
        width: var(--container-desktop, 1200px);
        padding: 0;
    }

    .section-wrapper {
        gap: 3rem; /* 48px desktop */
    }

    .section-title {
        font-size: 2rem; /* 32px desktop */
    }

    .section-description {
        font-size: 1.125rem; /* 18px desktop */
    }

    .benefit-text {
        font-size: 1.125rem; /* 18px desktop */
    }

    .image-wrapper {
        height: 31.25rem; /* 500px desktop */
    }

    .decorative-element svg {
        width: 1.69rem; /* 27px desktop */
    }
}

/* ====================
   TOUCH-FRIENDLY ENHANCEMENTS
   ==================== */

/* Touch targets for certification badges */
@media (hover: none) and (pointer: coarse) {
    .certification-badge {
        min-height: 2.75rem; /* 44px minimum touch target */
        min-width: 2.75rem;
        padding: 0.75rem;
    }
}

/* ====================
   HIGH CONTRAST & ACCESSIBILITY
   ==================== */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .certification-badge {
        border: 0.14rem solid var(--color-text-primary, #093855);
    }
    
    .bullet-icon {
        border: 0.07rem solid var(--color-text-primary, #093855);
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .certification-badge {
        transition: none;
    }
}

/* ====================
   FOCUS STATES
   ==================== */

.certification-badge:focus-within {
    outline: 0.14rem solid var(--color-primary, #EB6929);
    outline-offset: 0.14rem;
}

/* ====================
   PRINT STYLES
   ==================== */

@media print {
    .que-hacemos-section {
        page-break-inside: avoid;
        padding: 1.25rem 0;
    }
    
    .certification-badge {
        box-shadow: none;
        border: 0.07rem solid #ddd;
    }
}

/* ====================
   VERY LARGE SCREENS
   ==================== */

@media (min-width: 1440px) {
    html {
        font-size: 18px; /* Larger base for very large screens */
    }
    
    .que-hacemos-section {
        padding: 6rem 0; /* More breathing room */
    }
    
    .section-title {
        font-size: 2.22rem; /* 40px on large screens */
    }
}