/* Page-specific styles for contact.html */
.tmgm-header-wrapper {
    height: 420px !important;
}

@media only screen and (max-width: 768px) {
    .tmgm-header-wrapper {
        height: 300px !important;
    }
}

@media only screen and (max-width: 500px) {
    .tmgm-header-wrapper {
        height: 250px !important;
    }
}

/* === Mobile Responsive Fixes === */

/* Full-width responsive wrapper on mobile */
@media only screen and (max-width: 768px) {
    .responsive-wrapper {
        padding: 40px 16px !important;
    }
}

@media only screen and (max-width: 500px) {
    .responsive-wrapper {
        padding: 30px 12px !important;
    }

    /* Header page content - reduce top padding for small screens */
    .tmgm-header-page-content {
        padding-top: 100px !important;
    }
}

/* animated-languages: make fluid instead of fixed 540px */
@media only screen and (max-width: 768px) {
    .animated-languages {
        width: 100% !important;
        max-width: 400px;
        height: auto !important;
        aspect-ratio: 540 / 416;
        transform: none !important;
        left: auto !important;
        margin: 20px auto !important;
    }

    .animated-languages img {
        width: 100% !important;
        height: auto !important;
    }

    /* Language popups - reposition for smaller container */
    .animated-languages .lang-pop.lang-cn { right: 10% !important; top: 25% !important; }
    .animated-languages .lang-pop.lang-es { left: 30% !important; top: 26% !important; }
    .animated-languages .lang-pop.lang-me { left: 50% !important; top: 38% !important; direction: ltr; }
}

/* Section title sizing on mobile */
@media only screen and (max-width: 768px) {
    h2.fs-1.h2-section-1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
}

@media only screen and (max-width: 500px) {
    h2.fs-1.h2-section-1 {
        font-size: 20px !important;
    }
}

.p-section-1 {
    font-size: 22px;
    line-height: 32px;
    color: #464646;
}

@media(max-width: 575px) {
    .p-section-1 {
        font-size: 18px;
        line-height: 26px;
    }
}

.p-section-2 {
    color: #464646;
}

.p-link {
    cursor: pointer;
    color: #1B79DE;
    font-family: 'NunitoSans-Bold';
}

ol.ol-custom {
    padding-left: 1rem;
}

ol.ol-custom li {
    color: #464646;
    padding-left: 5px;
    margin-bottom: 5px;
}

.h2-section-1 {
    font-weight: 600;
    color: #464646;
}

.h4-section-1 {
    color: #1B79DE;
    font-weight: 600;
}

.card-section-1 {
    box-shadow: 0px 12px 24px #D9E7F1;
    border: none !important;
    border-radius: 10px !important;
}

.card-section-1>div p {
    color: #838386;
    font-size: 15px;
}

.img-circle {
    width: 64px;
    height: 64px;
    border-radius: 64px;
    background-color: #EEF3FE;
}

.tm-locations-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 60px;
    text-align: center;
}

.tm-locations-wrap>div {
    flex: 0 0 33.33%;
    margin-bottom: 30px;
    padding: 0 30px;
}

@media(max-width: 767px) {
    .tm-locations-wrap>div {
        flex: 0 0 50% !important;
    }
}

@media(max-width: 575px) {
    .tm-locations-wrap>div {
        flex: 0 0 100% !important;
    }
}

.flex-section-5 {
    flex-wrap: wrap;
    justify-content: center;
}

.flex-section-5>div {
    border-bottom: 1px solid rgba(0, 0, 0, .18);
    border-right: 1px solid rgba(0, 0, 0, .18);
    flex: 0 0 20%;
    text-align: center;
}

.flex-section-5>div:last-child,
.flex-section-5>div:nth-child(5n) {
    border-right: none;
}

@media(max-width: 767px) {
    .flex-section-5>div {
        border: none;
        flex: 0 0 50%;
    }
}

.animated-languages {
    display: inline-block;
    height: 416px;
    margin: 0 auto;
    position: relative;
    width: 540px;
}

.animated-languages .lang-pop {
    background-color: #176af3;
    border-radius: 6px;
    color: rgba(0, 0, 0, .68);
    color: #fff;
    display: none;
    font-size: 14px;
    font-weight: 700;
    padding: 11px 17px;
    position: absolute;
}

.animated-languages .lang-pop.lang-en {
    bottom: 90px;
    right: 30px;
}

.animated-languages .lang-pop:before {
    border: 10px solid transparent;
    border-top-color: #176af3;
    bottom: -16px;
    content: "";
    left: calc(50% - 10px);
    left: -webkit-calc(50% - 10px);
    position: absolute
}

.animated-languages .lang-pop:after {
    background-color: #40dcfd;
    border-radius: 50%;
    bottom: -30px;
    content: "";
    height: 14px;
    left: calc(50% - 7px);
    left: -webkit-calc(50% - 7px);
    position: absolute;
    width: 14px
}

.animated-languages .lang-pop.lang-en {
    bottom: 90px;
    right: 30px
}

.animated-languages .lang-pop.lang-en:after,
.animated-languages .lang-pop.lang-en:before {
    left: auto;
    right: 20px
}

.animated-languages .lang-pop.lang-en:after {
    right: 24px
}

.animated-languages .lang-pop.lang-cn {
    right: 40px;
    top: 120px
}

.animated-languages .lang-pop.lang-es {
    left: 166px;
    top: 122px
}

.animated-languages .lang-pop.lang-me {
    direction: rtl;
    left: 266px;
    text-align: right;
    top: 166px
}

/* animated-languages mobile: handled above with width:100% */

/* Fix #main overflow hidden clipping content on mobile */
@media only screen and (max-width: 768px) {
    #main {
        overflow: visible !important;
    }
}

/* Location cards: reduce padding on small screens */
@media only screen and (max-width: 575px) {
    .tm-locations-wrap {
        margin-top: 30px !important;
    }
    .tm-locations-wrap > div {
        padding: 0 10px !important;
        margin-bottom: 20px !important;
    }
}


.section-1-list {
    flex: 0 0 50% !important;
}

.h4-section-1 {
    font-size: 17px;
}

@media(min-width: 768px) {
    .section-1-list {
        flex: 0 0 33.33% !important;
    }
}

@media(min-width: 1200px) {
    .section-1-list {
        flex: 1 !important;
    }
}

.bg-section-2 {
    background-color: #FAFAFA;
}

@media(max-width: 473px) {
    #main>section:nth-child(1)>.responsive-wrapper>center {
        margin-bottom: -8px !important;
    }
}

.slick-prev:before,
.slick-next:before {
    color: #888 !important;
}

.card-section-1 {
    box-shadow: 0px 4px 10px #f5f5f5;
}

.bg-section-4 {
    background-color: #FAFAFA;
}
