/*
 * mobile-fix.css  —  Srini Shutterspace
 * Fixes stretched images, large gaps, overflow issues on mobile.
 * Loaded LAST so these rules override main.css without !important abuse.
 */

/* =========================================================
   GLOBAL  — prevent any image from overflowing its container
   ========================================================= */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent horizontal scroll site-wide */
html, body {
  overflow-x: hidden;
}

/* Images that live inside fixed-height containers must fill them properly */
.sv-inner__slider-active-1 img,
.sv-inner__slider-active-2 img,
.tp-hero-5-big-thumb img,
.ab-hero__big-img img,
.tp-portfolio-thumb-img img,
.tp-project-5-2-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =========================================================
   HEADER  — stop logo from sitting absolute over page content
   ========================================================= */
.logo-white {
  position: relative;   /* was absolute — caused logo to bleed over hero text */
  top: auto;
}

/* Keep sticky header logo small and contained */
.tp-header-sticky-cloned .tp-header-3__logo img,
.tp-header-pinned        .tp-header-3__logo img {
  width: 54px;
}

/* =========================================================
   MOBILE  ≤ 767 px
   ========================================================= */
@media (max-width: 767px) {

  /* ----------------------------------------------------------
     Global spacing — halve the huge Bootstrap pt/pb classes
  ---------------------------------------------------------- */
  .pt-140  { padding-top:    60px !important; }
  .pt-130  { padding-top:    55px !important; }
  .pt-120  { padding-top:    50px !important; }
  .pt-100  { padding-top:    45px !important; }
  .pb-160  { padding-bottom: 60px !important; }
  .pb-140  { padding-bottom: 55px !important; }
  .pb-130  { padding-bottom: 50px !important; }
  .pb-120  { padding-bottom: 45px !important; }
  .mb-120  { margin-bottom:  40px !important; }
  .mb-130  { margin-bottom:  45px !important; }
  .mr-200  { margin-right:    0   !important; }

  /* Prevent horizontal overflow site-wide */
  body, #smooth-wrapper, #smooth-content, main {
    overflow-x: hidden;
  }

  /* ----------------------------------------------------------
     PORTFOLIO — "LATEST PROJECT" huge scrolling text overflow fix
     220px text causes massive horizontal bleed on mobile.
  ---------------------------------------------------------- */
  .portfolio-list-scroll-text {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    text-align: left;
    padding-bottom: 16px;
  }
  .portfolio-list-scroll-text p {
    font-size: 70px !important;
    margin-right: 30px !important;
    letter-spacing: -1px !important;
  }

  /* Clip the parent wrapper so text doesn't bleed */
  .porfolio-inner__thumb-wrapper {
    overflow: hidden !important;
  }

  /* ----------------------------------------------------------
     ABOUT — floating skills capsule: 630px height causes gap
  ---------------------------------------------------------- */
  .tp-services-capsule-wrapper {
    height: 320px !important;
    margin-bottom: 20px;
  }

  /* ----------------------------------------------------------
     HEADER — logo sizing & bar placement
  ---------------------------------------------------------- */
  .tp-header-3__logo img {
    width: 75px;
  }
  /* Make sure header row doesn't overflow */
  .tp-header-3__area .container,
  .tp-header-3__area .container-fluid {
    padding-left: 15px;
    padding-right: 15px;
  }
  .tp-header-3__ptlr {
    padding-left:  15px !important;
    padding-right: 15px !important;
  }

  /* ----------------------------------------------------------
     HOME — Hero section
  ---------------------------------------------------------- */
  .tp-hero-5-ptb {
    padding-top: 110px;
  }
  .tp-hero-5-title {
    font-size: 52px !important;
    letter-spacing: -1px !important;
    line-height: 1.05 !important;
  }
  .tp-hero-5-title-box {
    padding-left: 0 !important;
    margin-bottom: 30px !important;
  }
  .tp-hero-5-title-box p {
    font-size: 16px !important;
    margin-bottom: 24px !important;
  }

  /* Big hero photo — let it be natural height, not stretched */
  .tp-hero-5-big-thumb {
    position: static !important;
    width: 100% !important;
    max-height: 60vw;
    overflow: hidden;
  }
  .tp-hero-5-big-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-height: 60vw;
  }

  /* ----------------------------------------------------------
     HOME — About section (large "Photography" text)
  ---------------------------------------------------------- */
  .tp-about-5-area {
    padding-top:    45px !important;
    padding-bottom: 40px !important;
  }
  .tp-section-title-5.fs-140 {
    font-size: 52px !important;
    letter-spacing: -1px !important;
    line-height: 1.1 !important;
  }
  .tp-section-title-5.fs-140 em {
    font-size: 48px !important;
  }

  /* ----------------------------------------------------------
     HOME — Services hover list (make images visible & fixed)
  ---------------------------------------------------------- */
  .tp-project-5-section-box {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* ----------------------------------------------------------
     HOME / PORTFOLIO — Portfolio grid cards
  ---------------------------------------------------------- */
  .tp-project-5-2-item {
    margin-bottom: 20px;
  }
  .tp-project-5-2-item img {
    width:  100% !important;
    height: 260px !important;
    object-fit: cover !important;
    border-radius: 12px;
    display: block;
  }

  /* ----------------------------------------------------------
     ABOUT page — Hero
  ---------------------------------------------------------- */
  .ab-hero__ptb {
    padding-top:    110px !important;
    padding-bottom:  50px !important;
  }
  .ab-hero__title {
    font-size: 48px !important;
    line-height: 1.05 !important;
    margin-bottom: 24px !important;
  }

  /* About page right box — contains photo + circle + signature */
  .ab-hero__right-box {
    margin-top:  20px !important;
    text-align: center !important;
  }
  /* Photo must not stretch */
  .ab-hero__big-img {
    max-width: 100%;
  }
  .ab-hero__big-img img {
    width:       100% !important;
    height:      auto !important;
    max-height:  70vw;
    object-fit:  cover !important;
    border-radius: 16px;
    display: block;
  }

  /* Circle decoration — keep it small and contained */
  .ab-hero__circle {
    right: 5px !important;
    bottom: -20px !important;
    transform: scale(0.55) !important;
  }
  .ab-hero__signature {
    left: 5px !important;
    bottom: 20px !important;
  }
  .ab-hero__signature img {
    width: 120px !important;
    height: auto !important;
  }

  /* ----------------------------------------------------------
     ABOUT page — Info / bio large gap fix
  ---------------------------------------------------------- */
  .ab-info__area {
    padding-bottom: 40px !important;
  }
  .ab-info__text > div {
    padding-top:    20px !important;
    padding-bottom: 20px !important;
    font-size: 28px !important;
    line-height: 1.2 !important;
  }

  /* ----------------------------------------------------------
     ABOUT page — Personal Info section
  ---------------------------------------------------------- */
  .ab-personal-info__area {
    padding-bottom: 30px !important;
  }
  .ab-personal-info__left-box {
    margin-right:  0   !important;
    margin-bottom: 40px !important;
  }
  .ab-personal-info__left-content-title {
    font-size: 26px !important;
  }

  /* Skills / floating capsule items */
  .tp-services-capsule-item {
    font-size: 13px !important;
    padding:   8px 14px !important;
  }

  /* ----------------------------------------------------------
     SERVICES page — Hero slider (prevent 650px tall images)
  ---------------------------------------------------------- */
  .sv-inner__slider-active-1,
  .sv-inner__slider-active-2 {
    height: 50vw !important;
    min-height: 200px;
    max-height: 320px;
  }
  .sv-inner__slider-active-1 img,
  .sv-inner__slider-active-2 img {
    width:       100% !important;
    height:      100% !important;
    object-fit:  cover !important;
  }

  /* Services page slider padding */
  .sv-inner__slider-plr {
    padding-left:  15px !important;
    padding-right: 15px !important;
  }
  .sv-inner__slider-title {
    font-size: 36px !important;
    line-height: 1.1 !important;
  }
  .sv-inner__slider-content-main {
    margin-bottom: 20px;
  }

  /* Service cards (process section) */
  .tp-service-3__item {
    margin-bottom: 20px !important;
  }

  /* ----------------------------------------------------------
     SERVICE DETAIL page
  ---------------------------------------------------------- */
  .sv-inner__slider-plr .col-xl-6 {
    margin-bottom: 20px;
  }

  /* ----------------------------------------------------------
     PORTFOLIO page — grid images
  ---------------------------------------------------------- */
  .tp-portfolio-thumb-img {
    height: auto !important;
    min-height: 200px;
  }
  .tp-portfolio-thumb-img img {
    width:       100% !important;
    height:      260px !important;
    object-fit:  cover !important;
    border-radius: 12px;
    display: block;
  }

  /* Filter tabs — prevent overflow */
  .tp-portfolio-tab-box {
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: flex-start !important;
  }
  .tp-portfolio-tab-box button {
    font-size: 13px !important;
    padding: 6px 14px !important;
  }

  /* ----------------------------------------------------------
     PORTFOLIO DETAIL page — main image
  ---------------------------------------------------------- */
  .porfolio-inner__slider-area img,
  .porfolio-inner__thumb img {
    width:      100% !important;
    height:     auto !important;
    object-fit: cover !important;
  }

  /* ----------------------------------------------------------
     FOOTER — social list wrapping
  ---------------------------------------------------------- */
  .tpoffcanvas__social-link ul {
    flex-wrap: wrap;
    gap: 12px;
  }

  /* ----------------------------------------------------------
     Miscellaneous helper fixes
  ---------------------------------------------------------- */
  /* Prevent rotate/circle elements from bleeding off-screen */
  .ab-hero__shape-1 {
    display: none !important;
  }

  /* Reduce section title in footer */
  .tp-footer-6-area .tp-footer-6-title {
    font-size: 18px !important;
  }
}

