/*
 * Purposeful responsive presentation for the CJM Barrio child theme.
 * The source theme is desktop-first; these rules give smaller screens a
 * distinct composition instead of simply scaling the desktop layout down.
 */

/* Large desktop: replace the inherited fixed sidebar with a sticky top bar. */
@media (min-width: 1201px) {
  .header-nav-left,
  .header-nav-left.fixed-header {
    background: rgba(12, 20, 36, 0.97);
    box-shadow: 0 6px 24px rgba(12, 12, 23, 0.14);
    height: 72px;
    left: auto;
    overflow: visible;
    position: sticky;
    right: auto;
    top: 0;
    width: 100%;
    z-index: 20;
  }

  .header-nav-left .scroll-in {
    align-items: center;
    display: flex !important;
    flex-direction: row !important;
    height: 72px;
    margin: 0 auto;
    max-width: 1320px;
    overflow: visible;
    padding: 0 28px;
    width: 100%;
  }

  .header-nav-left .header-logo {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    width: auto;
  }

  .header-nav-left .header-logo a {
    align-items: center;
    display: flex;
  }

  .header-nav-left .header-logo .logo-text img {
    border-radius: 50%;
    height: 40px;
    object-fit: cover;
    width: 40px;
  }

  .header-nav-left .header-logo .logo-text .label {
    background: transparent;
    font-size: 14px;
    letter-spacing: 0.06em;
    margin: 0 0 0 11px;
    padding: 0;
    text-align: left;
    width: auto;
  }

  .header-nav-left .navbar-collapse,
  .header-nav-left .navbar-collapse.collapse {
    background: transparent;
    display: flex !important;
    flex: 1 1 auto;
    height: auto !important;
    justify-content: center;
  }

  .header-nav-left .navbar-nav {
    flex-direction: row;
    margin: 0 auto !important;
  }

  .header-nav-left .navbar-nav > li .nav-link {
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 26px 13px;
  }

  .header-nav-left .navbar-nav > li .nav-link i {
    width: 18px;
  }

  .header-nav-left .navbar-toggler {
    display: none !important;
  }

  .header-nav-left .header-social {
    display: block;
    flex: 0 0 auto;
    padding: 0;
  }

  .header-nav-left .header-social .nav {
    display: flex !important;
  }

  .wrapper-right {
    padding-left: 0;
  }

  .home-banner-01 {
    height: calc(100vh - 72px);
    min-height: 560px;
    position: relative;
  }

  .home-banner-01 .container {
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
  }
}

@media (max-width: 1200px) {
  .header-nav-left {
    background: rgba(12, 12, 23, 0.96);
    box-shadow: 0 8px 30px rgba(12, 12, 23, 0.16);
  }

  .header-nav-left .header-logo {
    height: 64px;
    padding: 0 20px;
  }

  .header-nav-left .header-logo .logo-text img {
    height: 42px;
    width: 42px;
  }

  .header-nav-left .navbar-collapse {
    background: #0c0c17;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 18px 30px rgba(12, 12, 23, 0.22);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .header-nav-left .navbar-nav {
    padding: 10px 20px 18px;
  }

  .header-nav-left .navbar-nav > li .nav-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 48px;
    padding: 14px 4px;
  }

  .header-nav-left .navbar-nav > li:last-child .nav-link {
    border-bottom: 0;
  }

  .home-banner-01 {
    min-height: 680px;
  }
}

/* Footer regions and contact details use explicit, resilient columns. */
.footer .footer-top {
  padding: 48px 0 0;
}

