/*
 * Remind Legal mobile refinements.
 * Everything is scoped below 768px so the desktop layout remains unchanged.
 */
.hero-video-play {
  display: none;
}

@media (max-width: 767.98px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
  }

  img,
  video,
  iframe,
  table {
    max-width: 100%;
  }

  p,
  li,
  .text-justify {
    text-align: justify !important;
    text-justify: inter-word;
    hyphens: auto;
    overflow-wrap: break-word;
  }

  a,
  button,
  input,
  select,
  textarea {
    touch-action: manipulation;
  }

  a:focus-visible,
  button:focus-visible,
  input:focus-visible,
  select:focus-visible,
  textarea:focus-visible {
    outline: 3px solid rgba(169, 128, 63, .55);
    outline-offset: 2px;
  }

  .container {
    width: 100%;
    padding-right: 18px;
    padding-left: 18px;
  }

  .container > .row {
    margin-right: -8px;
    margin-left: -8px;
  }

  .container > .row > [class*="col-"] {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
  }

  .container.py-5,
  .container-fluid.py-5 {
    padding-top: 32px !important;
    padding-bottom: 32px !important;
  }

  h1,
  .h1 {
    font-size: 20px !important;
    line-height: 1.35;
  }

  h2,
  .h2 {
    font-size: 18px !important;
    line-height: 1.35;
  }

  .wordanimation {
    font-size: 26px !important;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .015em;
  }

  .home-about-heading,
  .backgoundcolor .col-lg-3 > .wordline,
  .feature-text > .wordanimation {
    margin-bottom: 18px !important;
  }

  h3,
  h4,
  h5,
  h6,
  .h3,
  .h4,
  .h5,
  .h6 {
    line-height: 1.4;
  }

  /* Header and collapsed navigation */
  .rl-topbar__inner {
    min-height: 38px;
    padding: 6px 14px;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 10px;
  }

  .rl-topbar__email {
    min-width: 0;
    font-size: 12px !important;
  }

  .rl-topbar__socials {
    gap: 4px;
  }

  .rl-topbar__socials a {
    width: 26px;
    height: 26px;
  }

  .rl-topbar__socials img {
    width: 20px;
    height: 20px;
  }

  #mainNavbar .container {
    padding-right: 10px;
    padding-left: 10px;
  }

  #mainNavbar .container > .row {
    margin-right: 0;
    margin-left: 0;
  }

  #mainNavbar .navbar {
    min-height: 62px;
    padding: 7px 0;
  }

  #mainNavbar .navbar-brand .logo,
  #mainNavbar .logo {
    width: min(166px, 50vw) !important;
    max-height: 50px;
    object-fit: contain;
  }

  #mainNavbar .navbar-toggler {
    width: 44px;
    height: 44px;
    border-color: rgba(202, 172, 121, .65);
    border-radius: 8px;
  }

  #mainNavbar .navbar-collapse {
    max-height: calc(100svh - 105px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;
    border-top: 1px solid #eee4d3;
    box-shadow: 0 12px 24px rgba(31, 26, 18, .08);
  }

  #mainNavbar .navbar-nav,
  #mainNavbar .navbar-nav > .dropdown {
    width: 100%;
  }

  #mainNavbar .navbar-nav .nav-link {
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  #mainNavbar .navbar-nav .dropdown-toggle {
    position: relative;
    padding-right: 48px;
  }

  #mainNavbar .navbar-nav .dropdown-toggle::after {
    display: none;
  }

  #mainNavbar .navbar-nav .dropdown-toggle > i {
    position: absolute;
    top: 50%;
    right: 14px;
    margin: 0 !important;
    transform: translateY(-50%);
  }

  #mainNavbar .dropdown-menu {
    position: static;
    width: 100%;
    border: 0;
    background: #fdf8ee;
  }

  #mainNavbar .dropdown-item {
    min-height: 44px;
    padding: 11px 22px;
    white-space: normal;
  }

  /* Homepage hero: mobile-safe autoplay video and readable copy */
  .hero {
    height: 58svh;
    min-height: 420px;
    max-height: 560px;
    background: #171717;
  }

  .hero-video {
    display: block !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    transform: none;
    object-fit: cover;
    object-position: center;
    z-index: 0;
  }

  .hero .overlay {
    background: rgba(0, 0, 0, .58);
    z-index: 1;
  }

  .hero-content {
    width: 100%;
    padding: 24px 20px;
    z-index: 2;
  }

  .hero-content h1 {
    width: 100%;
    max-width: 42ch;
    margin: 0 auto 20px;
    color: #e1bd7d;
    font-size: clamp(15px, 4.15vw, 17px) !important;
    line-height: 1.4;
    letter-spacing: .01em;
    white-space: normal !important;
    text-wrap: balance;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
  }

  .hero-video-play {
    position: absolute;
    z-index: 4;
    right: 16px;
    bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px;
    background: rgba(20, 20, 20, .88);
    color: #e1bd7d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
  }

  .hero-video-play.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .hero-video-play-icon {
    font-size: 12px;
  }

  .hero-content .cta {
    min-height: 46px;
    padding: 12px 18px;
  }

  /* Homepage story order: heading, image, then story copy */
  .home-about-heading {
    order: 1;
  }

  .home-about-image {
    order: 2;
    margin-top: 0;
    margin-bottom: 20px !important;
  }

  .home-about-content {
    order: 3;
  }

  .home-about-heading .wordline {
    gap: 14px;
    align-items: center;
    flex-wrap: nowrap;
  }

  .home-about-heading .wordanimation {
    display: flex;
    gap: 6px;
    margin-bottom: 0;
  }

  .home-about-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 430px;
    object-fit: cover;
    object-position: center top;
  }

  .home-about-content p:last-of-type {
    margin-bottom: 20px;
  }

  button.learn-more {
    max-width: 100%;
  }

  /* Animated section titles */
  .wordline,
  .wordline2 {
    gap: 14px !important;
  }

  .wordanimation span {
    line-height: 1;
  }

  /* Work Areas carousel */
  .backgoundcolor .col-lg-3 > .wordline {
    margin-bottom: 14px !important;
  }

  .backgoundcolor .col-lg-9 {
    padding-top: 30px !important;
  }

  .backgoundcolor .col-lg-9 > .bg-primary,
  .backgoundcolor .col-12 > .bg-primary {
    height: 145px !important;
  }

  .crouselservice,
  .team-carousel {
    margin-top: -78px !important;
    padding-right: 8px !important;
    padding-left: 8px !important;
  }

  .service-carousel .owl-stage-outer,
  .team-carousel .owl-stage-outer,
  .testimonial-carousel .owl-stage-outer {
    overflow: hidden;
  }

  .padding_service {
    height: auto !important;
    min-height: 0;
    padding: 14px 12px 18px;
  }

  .padding_service .icon-box {
    margin-bottom: 14px !important;
  }

  .padding_service h6 {
    margin-bottom: 10px;
    font-size: 14px !important;
  }

  .padding_service p {
    font-size: 12px !important;
    line-height: 1.55;
  }

  .owl-carousel .owl-nav {
    top: -58px;
  }

  /* WHY RLL: remove desktop-sized empty space */
  .feature-image {
    min-height: 230px !important;
    margin-bottom: 16px;
  }

  .feature-image .position-relative {
    min-height: 230px;
  }

  .feature-content {
    padding-top: 0 !important;
  }

  .feature-text {
    margin: 0 !important;
    padding: 20px 18px !important;
  }

  .feature-text .wordanimation {
    margin-bottom: 18px !important;
  }

  .listitemhome {
    margin-bottom: 0;
    padding-left: 0;
  }

  .listitemhome li {
    margin-bottom: 8px !important;
    padding-left: 24px !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
  }

  /* Team and blog sections */
  .wordline2 {
    flex-wrap: nowrap !important;
    margin-bottom: 24px !important;
  }

  .team-info {
    padding: 16px 12px;
  }

  .team-carousel,
  .team-carousel .owl-stage-outer,
  .team-carousel .owl-item,
  .team-item,
  .team-img,
  .team-info {
    min-width: 0;
    max-width: 100%;
  }

  .team-item,
  .team-img {
    overflow: hidden;
  }

  .team-item {
    width: 100%;
  }

  .team-img img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: cover;
  }

  .team-info h5,
  .team-info p,
  .team-info small {
    display: block;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .testimonial-meta {
    flex-wrap: wrap;
    gap: 7px 12px;
  }

  .testimonial-item .p-4,
  .blogcontentheight {
    padding: 18px !important;
  }

  .homepageblogcontent {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
  }

  .all-blog-search {
    margin: -8px auto 28px;
  }

  .all-blog-search__label {
    margin-left: 4px;
  }

  .all-blog-search__control {
    min-height: 52px;
    border-radius: 14px;
  }

  .all-blog-search input[type="search"] {
    height: 50px;
    padding-right: 54px;
    padding-left: 46px;
  }

  .all-blog-search__icon {
    left: 17px;
  }

  .all-blog-search__status {
    margin-right: 4px;
    margin-left: 4px;
  }

  .all-blog-no-results__content {
    padding: 30px 18px;
  }
  /* Consultation form */
  .bg-appointment {
    min-height: auto !important;
    padding: 34px 12px;
    background-position: center;
  }

  .bg-appointment > .col-lg-4 {
    width: 100%;
    padding: 0;
  }

  .bg-appointment .rounded.p-5.my-5 {
    margin: 0 !important;
    padding: 24px 18px !important;
  }

  .bg-appointment input,
  .bg-appointment select,
  .bg-appointment textarea,
  .form-control {
    min-height: 46px;
    font-size: 16px;
  }

  .bg-appointment textarea {
    min-height: 110px;
  }

  /* Inner pages and long content */
  .allpageheroimage,
  .bg-page-header,
  [class*="-bg-page-header"] {
    min-height: 150px !important;
    background-position: center !important;
  }

  .aboutuspagesideimage img,
  .nirdeshagarwal {
    width: 100%;
    height: auto;
  }

  .table-responsive,
  .table-content {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    width: 100%;
  }

  /* Mobile blog metadata */
  .blog-meta-panel {
    margin-bottom: 20px !important;
    padding: 12px !important;
    border-radius: 12px !important;
  }

  .blog-meta-panel .blog-meta-list {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .blog-meta-panel .blog-meta-item {
    min-width: 0;
    min-height: 46px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid #eadcc4;
    border-radius: 10px;
    background: #fdf8ee;
    color: #26211b;
    font-size: 13px !important;
    line-height: 1.5;
  }

  .blog-meta-panel .blog-meta-item > i {
    flex: 0 0 18px;
    margin-top: 3px;
  }

  .blog-meta-panel .blog-meta-item > span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .blog-meta-panel .blog-meta-label {
    display: block;
    margin-bottom: 1px;
    white-space: normal;
  }

  .blog-meta-panel .blog-share-row {
    grid-column: auto !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    padding: 8px 2px 2px;
  }

  .blog-meta-panel .blog-share-label {
    flex: 0 0 100%;
  }

  .blog-meta-panel .blog-share-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .testimonial-meta {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px !important;
  }

  .testimonial-meta > span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 4px;
    overflow-wrap: anywhere;
  }

  .testimonial-meta > span:last-child {
    grid-column: 1 / -1;
  }

  /* Partnering Force portrait cards */
  .partnering-force-page .container > .text-center > p {
    text-align: center !important;
  }

  .partnering-force-page section > .container {
    padding-right: 18px !important;
    padding-left: 18px !important;
  }

  .partnering-force-page .row.shadow {
    margin: 24px 0 0 !important;
    padding: 18px !important;
    overflow: hidden;
    border-radius: 16px;
  }

  .partnering-force-page .row.shadow > [class*="col-"] {
    min-width: 0;
    padding-right: 0;
    padding-left: 0;
  }

  .partnering-force-page .partner-photo {
    display: block;
    width: min(100%, 280px) !important;
    height: 350px !important;
    margin: 0 auto;
    border-radius: 14px !important;
    object-fit: cover;
    object-position: center top;
    box-shadow: 0 10px 24px rgba(31, 26, 18, .14);
  }

  .partnering-force-page .ptname {
    margin-top: 18px !important;
  }

  .partnering-force-page .row.shadow p:last-child {
    margin-bottom: 0;
  }

  /* Footer and floating actions */
  .footerbg {
    padding-top: 32px !important;
    padding-bottom: 24px !important;
  }

  .footerbg > .container {
    padding-right: 18px;
    padding-left: 18px;
  }

  .footerbg .row.pt-5 {
    margin-right: 0;
    margin-left: 0;
    padding-top: 0 !important;
  }

  .footerlogo {
    width: min(220px, 70%) !important;
  }

  .footerbg .footer-navigation {
    margin-bottom: 22px !important;
  }

  .footer-nav-links {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    width: 100%;
    margin: 0 auto;
  }

  .footer-nav-links a {
    display: inline-block;
    margin: 0 !important;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
  }

  .footerbg .builtby {
    margin-bottom: 0 !important;
    padding: 0 !important;
  }

  .footerbg .footer-copyright {
    width: 100%;
    margin: 0;
    text-align: center !important;
    line-height: 1.5;
  }

  .footerbg .footer-copyright-main,
  .footerbg .footer-credit {
    display: block;
    width: 100%;
    text-align: center;
  }

  .footerbg .footer-copyright-main {
    white-space: nowrap;
    font-size: clamp(11px, 3.2vw, 14px);
  }

  .footerbg .footer-credit {
    margin-top: 4px;
    font-size: 12px;
  }

  .footerbg .footer-credit-separator {
    display: none;
  }
  #leadFooterForm {
    display: none !important;
  }

  .contact-float {
    right: 8px !important;
    bottom: 14px !important;
    width: 46px !important;
  }

  .contact-float a {
    width: 46px !important;
    height: 46px !important;
    margin: 4px 0 !important;
    border-radius: 10px !important;
    font-size: 19px !important;
  }

  .rl-chatbot {
    right: auto !important;
    bottom: 18px !important;
    left: 16px !important;
  }

  .rl-chatbot__button {
    width: 56px !important;
    height: 56px !important;
  }

  .rl-chatbot__nudge {
    right: auto !important;
    bottom: 8px !important;
    left: 68px !important;
  }

  .rl-chatbot__panel {
    right: auto !important;
    bottom: 68px !important;
    left: 0 !important;
    width: calc(100vw - 32px) !important;
    height: min(500px, calc(100svh - 130px)) !important;
  }
}

@media (max-width: 430px) {
  .rl-topbar__socials {
    display: none !important;
  }

  .rl-topbar__inner {
    justify-content: center !important;
  }

  .rl-topbar__email {
    max-width: 100%;
    justify-content: center;
  }
}
@media (max-width: 380px) {
  .wordanimation {
    font-size: 24px !important;
  }

  .rl-topbar__socials {
    display: none;
  }

  .rl-topbar__inner {
    justify-content: center;
  }

  .hero {
    min-height: 390px;
  }

  .hero-content {
    padding-right: 16px;
    padding-left: 16px;
  }

  .wordline2 {
    gap: 9px !important;
  }
}


@media (max-width: 767.98px) and (orientation: landscape) {
  .hero {
    height: calc(100svh - 62px);
    min-height: 320px;
    max-height: 460px;
  }

  .hero-content h1 {
    max-width: 46ch;
    font-size: 19px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    animation: none;
  }
}