/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ==========================================================================
   FOOTER RESPONSIVE (ESTILO COMPACTO AUTOMOTRIZ)
   ========================================================================== */

@media (max-width: 768px) {

    /* 1. Forzar la fila del footer de Blocksy a ordenarse en 2 columnas compactas */
    [data-footer-row="middle"] .ct-container,
    .site-footer .ct-container-fluid,
    .mk-footer-grid-wrapper {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 24px 16px !important;
        align-items: start !important;
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }

    /* 2. El Logo ocupa el 100% arriba y se centra */
    .mk-footer-brand,
    [data-footer-row="middle"] .ct-column:nth-child(1) {
        grid-column: 1 / -1 !important;
        text-align: center !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 8px;
    }

    .mk-footer-brand .mk-footer-logo {
        max-width: 140px !important;
        margin: 0 auto !important;
    }

    /* 3. Columna Líneas Directas (Ocupa la columna izquierda) */
    .mk-footer-phones-simple,
    [data-footer-row="middle"] .ct-column:nth-child(2) {
        grid-column: 1 / 2 !important;
    }

    .mk-phones-list {
        gap: 8px !important;
    }

    .mk-phones-list li a {
        font-size: 0.82rem !important;
    }

    /* 4. Columna Navegación (Ocupa la columna derecha, alineada a Líneas Directas) */
    .mk-footer-nav,
    [data-footer-row="middle"] .ct-column:nth-child(3) {
        grid-column: 2 / 3 !important;
    }

    .mk-footer-links li a {
        font-size: 0.82rem !important;
    }

    /* 5. Columna Redes Sociales (Ocupa todo el ancho abajo, centrada) */
    .mk-footer-socials,
    [data-footer-row="middle"] .ct-column:nth-child(4) {
        grid-column: 1 / -1 !important;
        text-align: center !important;
        align-items: center !important;
        margin-top: 12px;
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mk-socials-desc {
        display: none; /* Ocultamos la descripción larga en mobile para ganar altura */
    }

    .mk-social-buttons {
        justify-content: center !important;
    }

    /* Títulos compactos en mobile */
    .mk-footer-col__title {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
    }
}

/* Logo Footer con tamaño balanceado */
.mk-footer-brand__img,
.ct-footer .widget_block img,
.ct-footer .wp-block-image img {
    width: 100%;
    max-width: 280px; /* Desktop: apenas más imponente */
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .mk-footer-brand__img,
    .ct-footer .widget_block img,
    .ct-footer .wp-block-image img {
        max-width: 220px; /* Mobile: tamaño justo y legible */
    }
}