/* =========================================
   MOBILE NATIVE OPTIMIZATIONS
   (Carousels, Forms, Global Modals)
   ========================================= */

@media (max-width: 768px) {

    /* --- 1. NATIVE CAROUSEL FEEL (Horizontal Scroll) --- */
    .programas-grid {
        display: flex !important;
        grid-template-columns: none !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        gap: 1.5rem !important;
        padding: 0 12.5vw 2rem !important;
        /* Center snapping: (100-75)/2 = 12.5vw */
        justify-content: flex-start !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Cards in Carousel */
    .programa-card {
        min-width: 75vw !important;
        max-width: 75vw !important;
        scroll-snap-align: center;
        margin: 0 !important;
        transform: scale(0.98);
        transition: transform 0.3s ease;
    }

    .programa-card:hover {
        transform: none !important;
    }

    /* Hide desktop arrows if generic carousel controls exist */
    .carousel-btn {
        display: none !important;
    }

    /* --- 2. NATIVE FORM EXPERIENCE --- */
    /* Full Screen Modals (Admision/General) */
    .modal-content {
        max-height: 100vh !important;
        height: 100% !important;
        width: 100% !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 1.5rem !important;
        display: flex;
        flex-direction: column;
    }

    .modal-header {
        position: sticky;
        top: 0;
        z-index: 10;
        background: inherit;
        padding-top: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        flex-shrink: 0;
    }

    .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4rem;
    }

    /* Large Touch-Friendly Inputs */
    .form-group input,
    .form-group select,
    .form-group textarea,
    .multiselect-trigger {
        font-size: 16px !important;
        /* Prevents iOS zoom */
        padding: 1rem !important;
        height: auto !important;
        min-height: 50px;
    }

    .multiselect-option {
        padding: 1rem !important;
        font-size: 1rem !important;
    }

    input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    /* Scoped Sticky Action Buttons - Only for Modals */
    .modal-content form button[type="submit"] {
        position: sticky;
        bottom: 0;
        padding: 1rem;
        margin-top: auto;
        z-index: 10;
        width: 100%;
    }

    /* --- 3. GENERAL SECTION TWEAKS --- */
    .hero-title {
        font-size: 2.5rem !important;
    }

    .section-header {
        margin-bottom: 2rem !important;
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    /* Fix for Phone Input Container on Mobile */
    .phone-input-container {
        min-height: 50px;
    }

    .phone-input-container input {
        height: 50px !important;
        font-size: 0.9rem !important;
        /* Reduced for proportionality */
    }

    .country-code {
        height: 50px !important;
        line-height: 50px;
        font-size: 0.8rem !important;
        /* Reduced to fit better */
    }

    /* --- 4. CONTACT SECTION FIXES --- */
    .contacto-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }

    .contacto-info h2 {
        font-size: 1.75rem !important;
        line-height: 1.2;
        word-wrap: break-word;
    }

    .contacto-info>p {
        font-size: 1rem !important;
    }

    .contacto-form {
        padding: 1.5rem !important;
        width: 100% !important;
        box-sizing: border-box;
    }

    /* Ensure Contact Form Button is visible and normal */
    .contacto-form button[type="submit"] {
        position: static !important;
        width: 100%;
        margin-top: 1rem;
        background: var(--gradient-primary) !important;
    }

    .info-items {
        gap: 1.5rem;
    }

    .info-item {
        align-items: flex-start;
    }

    /* --- 5. FOOTER COMPACT MODE --- */
    .footer {
        padding: 2rem 0 1rem;
    }

    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
        text-align: left;
    }

    .footer-col:first-child {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 1rem;
    }

    .footer-logo {
        height: 50px;
        margin: 0 auto 1rem;
    }

    .social-links {
        justify-content: center;
        margin-bottom: 0;
    }

    .footer-col h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer-links a {
        font-size: 0.9rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding-top: 1.5rem;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* --- 6. EXCELENCIA GRID FIX (Unified Container) --- */
    .excelencia-grid {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 20px !important;
        overflow: hidden;
        margin-bottom: 2rem;
    }

    .excelencia-card {
        padding: 2rem 1.5rem !important;
        border: none !important;
        background: transparent !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 !important;
        text-align: left !important;
        display: grid !important;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 1rem;
        row-gap: 0.25rem;
        align-items: start;
    }

    .excelencia-card:last-child {
        border-bottom: none !important;
    }

    .excelencia-icon {
        margin: 0 !important;
        width: 50px !important;
        height: 50px !important;
        flex-shrink: 0;
        grid-column: 1;
        grid-row: 1 / -1;
        align-self: center;
    }

    .excelencia-icon svg {
        width: 24px !important;
        height: 24px !important;
    }

    .excelencia-card h3 {
        margin-bottom: 0.25rem !important;
        font-size: 1.1rem !important;
        grid-column: 2;
        grid-row: 1;
    }

    .excelencia-card p {
        font-size: 0.9rem !important;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        grid-column: 2;
        grid-row: 2;
    }

    .excelencia-card>div:last-child {
        display: contents;
        /* Allow children to participate in grid */
    }

    /* --- 7. ADMISIONES SECTION FIX (Unified List) --- */
    .proceso-timeline {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 20px !important;
        overflow: hidden;
        margin-top: 1rem;
        margin-bottom: 2rem;
    }

    .timeline-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 1rem !important;
        padding: 1.5rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        text-align: left !important;
    }

    .timeline-item:last-child {
        border-bottom: none !important;
    }

    .timeline-number {
        margin: 0 !important;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        font-size: 1.25rem !important;
        flex-shrink: 0;
    }

    .timeline-content {
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        min-height: auto !important;
        height: auto !important;
        width: 100% !important;
        text-align: left !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .timeline-content h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
        text-align: left !important;
    }

    .timeline-content p {
        font-size: 0.9rem !important;
        margin: 0 !important;
        line-height: 1.4 !important;
        text-align: left !important;
    }

    .proceso-timeline::before {
        display: none !important;
    }
}

