/* Rates table: left-aligned content on every screen size */
#RatesTable th,
#RatesTable td,
#RatesTable th.rnum,
#RatesTable td.rnum,
#RatesTable th.rcode,
#RatesTable td.rcode,
#RatesTable th.rdate { text-align: left !important; }

/* Desktop / tablet: wider columns (phones get their own sizing below) */
@media (min-width: 768px) {
    #RatesTable { width: auto; }
    #RatesTable th,
    #RatesTable td { padding: 10px 26px; }
    #RatesTable td:first-child,
    #RatesTable th:first-child { width: 80px; padding-left: 14px; padding-right: 14px; }
    #RatesTable th:nth-child(2),
    #RatesTable td:nth-child(2) { min-width: 190px; }
    #RatesTable th:nth-child(3),
    #RatesTable td:nth-child(3) { min-width: 110px; }
    #RatesTable th:nth-child(4),
    #RatesTable td:nth-child(4),
    #RatesTable th:nth-child(5),
    #RatesTable td:nth-child(5) { min-width: 120px; }
}

/* Mobile layout for the GlobalEx one-pager.
   Every rule lives inside a (max-width: 767px) query, so desktop is untouched. */

@media (max-width: 767px) {
    body { overflow-x: hidden; }
    img { max-width: 100%; }

    /* ---------- Top bar ---------- */
    .top-bar .contact-details li { display: block; float: none; margin: 2px 0; }
    .top-bar .social-list { float: none; text-align: left; margin-top: 6px; }

    /* ---------- Header: GlobalEx logo + INEZ logo + hamburger on ONE line ---------- */
    .navbar-top > .container {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        width: 100% !important;
        margin: 0 !important;
        padding: 6px 12px;
    }
    .navbar-top > .container:before,
    .navbar-top > .container:after { display: none; }
    .navbar-top .navbar-header { display: contents; }
    .navbar-top .navbar-brand {
        order: 1;
        width: auto; height: auto;
        float: none; padding: 0; margin: 0 !important;
    }
    .navbar-top .navbar-brand img { height: 60px; width: auto; max-width: none; }
    .navbar-top .gx-inez { order: 2; display: block; }
    .navbar-top .gx-inez img { width: auto !important; height: 60px !important; margin: 0 !important; }
    .navbar-top .gx-tagline { display: none; }
    .navbar-top .navbar-toggle { order: 3; float: none; margin: 0; }
    .navbar-collapse { max-height: none; }
    .navbar-nav { margin: 0 !important; }
    .navbar-nav > li > a { padding: 10px 15px; }

    /* ---------- Hero: 4 gold images, same size, 2 on top + 2 below ---------- */
    .banner .intro-text { padding: 20px 10px; text-align: center; }
    .banner .intro-text h1 { font-size: 40px; line-height: 1.1; }
    .banner .intro-text p { font-size: 16px; }
    .banner .intro-text h2 { font-size: 24px; }
    .gx-gold { display: flex; flex-wrap: wrap; justify-content: center; }
    .gx-gold img.gold-img {
        width: 44% !important;
        height: 110px !important;
        margin: 10px 3% 0 !important;
        object-fit: contain;
    }

    /* ---------- About ---------- */
    .about-section .row { margin-left: 0; margin-right: 0; }
    .about-section .col-md-5 { display: block !important; padding: 0 15px; }
    .about-img { width: 100%; }
    .about-img iframe { width: 100% !important; height: 300px !important; }
    .about-text { width: auto !important; margin: 15px 0 0 0 !important; padding: 0 15px; line-height: 1.6 !important; }
    /* the 2 gold bar images at the bottom: same size, centered side by side */
    .about-text .gx-about-imgs { display: block; text-align: center; margin-top: 10px; }
    .about-text img.gx-about-img {
        display: inline-block;
        width: 44% !important;
        height: 110px !important;
        margin: 15px 3% 0 !important;
        object-fit: contain;
    }
    .call-to-action h2 { font-size: 20px; line-height: 1.3; padding: 0 10px; }

    /* ---------- Exchange rates: wider columns, everything left-aligned ---------- */
    #team-section { overflow: hidden; padding: 20px 0; }
    #team-section .celosnatable { float: none !important; margin: 0 auto !important; width: 100%; padding: 0 10px; }
    #team-section > div[style*="float: left"] { float: none !important; text-align: center; }
    #team-section > div[style*="float: left"] img { margin: 20px auto 0 !important; }
    #RatesTable { width: 100% !important; table-layout: auto; font-size: 15px; }
    #RatesTable th,
    #RatesTable td,
    #RatesTable td.rnum,
    #RatesTable th.rnum,
    #RatesTable th.rcode,
    #RatesTable th.rdate { text-align: left !important; padding: 8px 12px; }
    #RatesTable td:first-child { width: 56px; padding-left: 10px; padding-right: 6px; }
    #RatesTable td:first-child img { margin: 0 !important; width: 36px !important; height: 26px !important; }
    #team-section p { text-align: left !important; }
    #team-section p.gx-commission { text-align: center !important; margin: 12px 0 0; }

    /* ---------- Gallery: one photo per row ---------- */
    #portfolio-list li { width: 100% !important; }
    .portfolio-section-1 .section-title p { padding: 0 10px; }

    /* ---------- Partners ---------- */
    .client-box h3 { margin-bottom: 15px; }
    .client-box .col-xs-12 { display: flex !important; justify-content: center; align-items: center; float: none; margin: 0 0 24px; padding: 0; text-align: center; }
    .client-box .col-xs-12 a { display: block; line-height: 0; }
    /* reset the per-image floats/paddings from style.css, then give each logo a matching centered box */
    .client-box img#moneygram,
    .client-box img#taxfree,
    .client-box img#planet {
        float: none !important;
        display: block !important;
        position: static !important;
        margin: 0 auto !important;
        padding: 0 !important;
        max-width: none !important;
        object-fit: contain;
    }
    .client-box img#moneygram { width: 180px !important; height: 48px !important; }
    .client-box img#taxfree,
    .client-box img#planet { width: 120px !important; height: 120px !important; }

    /* ---------- Footer (mobile only): stacked, left aligned, readable ---------- */
    .footer-section { padding: 25px 0; }
    .footer-section .container { padding-left: 25px; padding-right: 25px; }
    .footer-section .col-xs-4 {
        width: 100%;
        float: none;
        padding: 0;
        margin-bottom: 30px;
    }
    .footer-section .col-xs-4:last-child { margin-bottom: 0; }
    .footer-section .section-heading-2 h3 { margin-bottom: 12px; }
    .footer-section .section-title span { padding-left: 0 !important; }
    .footer-address ul { padding-left: 0; margin: 0; list-style: none; }
    .footer-address ul li { padding: 6px 0; line-height: 1.4; }
    .latest-tweet .media-body { padding: 0 0 0 12px; }
    .latest-tweet .media-body h4 { line-height: 1.5; margin-top: 0; }
    .latest-tweet .media-body h5 { font-size: 15px; line-height: 1.6; word-break: break-all; }
    .footer-section .subscription p { line-height: 1.6; }
    .footer-section .subscription br + br + br { display: none; }

    /* ---------- Copyright ---------- */
    .copyright-section .col-md-7,
    .copyright-section .col-md-5 { text-align: center; }
    .copyright-menu.pull-right { float: none !important; }
}