/* =========================================================
   TABLET  768 – 991 px
   ========================================================= */
@media only screen and (min-width: 768px) and (max-width: 991px) {

  .tp-hero-5-title {
    font-size: 100px !important;
    letter-spacing: -2px !important;
  }
  .ab-hero__title {
    font-size: 80px !important;
  }
  .sv-inner__slider-active-1,
  .sv-inner__slider-active-2 {
    height: 380px !important;
  }
  .sv-inner__slider-active-1 img,
  .sv-inner__slider-active-2 img {
    width:  100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .tp-section-title-5.fs-140 {
    font-size: 80px !important;
    letter-spacing: -2px !important;
  }
  .tp-project-5-2-item img {
    height: 300px !important;
    object-fit: cover !important;
  }
  .tp-portfolio-thumb-img img {
    height: 300px !important;
    object-fit: cover !important;
  }
}

/* =========================================================
   VERY SMALL  ≤ 400 px
   ========================================================= */
@media (max-width: 400px) {
  .tp-hero-5-title {
    font-size: 42px !important;
    letter-spacing: 0 !important;
  }
  .tp-section-title-5.fs-140 {
    font-size: 40px !important;
  }
  .ab-hero__title {
    font-size: 38px !important;
  }
  .tp-header-3__logo img {
    width: 60px !important;
  }
}