/* --- 8. SMART FILTERS FOR MOBILE (Clean Grid) --- */
@media (max-width: 768px) {
    .filter-system {
        display: grid !important;
        grid-template-columns: 1fr !important;
        /* Stack vertically to avoid squishing */
        gap: 0.75rem;
        background: rgba(255, 255, 255, 0.03);
        /* Subtle container bg */
        padding: 1rem;
        border-radius: 16px;
        margin-bottom: 2rem;
    }

    .filter-group {
        margin-bottom: 0 !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        /* Stack label/input inside grid cell */
    }

    /* Remove specific override for last child since now all are full width */
    .filter-group:last-child {
        grid-column: auto;
    }

    .filter-label {
        font-size: 0.75rem !important;
        margin-bottom: 0.25rem !important;
        color: var(--gray-400);
        margin-right: 0 !important;
    }

    .custom-select {
        width: 100% !important;
        height: 44px !important;
    }

    .select-trigger {
        height: 100% !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 12px !important;
        padding: 0 0.75rem !important;
        justify-content: space-between !important;
        color: var(--text-primary);
        font-size: 0.85rem !important;
    }

    .select-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 90%;
    }

    /* Keep the bottom sheet behavior for dropdowns as it's good UX, 
       but ensure the visual trigger is clean */
    .select-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-height: 50vh !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 1.5rem !important;
        background: #1a1a1a !important;
        z-index: 1000 !important;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: none;
    }

    .custom-select.active .select-dropdown {
        transform: translateY(0) !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .custom-select.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(2px);
        z-index: 999;
    }

    /* Light mode adjustments */
    body.light-mode .filter-system {
        background: #f8f9fa;
        border: 1px solid #e2e8f0;
    }

    body.light-mode .select-trigger {
        background: #ffffff !important;
        border-color: #cbd5e0 !important;
        color: #2d3748;
    }

    body.light-mode .select-dropdown {
        background: #ffffff !important;
        color: #1a202c;
    }
}

/* --- 9. TESTIMONIALS SLIDER MOBILE FIX --- */
@media (max-width: 768px) {
    .testimonios-slider {
        touch-action: pan-y pinch-zoom;
        /* Allow vertical, prevent horizontal if needed */
        overflow-x: hidden;
        position: relative;
    }

    /* Ensure buttons are clickable */
    .slider-btn {
        width: 40px !important;
        height: 40px !important;
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.4) !important;
        z-index: 20;
    }

    .slider-btn.prev {
        left: 5px !important;
    }

    .slider-btn.next {
        right: 5px !important;
    }

    /* Force content to stack but slide */
    .slide-track {
        display: flex;
        transition: transform 0.3s ease;
    }

    .testimonio-card {
        flex: 0 0 100%;
        width: 100%;
        box-sizing: border-box;
        opacity: 0;
        position: absolute;
        top: 0;
        left: 0;
        padding: 2rem 3rem !important;
        /* Space for arrows */
        transition: opacity 0.3s ease;
        pointer-events: none;
        /* Let clicks pass to arrows if overlapping */
    }

    .testimonio-card.active {
        opacity: 1;
        position: relative;
        pointer-events: auto;
    }

    .testimonio-quote {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
}