.footer .site-footer__top {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer .site-footer__top > .region {
  display: block;
  margin: 0;
  width: auto;
}

.footer .footer-contact {
  align-items: center;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  text-align: center;
}

.footer .footer-contact__brand {
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer .footer-contact__address {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  margin: 0;
}

.footer .footer-contact__address span {
  display: block;
}

.footer .footer-contact__map {
  align-items: center;
  color: rgba(255, 255, 255, 0.72);
  display: inline-flex;
  gap: 10px;
  justify-content: center;
  text-decoration: none;
}

.footer .footer-contact__map i {
  color: #febd01;
  flex: 0 0 auto;
  font-size: 18px;
}

.footer .footer-contact__map:hover,
.footer .footer-contact__map:focus {
  color: #fff;
}

.footer .footer-contact__phone {
  color: #febd01;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
}

.footer .footer-contact__phone:hover,
.footer .footer-contact__phone:focus {
  color: #fff;
}

.footer .site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 36px;
  padding-top: 22px;
}

.footer .site-footer__bottom .container-fluid,
.footer .site-footer__bottom .row {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

.footer .footer-copyright {
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
  text-align: center;
  width: 100%;
}

.portfolio-box-01 .portfolio-info h3 {
  background: rgba(12, 20, 36, 0.92);
  bottom: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  left: 0;
  line-height: 1.35;
  margin: 0;
  padding: 18px 24px;
  position: absolute;
  right: 0;
  text-align: center;
}

.portfolio-box-01 .portfolio-info h3 a {
  color: #fff;
  text-decoration: none;
}

.portfolio-box-01 .portfolio-info h3 a:hover,
.portfolio-box-01 .portfolio-info h3 a:focus {
  color: #febd01;
}

#services .feature-box-1 {
  border: 1px solid rgba(12, 20, 36, 0.1);
  box-shadow: 0 10px 28px rgba(12, 20, 36, 0.09);
  height: 100%;
  overflow: hidden;
}

#services .feature-box-1:hover,
#services .feature-box-1:focus-within {
  border-color: rgba(254, 189, 1, 0.8);
  box-shadow: 0 16px 36px rgba(12, 20, 36, 0.16);
}

#services .feature-box-1 .f-icon {
  background: rgba(254, 189, 1, 0.1);
  border-radius: 50%;
}

#work .portfolio-content {
  margin-left: -10px;
  margin-right: -10px;
}

#work .portfolio-content .grid-item {
  padding: 10px;
}

#work .portfolio-box-01 {
  background: #fff;
  border: 1px solid rgba(12, 20, 36, 0.1);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(12, 20, 36, 0.1);
  height: 100%;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

#work .portfolio-box-01:hover,
#work .portfolio-box-01:focus-within {
  border-color: rgba(254, 189, 1, 0.8);
  box-shadow: 0 16px 36px rgba(12, 20, 36, 0.18);
  transform: translateY(-3px);
}

#work .portfolio-img img {
  display: block;
  width: 100%;
}

.mfp-image-holder .mfp-content {
  padding-bottom: 0;
}

.mfp-image-holder .mfp-bottom-bar {
  bottom: 20px;
  left: 0;
  margin-top: 0;
  top: auto;
  width: 100%;
  z-index: 2;
}

.mfp-image-holder .mfp-title {
  padding-right: 0;
  text-align: center;
}

.portfolio-lightbox__website {
  background: rgba(12, 20, 36, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 3px;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.35);
  color: #fff !important;
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 20px;
  padding: 10px 22px;
  text-decoration: none !important;
  text-transform: uppercase;
}

.portfolio-lightbox__website:hover,
.portfolio-lightbox__website:focus {
  background: #172b4a;
  border-color: #fff;
  color: #fff !important;
}

input.webform-button--submit.m-btn.form-control {
  height: auto;
  line-height: 1.5;
  min-height: 48px;
  padding-bottom: 12px;
  padding-top: 12px;
}

.home-banner-01 .hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.home-banner-01 .hero-actions .m-btn-white {
  color: rgba(12, 20, 36, 0.97);
}

.home-banner-01 .hero-actions .m-btn-white:hover,
.home-banner-01 .hero-actions .m-btn-white:focus {
  color: #fff;
}

