/*
 * Mobile and tablet fixes for the Vintage Finvest port.
 *
 * Loaded after css/styles-2.css. The original stylesheets stay byte-for-byte copies of
 * the live site; every change lives here. Every rule sits inside a media query for widths
 * up to 1023px, so the desktop view at 1024px and wider renders exactly as before.
 *
 *   A. max-width 1023px                           phones and tablets
 *   B. max-width 1023px, landscape, max-height 500px  short landscape phones (e.g. 844x390)
 */

@media (max-width: 1023px) {
  /* In-page anchors (home.html#team, services.html#...) land below the 94px sticky nav. */
  html {
    scroll-padding-top: 104px;
  }

  /* Long unbroken strings, such as an email address in the privacy policy, wrap instead
     of running past the screen edge. */
  .section-block p,
  .section-block li,
  .section-block-bg p {
    overflow-wrap: anywhere;
  }

  /* Hamburger: 48x48 box instead of 30x30. Position and padding are chosen so the three
     lines (drawn by :before at the padding edge) stay exactly where they were. */
  .navigation-portrait .nav-toggle {
    width: 48px;
    height: 48px;
    margin-top: -23px;
    right: 6px;
    padding: 15px 0 0 11px;
  }

  /* Close (X) button: 48x48 instead of 30x40. Same outer height (6 + 48 + 6 = 10 + 40 + 10),
     so the menu rows do not move, and the glyph stays in place. */
  .navigation-portrait .nav-menus-wrapper-close-button {
    width: 48px;
    height: 48px;
    margin: 6px 0 6px 0;
    padding: 4px 0 0 11px;
  }

  /* Menu rows 48px tall instead of 44px. */
  .navigation-portrait .nav-menu > li > a {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  /* Side menu narrower than the screen on small phones, so the overlay beside it shows
     and a tap on it closes the menu. Unchanged (320px) from 384px wide upwards. */
  .navigation-portrait .nav-menus-wrapper {
    width: min(320px, calc(100vw - 64px));
  }

  /* Footer link lists (Find Us, Policies): 48px tall rows with 8px between them. */
  .footer-1 ul.mt-25 > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    min-width: 48px;
  }

  .footer-1 ul.mt-25 > li + li {
    margin-top: 8px;
  }

  /* Team LinkedIn icons: 48x48 instead of 42x23. */
  .product-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    vertical-align: middle;
  }

  /* Scroll-to-top: 48x48 instead of 40x40, nearer the bottom edge, and the footer gets
     room below its last line so the button never sits on the copyright text at the end. */
  .scroll-to-top {
    width: 48px;
    height: 48px;
    padding: 16px 6px;
    bottom: 24px;
  }

  .footer-1-bar {
    padding-bottom: 88px;
  }

  /* Legible text: body copy 16px (was 14 or 15px), small labels 14px (was 13px). */
  .portfolio-single .portfolio-single-text,
  .testmonial-box-content p,
  .service-block p,
  .large-heading p,
  .section-heading p,
  .footer-1 p.mt-25,
  .footer-1 p.mt-25 a,
  .footer-1 p.mt-25 strong {
    font-size: 16px;
  }

  .footer-1-bar p {
    font-size: 14px;
  }

  /* Compliance links in the footer address block (CIN, Scheme Commission Disclosure):
     48px tall hit areas with 8px between them. Only those two lines grow; the text stays
     left aligned where it was. */
  .footer-1 p.mt-25 a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    min-width: 48px;
    margin: 4px 0;
  }

  /* Logo link: wrap the logo image so the tappable box is as tall as the image (at least
     48px) instead of a 25px inline box. The logo keeps its size. */
  .nav-brand {
    display: inline-block;
  }
}

@media (max-width: 1023px) and (orientation: landscape) and (max-height: 500px) {
  /* Shorter sticky nav: 65px instead of 94px (logo 140px wide instead of 200px). The fixed
     nav script measures the nav, so its placeholder follows. */
  .navigation {
    height: 64px;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .main-logo {
    width: 140px;
  }

  html {
    scroll-padding-top: 75px;
  }

  /* Slider titles. Revolution Slider scales its layers by the slider height (390 / 550 grid
     = 0.71 at 844x390), which gives a 50px, five-line title that starts above the slider
     and under the nav. A smaller font makes the title three lines; the slider measures the
     layer after this rule applies and centres it, so the whole title shows. The !important
     is needed because the slider writes font-size and line-height inline on the layer and
     on the split characters inside it. */
  #rev_slider .slide-title,
  #rev_slider .slide-title * {
    font-size: 30px !important;
    line-height: 38px !important;
  }
}