/* --- 10. PROGRAM CAROUSEL BUTTONS MOBILE FIX --- */
@media (max-width: 768px) {
    .carousel-btn {
        display: flex !important;
        width: 40px !important;
        height: 40px !important;
        opacity: 1 !important;
        background: rgba(0, 0, 0, 0.4) !important;
        z-index: 20;
        top: 50% !important;
        transform: translateY(-50%);
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        position: absolute;
        border: none;
        color: white !important;
    }

    .carousel-btn svg {
        width: 20px;
        height: 20px;
    }

    .carousel-btn.prev {
        left: 5px !important;
    }

    .carousel-btn.next {
        right: 5px !important;
    }

    .carousel-wrapper {
        position: relative;
    }
}

/* --- 1. OVERRIDE CAROUSEL TO MATCH MODELO EDUCATIVO --- */
@media (max-width: 768px) {
    .programas-grid {
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 -1rem !important;
        width: calc(100% + 2rem) !important;
        scroll-padding: 0 !important;
    }

    .programa-card {
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        transform: none !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        padding: 2rem 1.5rem !important;
    }
}

/* --- 11. UNIFY PROGRAM CAROUSEL CONTROLS --- */
@media (max-width: 768px) {
    .carousel-wrapper {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        position: relative;
        padding-bottom: 2rem;
    }

    .programas-grid {
        order: 1;
        margin-bottom: 0.5rem !important;
    }

    .carousel-btn {
        position: static !important;
        width: 50px !important;
        height: 50px !important;
        border-radius: 50%;
        background: var(--glass-bg);
        order: 2;
        margin: 0 0.5rem;
        transform: none !important;
        opacity: 1 !important;
        color: var(--text-primary) !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-sm);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .carousel-btn.prev {
        order: 2;
        left: auto !important;
    }

    .carousel-btn.next {
        order: 3;
        right: auto !important;
    }

    .carousel-btn svg {
        width: 24px;
        height: 24px;
        stroke-width: 2px;
    }

    /* Optional: Disabled state */
    .carousel-btn.disabled {
        opacity: 0.3 !important;
        pointer-events: none;
    }
}

/* --- 12. SEPARATION FIX & UNIFIED BUTTONS --- */
@media (max-width: 768px) {
    .programas-grid {
        gap: 1rem !important;
        /* Restore gap for separation */
        scroll-padding: 0 1rem;
    }

    .programa-card {
        margin-right: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        border-radius: 12px !important;
        /* Slight radius for card feel */
        background: rgba(255, 255, 255, 0.02);
        /* Slight bg to see edges if needed, or rely on content */
    }

    /* Ensure slider buttons match carousel buttons exactly */
    .slider-btn {
        width: 50px !important;
        height: 50px !important;
        border-radius: 50% !important;
        background: var(--glass-bg) !important;
        color: var(--text-primary) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        opacity: 1 !important;
        transform: none !important;
        position: static !important;
        /* Part of the flex flow controls */
        margin: 0 0.5rem !important;
        box-shadow: var(--shadow-sm) !important;
    }

    .slider-btn svg {
        width: 24px !important;
        height: 24px !important;
        stroke-width: 2px !important;
    }

    /* Center text in testimonials for better mobile look */
    .testimonio-text {
        text-align: center;
    }

    .slider-controls {
        margin-top: 1rem;
    }
}