@media (max-width: 767px) {
  :root {
    --mobile-gutter: 20px;
    --mobile-radius: 16px;
  }

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

  body {
    font-size: 16px;
  }

  .container,
  .container-fluid {
    padding-left: var(--mobile-gutter);
    padding-right: var(--mobile-gutter);
  }

  .header-nav-left .header-logo .logo-text .label {
    font-size: 15px;
    letter-spacing: 0.02em;
  }

  .header-nav-left .navbar-toggler {
    align-items: center;
    display: flex;
    height: 44px;
    justify-content: center;
    margin: 0;
    width: 44px;
  }

  .header-nav-left .navbar-nav > li .nav-link {
    font-size: 16px;
    letter-spacing: 0.03em;
  }

  .header-nav-left .navbar-nav > li .nav-link i {
    font-size: 18px;
    margin-right: 12px;
    text-align: center;
    width: 24px;
  }

  .home-banner-01 {
    background-position: 68% center;
    height: auto;
    min-height: 0;
    position: relative;
  }

  .home-banner-01::after {
    background: linear-gradient(180deg, rgba(12, 12, 23, 0.08) 20%, rgba(12, 12, 23, 0.92) 88%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
  }

  .home-banner-01 .container {
    align-items: center !important;
    bottom: auto;
    display: flex;
    left: 0;
    padding-bottom: max(48px, env(safe-area-inset-bottom));
    padding-top: 112px;
    position: relative;
    right: 0;
    top: auto;
    z-index: 1;
  }

  .home-banner-01 .row {
    margin: 0;
    width: 100%;
  }

  .home-banner-01 .ht-box {
    border-left: 4px solid #febd01;
    padding-left: 18px;
    text-align: left !important;
  }

  .home-banner-01 h1 {
    font-size: clamp(38px, 12vw, 54px);
    line-height: 0.98;
    max-width: 10ch;
  }

  .home-banner-01 h2 {
    font-size: 18px;
    line-height: 1.45;
    max-width: 24ch;
  }

  .home-banner-01 .m-btn {
    min-height: 48px;
    padding: 12px 20px;
  }

  .section {
    padding-bottom: 54px;
    padding-top: 54px;
  }

  .section-title {
    text-align: left !important;
  }

  .section-title h2 {
    font-size: 30px;
    line-height: 1.15;
  }

  .section-title.text-center h2::after,
  .section-title.text-center h3::after {
    margin-left: 0;
  }

  .section-title p {
    font-size: 16px;
    line-height: 1.7;
  }

  #about .dark-bg {
    border-radius: var(--mobile-radius) !important;
    padding: 0 !important;
    overflow: hidden;
  }

  #about .dark-bg img {
    aspect-ratio: 16 / 10;
    object-fit: cover;
    width: 100%;
  }

  #about .dark-bg .col-md-8 {
    padding: 8px 28px 30px;
  }

  #about .lead {
    font-size: 17px;
    line-height: 1.7;
  }

  #services .row:last-child > [class*="col-"] {
    margin-bottom: 12px;
    margin-top: 0;
  }

  .feature-box-1 {
    align-items: center;
    border: 0;
    border-radius: var(--mobile-radius);
    display: grid;
    gap: 16px;
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 22px !important;
    text-align: left !important;
  }

  .feature-box-1 .f-icon {
    font-size: 38px;
    height: 58px;
    line-height: 58px;
    margin: 0;
    text-align: center;
    width: 58px;
  }

  .feature-box-1 h6 {
    font-size: 17px;
    margin-bottom: 5px !important;
  }

  .feature-box-1 p {
    font-size: 14px;
    line-height: 1.55;
  }

  #work .portfolio-content {
    display: flex;
    gap: 16px;
    margin-left: calc(var(--mobile-gutter) * -1);
    margin-right: calc(var(--mobile-gutter) * -1);
    overflow-x: auto;
    padding: 0 var(--mobile-gutter) 18px;
    scroll-padding-left: var(--mobile-gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  #work .portfolio-content .grid-item {
    flex: 0 0 min(82vw, 340px);
    float: none;
    padding: 0;
    scroll-snap-align: start;
    width: auto;
  }

  #work .portfolio-box-01 {
    border-radius: var(--mobile-radius);
    overflow: hidden;
  }

  #work .portfolio-info {
    opacity: 1;
  }

  .portfolio-box-01 .portfolio-info h3 {
    font-size: 16px;
    padding: 15px 18px;
  }

  .section.theme-bg .row {
    text-align: left;
  }

  .section.theme-bg .col-md-4 {
    margin-top: 20px;
    text-align: left !important;
  }

  .section.theme-bg .m-btn,
  #contactus .form-actions .button {
    min-height: 50px;
    width: 100%;
  }

  #contactus input,
  #contactus select,
  #contactus textarea {
    font-size: 16px;
    min-height: 48px;
  }

  .footer {
    text-align: center;
  }

  .footer .footer-top {
    padding-top: 38px;
  }

  .footer .footer-contact {
    gap: 18px;
    grid-template-columns: 1fr;
  }

  .footer .site-footer__bottom {
    margin-top: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
