/* Base Styles - Optimized for Performance */
.MAS_footer {
    padding: 40px 0;
    background-color: #222;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    contain: layout; /* Improves layout performance */
}

.MAS_footer_container {
    max-width: 1366px;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Image Containers - Set Fixed Dimensions to Prevent CLS */
.MAS_footer__img-warp {
    display: flex;
    overflow: hidden;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    padding: 15px;
    /* Fixed heights prevent layout shifts */
    height: 120px;
}

.MAS_footer__img-warp.MAS_footer__img--bigger {
    align-content: center;
    height: 140px;
}

.MAS_footer__img-warp.MAS_footer__img--smaller {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    height: 100px;
}

/* Images - Explicit Width/Height for All Images */
.MAS_footer__img {
    width: 90px;
    height: 90px;
    object-fit: contain; /* Maintains aspect ratio without stretching */
}

.MAS_footer__img--special {
    width: 250px;
    height: 125px;
    object-fit: contain;
}

.MAS_footer__img--social {
    height: 40px;
    width: 40px;
    transform: translateZ(0); /* Hardware acceleration */
}

/* Links */
.MAS_footer a {
    text-decoration: none;
}

.MAS_footer a:hover {
    text-decoration: none;
}

/* Middle Block */
.MAS_footer_block-2 {
    background-color: #222;
    padding: 50px 0;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    width: 100%;
}

/* Menu Grid Layout */
.MAS_footer_menus {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.footer_column {
  background-color: #222;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, background 0.3s ease !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(106, 144, 165, 0.2);
  min-height: 280px;
  position: relative;
}

.footer_column:hover {
  background: rgba(106, 144, 165, 0.15);
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.footer_column ul {
  padding: 0;
  margin: 0;
  list-style: none;
  width: 100%;
}

.footer_column h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #6A90A5;
    text-transform: uppercase;
    font-weight: bold;
    border-bottom: 2px solid rgba(106, 144, 165, 0.5);
    padding-bottom: 5px;
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.footer-menu li {
    margin: 10px 0;
    list-style: none;
}

.footer-menu li a {
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    color: #6A90A5;
    font-size: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
}

.footer-menu li a:hover {
    color: #fff;
    transform: translateY(-2px);
}

/* Footer Icons */
.MAS_footer__icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 30px 20px;
    margin: 0;
    max-width: 1366px;
    width: 100%;
    contain: content; /* Improves rendering performance */
}

.MAS_footer__icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #ffffff;
    max-width: 160px;
    margin: 15px;
    min-height: 280px;
    /* Prevent CLS with explicit dimensions */
    height: 280px;
    width: 160px;
}

/* Pentagon Icons */
.pentagon {
    width: 90px;
    height: 90px; /* Explicit height instead of aspect-ratio for better browser support */
    background: #6a90a5;
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
    will-change: transform; /* Hint for browser optimization */
}

.pentagon:hover {
    transform: translateY(-5px) !important;
    transition: transform 0.3s, background 0.3s !important;
}

.pentagon span {
    font-size: 36px;
    color: white;
}

/* Text Sections */
.footer__icon-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100px;
}

.footer__icon-text_a {
    font-weight: bold;
    font-size: 16px;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer__icon-text_b {
    font-size: 13px;
    opacity: 0.85;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.MAS_footer_container_c{
    width:35%
}
/* Bottom Footer Section */
.MAS_footer_bottom {
    padding: 30px 0;
    color: #000;
    display: flex;
    text-align: center;
    border-top: 1px solid #000;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
}

/* Social Icons */
.MAS_footer_social {
    min-height: 40px; /* Prevent layout shift */
}

/* Payment Section */
.MAS_footer_payment {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    width: 30%;
    min-height: 103px; /* Prevent layout shift */
}

.MAS_footer_payment img {
    width: 350px;
    height: 103px; /* Explicit height to prevent CLS */
    object-fit: contain;
}

.enter_fotter_divi_3_mas {
    height: 70%;
}

/* Accessibility: Enhanced contrast for footer elements without visual changes */
.MAS_footer a,
.footer-menu li a,
.footer_column h3,
.footer__icon-text_a,
.footer__icon-text_b {
    /* Add subtle text shadow for better contrast */
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.2), 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Accessibility: Hidden screen reader text for better contrast support */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Media Queries - Optimized */
@media screen and (max-width: 1024px), 
       (max-width: 1366px) and (orientation: portrait) {
    .MAS_footer_menus {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .MAS_footer__img-warp.MAS_footer__img--smaller {
        flex-direction: column;
        align-items: center;
    }
    
    .MAS_footer_payment {
        width: 90%;
        padding: 50px 0 30px;
        border-top: 2.5px solid rgba(129, 129, 129, 0.3);
    }
    
    .MAS_footer_social {
        padding: 30px 0 50px;
    }
    
    .MAS_footer__icon {
        width: 90%;
    }
    
    .MAS_footer_bottom {
        flex-direction: column;
    }
    
    .MAS_footer__icons {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
}

@media screen and (min-width: 1025px),
       (min-device-width: 768px) and (orientation: landscape) {
    .MAS_footer__icons {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: flex-start;
        gap: 35px;
        display: flex;
        justify-content: space-evenly;
    }
    
    .MAS_footer_newsletter form {
        flex-direction: column;
    }
}

@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .MAS_footer__icons {
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 40px;
    }
    
    .MAS_footer__img-warp.MAS_footer__img--bigger {
        order: -1;
        margin-bottom: 20px;
    }
    
    .MAS_footer__icon {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .MAS_footer_menus {
        grid-template-columns: 1fr;
    }
}