/* --- 13. HERO & GOOGLE LABS STYLE ANIMATION --- */
/* --- 13. HERO & GOOGLE LABS STYLE ANIMATION (REVAMPED) --- */
@media (max-width: 768px) {
    .hero {
        min-height: 95vh !important;
        /* Increased length as requested */
        height: auto !important;
        padding-top: 110px !important;
        /* Increased padding to account for fixed header */
        padding-bottom: 2rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        position: relative;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Center everything vertically together */
        gap: 2.5rem;
        /* Increased spacing for breathing room */
        width: 100%;
        height: auto;
        /* Let content dictate height, no forced spreading */
        text-align: center;
        z-index: 2;
        padding-top: 1rem !important;
    }

    /* VIVID ANIMATED BACKGROUND */
    .hero-background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 0;
        overflow: hidden;
    }

    .animated-shapes .shape {
        position: absolute;
        border-radius: 50%;
        filter: blur(50px);
        opacity: 0.7;
        /* Increased opacity */
        animation: activeFloat 8s infinite alternate ease-in-out;
    }

    .shape-1 {
        background: radial-gradient(circle, var(--blue-primary), transparent);
        top: -10%;
        left: -20%;
        width: 300px;
        height: 300px;
        animation-delay: 0s;
    }

    .shape-2 {
        background: radial-gradient(circle, var(--secondary-color), transparent);
        bottom: 10%;
        right: -20%;
        width: 250px;
        height: 250px;
        animation-delay: -2s;
    }

    .shape-3 {
        display: block !important;
        background: radial-gradient(circle, #ff00de, transparent);
        /* Extra pop color */
        top: 40%;
        left: 40%;
        width: 150px;
        height: 150px;
        animation-delay: -4s;
        opacity: 0.5;
    }

    @keyframes activeFloat {
        0% {
            transform: translate(0, 0) scale(1);
        }

        100% {
            transform: translate(30px, 50px) scale(1.2);
        }
    }

    /* SPECTACULAR TEXT ANIMATION */
    .hero-title {
        font-size: 2.5rem !important;
        /* Smaller than 3rem but still big */
        line-height: 1.1;
        letter-spacing: -0.03em;
        margin-bottom: 0.5rem;
    }

    .title-line {
        display: block;
    }

    /* Shimmering Gradient Text */
    .gradient-text {
        background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6);
        background-size: 200% auto;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        animation: shineText 3s linear infinite;
    }

    @keyframes shineText {
        to {
            background-position: 200% center;
        }
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
        color: var(--text-secondary);
        max-width: 90%;
        margin: 0 auto !important;
        line-height: 1.4;
    }

    /* COMPACT BUTTONS (Side by Side) */
    .hero-cta {
        display: flex !important;
        flex-direction: row !important;
        /* Side by side to save height */
        gap: 0.75rem;
        justify-content: center;
        width: 100%;
        margin-top: 1rem;
    }

    .btn {
        width: auto !important;
        flex: 1;
        padding: 0.75rem 1rem !important;
        /* Smaller padding */
        font-size: 0.9rem !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-secondary {
        border: 1px solid rgba(0, 0, 0, 0.1);
        background: rgba(255, 255, 255, 0.5);
    }

    /* STATS GRID (Micro-Cards) */
    .hero-stats {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin-top: 0;
        /* Natural flow */
        width: 100%;
    }

    .stat-card {
        padding: 0.5rem !important;
        min-height: auto !important;
        background: rgba(255, 255, 255, 0.15) !important;
        /* Morevisible glass */
        border: 1px solid rgba(255, 255, 255, 0.2);
        backdrop-filter: blur(12px);
    }

    .stat-number {
        font-size: 1.25rem !important;
        margin-bottom: 0;
    }

    .stat-label {
        font-size: 0.65rem !important;
        font-weight: 500;
        opacity: 0.9;
    }
}

/* --- 14. HERO LAYOUT & SPACING UPDATE (FULL SCREEN) --- */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh !important;
        /* Force full screen height */
        padding-top: 110px !important;
        padding-bottom: 6rem !important;
        /* Push next section way down */
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .hero-content {
        gap: 2.5rem !important;
        /* More breathing room between Title, Buttons, Stats */
        justify-content: center !important;
        flex-grow: 1;
        /* Allow content to expand */
    }

    .hero-title {
        font-size: 2.2rem !important;
        /* Restore slightly larger size for impact */
        margin-bottom: 0.5rem !important;
    }

    .hero-cta {
        margin-top: 2rem !important;
        /* Separate buttons from text */
        margin-bottom: 1rem !important;
    }
}

/* --- 15. CONTACT FORM FONT SIZE FIX (AGGRESSIVE) --- */
@media (max-width: 768px) {

    /* Target specifically the phone inputs */
    /* High specificity to override styles.css */
    form .phone-input-container select.country-code,
    form .phone-input-container input.input-lg,
    .phone-input-container input[type="tel"],
    .country-code option {
        font-size: 13px !important;
        /* Fixed pixel size to ensure smallness */
        line-height: normal !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        height: auto !important;
    }

    .phone-group label.phone-label {
        font-size: 0.75rem !important;
        top: -8px !important;
    }
}

