/* ==========================================================================
   MG Custom Footer Styles
   ========================================================================== */

.mg-custom-footer {
    width: 100%;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

.mg-custom-footer * {
    box-sizing: border-box;
}

/* Footer Top Area */
.mg-footer-top {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
}

/* Logo Column */
.mg-footer-logo-col {
    flex: 1 1 250px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.mg-footer-logo-main {
    max-width: 180px;
    height: auto;
    display: block;
}

/* Grid for Links Columns */
.mg-footer-grid {
    flex: 3 1 600px;
    display: grid;
    gap: 30px;
}

/* Dynamic columns classes based on settings */
.mg-footer-grid.cols-1 { grid-template-columns: 1fr; }
.mg-footer-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.mg-footer-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.mg-footer-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Individual Column */
.mg-footer-col {
    display: flex;
    flex-direction: column;
}

.mg-footer-col-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px !important;
    line-height: 1.2;
    text-transform: none;
}

.mg-footer-col-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mg-footer-line {
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.mg-footer-line a {
    text-decoration: none !important;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.mg-footer-line a:hover {
    opacity: 1;
}

/* Footer Bottom (Subfooter) */
.mg-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mg-footer-bottom-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

/* Credits & Secondary Logo */
.mg-footer-credits {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.mg-footer-logo-sec {
    height: 30px;
    width: auto;
    object-fit: contain;
    display: block;
}

.mg-footer-credits-text {
    font-size: 13px;
    line-height: 1.4;
}

/* Right Side: Social & Sub-menu */
.mg-footer-right-block {
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* Sub-footer Horizontal Menu */
.mg-footer-bottom-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mg-footer-bottom-menu li {
    margin: 0 !important;
    padding: 0 !important;
}

.mg-footer-bottom-menu a {
    font-size: 13px;
    text-decoration: none !important;
    transition: color 0.25s ease;
}

/* Social Icons */
.mg-footer-social-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mg-footer-social-label {
    font-size: 14px;
    font-weight: 500;
}

.mg-footer-social-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mg-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    color: #000000;
    border-radius: 50%;
    text-decoration: none !important;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.mg-social-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.mg-social-icon:hover {
    transform: translateY(-3px);
    background-color: #e50012; /* Color MG Red en hover */
    color: #ffffff;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 1024px) {
    .mg-footer-grid.cols-3,
    .mg-footer-grid.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mg-footer-top {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    
    .mg-footer-logo-col {
        justify-content: center;
        width: 100%;
    }
    
    .mg-footer-grid {
        width: 100%;
    }
    
    .mg-footer-grid.cols-2,
    .mg-footer-grid.cols-3,
    .mg-footer-grid.cols-4 {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .mg-footer-col-title {
        margin-bottom: 12px !important;
    }
    
    .mg-footer-bottom-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 25px;
    }
    
    .mg-footer-credits {
        flex-direction: column;
        justify-content: center;
    }
    
    .mg-footer-right-block {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .mg-footer-bottom-menu {
        justify-content: center;
        gap: 10px 15px;
    }
}

/* Ocultar el footer nativo por defecto en Divi para dar paso al MG Custom Footer */
#main-footer {
    display: none !important;
}