/* --- NOSOTROS PAGE MOBILE FIXES --- */
@media (max-width: 768px) {

    /* 1. Misión y Visión (Unified Container) */
    .mision-vision-grid {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 20px !important;
        overflow: hidden;
        margin-bottom: 2rem;
    }

    .mv-card {
        padding: 2rem 1.5rem !important;
        border: none !important;
        background: transparent !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 !important;
        text-align: left !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .mv-card:last-child {
        border-bottom: none !important;
    }

    .mv-icon {
        width: 50px !important;
        height: 50px !important;
        background: var(--gradient-primary) !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 0 !important;
    }

    .mv-icon svg {
        width: 24px !important;
        height: 24px !important;
        color: white !important;
    }

    .mv-card h3 {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }

    .mv-card p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        color: var(--gray-300) !important;
    }


    /* 2. Valores / Principios (Unified Container) */
    .valores-grid {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 20px !important;
        overflow: hidden;
        margin-bottom: 2rem;
    }

    .valor-item {
        padding: 1.5rem !important;
        border: none !important;
        background: transparent !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 0 !important;
        text-align: left !important;
        display: grid !important;
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
        column-gap: 1rem;
        row-gap: 0.5rem;
        align-items: start;
        margin: 0 !important;
        /* FORCE REMOVAL OF GAPS */
        box-shadow: none !important;
        /* FORCE REMOVAL OF SHADOWS/GLOWS */
    }

    .valor-item:last-child {
        border-bottom: none !important;
    }

    .valor-number {
        /* Icon-like container style */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        border-radius: 10px !important;
        background: rgba(255, 215, 0, 0.1) !important;
        border: 1px solid rgba(255, 215, 0, 0.2) !important;

        /* Font styling */
        font-size: 1rem !important;
        font-weight: 700 !important;
        color: #FFD700 !important;
        -webkit-text-fill-color: #FFD700 !important;
        background-image: none !important;
        /* Remove text gradient from base styles */

        /* Alignment */
        grid-column: 1;
        grid-row: 1 / -1;
        align-self: flex-start !important;
        margin-top: 0 !important;
    }

    body.light-mode .valor-number {
        background: rgba(0, 0, 0, 0.05) !important;
        border-color: rgba(0, 0, 0, 0.1) !important;
        color: #111827 !important;
        -webkit-text-fill-color: #111827 !important;
    }

    .valor-item h4 {
        grid-column: 2;
        grid-row: 1;
        font-size: 1.1rem !important;
        margin-bottom: 0 !important;
        color: var(--white);
        font-weight: 700;
    }

    .valor-item p {
        grid-column: 2;
        grid-row: 2;
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        color: var(--gray-300) !important;
        margin: 0 !important;
    }


    /* 3. Nuestra Historia (Unified Box Style) */
    .nosotros-block {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 20px !important;
        padding: 2rem 1.5rem !important;
        text-align: left !important;
    }

    .nosotros-block .block-icon {
        width: 50px !important;
        height: 50px !important;
        background: var(--gradient-primary) !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 0 0 1.5rem 0 !important;
    }

    .nosotros-block .block-icon svg {
        width: 24px !important;
        height: 24px !important;
        color: white !important;
    }

    .nosotros-block h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    .nosotros-block p {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
        color: var(--gray-300) !important;
        margin-bottom: 1rem !important;
    }

    /* Light Mode Overrides for these mobile components */
    body.light-mode .mision-vision-grid,
    body.light-mode .valores-grid,
    body.light-mode .nosotros-block {
        background: #ffffff !important;
        border: 1px solid #e5e7eb !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    }

    body.light-mode .mv-card,
    body.light-mode .valor-item {
        border-bottom: 1px solid #e5e7eb !important;
    }

    body.light-mode .mv-card h3,
    body.light-mode .valor-item h4,
    body.light-mode .nosotros-block h2 {
        color: #111827 !important;
    }

    body.light-mode .mv-card p,
    body.light-mode .valor-item p,
    body.light-mode .nosotros-block p {
        color: #4b5563 !important;
    }

    /* 4. CTA Section Mobile Fixes (Compact) */
    .cta-nosotros {
        padding: 3rem 0 !important;
        /* Reduced top/bottom padding */
    }

    .cta-content.glass {
        padding: 2rem 1.5rem !important;
        /* Compact inner padding */
        text-align: center !important;
    }

    .cta-content h2 {
        font-size: 1.75rem !important;
        /* Smaller title */
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }

    .cta-content p {
        font-size: 0.95rem !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.5 !important;
        max-width: 100% !important;
    }

    /* Make buttons compact and side-by-side if possible, or stacked compactly */
    .cta-buttons {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100% !important;
    }

    .cta-buttons .btn {
        width: 100% !important;
        padding: 0.75rem 1rem !important;
        /* Compact button padding */
        font-size: 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}