/* ==========================================================================
   Oman Growth - Comprehensive Responsive Fixes (All Devices: 320px - 1920px)
   Muscat, Sultanate of Oman | Lamar Business Center, Way No. 4551, Muscat 111
   Branding: +968 9811 0669 | hello@omangrowth.com | 20+ Years Experience
   ========================================================================== */

/* 1. Global Box-Sizing & Overflow-X Prevention (Sticky-Safe) */
*, *::before, *::after {
  box-sizing: border-box !important;
}

html, body {
  max-width: 100% !important;
  width: 100% !important;
  position: relative;
}

/* Prevent horizontal overflow on mobile without breaking position:sticky on desktop */
@media (max-width: 991px) {
  html, body {
    overflow-x: clip !important;
  }
}
@media (min-width: 992px) {
  html, body {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }
}

/* Prevent horizontal overflow without breaking position:sticky */
@media (max-width: 991px) {
  html, body {
    overflow-x: clip !important;
  }
}
@media (min-width: 992px) {
  html, body {
    overflow-x: visible !important;
  }
}

/* 2. Responsive Containers, Grid & Row Margins */
.container, .container-fluid {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

@media (min-width: 576px) {
  .container { max-width: 540px !important; }
}
@media (min-width: 768px) {
  .container { max-width: 720px !important; }
}
@media (min-width: 992px) {
  .container { max-width: 960px !important; }
}
@media (min-width: 1200px) {
  .container { max-width: 1170px !important; }
}
@media (min-width: 1400px) {
  .container { max-width: 1320px !important; }
}

@media (max-width: 768px) {
  .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  [class*="col-"] {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* 3. Images, Videos & Embeds */
img, svg, video, iframe {
  max-width: 100% !important;
  height: auto;
}

/* Responsive Logo */
.header-main .logo img,
.header-main .logo2 img {
  height: 44px !important;
  width: auto !important;
  max-width: 100% !important;
  transition: height 0.3s ease;
}

@media (max-width: 768px) {
  .header-main .logo img,
  .header-main .logo2 img {
    height: 36px !important;
  }
}
@media (max-width: 360px) {
  .header-main .logo img,
  .header-main .logo2 img {
    height: 30px !important;
  }
}

/* 4. BUTTONS - Complete Text Overflow & Responsive Sizing */
.gt-theme-btn-main,
.gt-theme-btn,
.arrow-btn,
.project-btn,
.news-btn,
.theme-btn,
.link-btn {
  max-width: 100% !important;
  box-sizing: border-box !important;
  text-overflow: ellipsis;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  word-break: normal;
}

.gt-theme-btn-main {
  white-space: nowrap;
  overflow: hidden;
}

/* Flex wrap for button pairs */
.d-flex.gap-3,
.d-flex.gap-2,
.d-flex.gap-4 {
  flex-wrap: wrap !important;
}

@media (max-width: 768px) {
  .gt-theme-btn-main,
  .gt-theme-btn,
  .theme-btn {
    font-size: 14px !important;
    padding: 10px 18px !important;
    letter-spacing: 0.2px !important;
  }
  .gt-theme-btn-main .gt-theme-btn-arrow-left,
  .gt-theme-btn-main .gt-theme-btn-arrow-right {
    display: none !important;
  }
}

@media (max-width: 425px) {
  .gt-theme-btn-main,
  .gt-theme-btn,
  .theme-btn {
    font-size: 13px !important;
    padding: 8px 14px !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    text-align: center !important;
  }
  .hero-content .d-flex.gap-3 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  .gt-theme-btn-main {
    width: auto !important;
    max-width: 100% !important;
    white-space: normal !important;
  }
}

@media (max-width: 320px) {
  .gt-theme-btn-main,
  .gt-theme-btn,
  .theme-btn {
    font-size: 12px !important;
    padding: 6px 12px !important;
    letter-spacing: 0.2px !important;
  }
}

/* 5. HERO SECTION RESPONSIVE - FULL HEADER CLEARANCE & VISIBILITY */
@media (max-width: 1200px) {
  .hero-section-5, .hero-5 {
    padding-top: 170px !important;
    padding-bottom: 60px !important;
  }
}

@media (max-width: 1024px) {
  .hero-section-5, .hero-5 {
    padding-top: 160px !important;
    padding-bottom: 50px !important;
  }
  .hero-content h1,
  h1.text-anim {
    font-size: 42px !important;
    line-height: 1.2 !important;
  }
  .hero-image {
    position: relative !important;
    width: 100% !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 40px !important;
  }
  .hero-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover !important;
  }
}

@media (max-width: 768px) {
  .header-5 {
    top: 15px !important;
  }
  .header-5 .mega-menu-wrapper {
    margin: 0 10px !important;
  }
  .hero-section-5, .hero-5 {
    padding-top: 150px !important;
    padding-bottom: 40px !important;
  }
  .hero-content {
    margin-top: 15px !important;
  }
  .hero-content h1,
  h1.text-anim {
    margin-top: 15px !important;
    font-size: 32px !important;
    line-height: 1.25 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  .hero-content p {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
  .hero-counter {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 20px !important;
    padding: 20px !important;
    max-width: 100% !important;
  }
  .hero-counter h2 {
    font-size: 28px !important;
  }
  .hero-counter h6 {
    font-size: 14px !important;
    line-height: 1.4 !important;
  }
  .vec-shape,
  #scrollDown,
  .scroll-down {
    display: none !important;
  }
  .hero-info {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 15px !important;
    padding: 15px !important;
    max-width: 100% !important;
    font-size: 13px !important;
  }
}

@media (max-width: 425px) {
  .header-5 {
    top: 12px !important;
  }
  .header-5 .header-main {
    padding: 8px 15px !important;
  }
  .hero-section-5, .hero-5 {
    padding-top: 140px !important;
    padding-bottom: 35px !important;
  }
  .hero-content h1,
  h1.text-anim {
    margin-top: 12px !important;
    font-size: 26px !important;
    line-height: 1.3 !important;
  }
  .hero-content p {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }
  .hero-counter h2 {
    font-size: 24px !important;
  }
  .hero-info span {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }
}

@media (max-width: 360px) {
  .hero-section-5, .hero-5 {
    padding-top: 135px !important;
    padding-bottom: 30px !important;
  }
  .hero-content h1,
  h1.text-anim {
    margin-top: 10px !important;
    font-size: 22px !important;
    line-height: 1.25 !important;
  }
  .hero-counter h2 {
    font-size: 20px !important;
  }
}

/* 6. TYPOGRAPHY - H1, H2, H3, P Responsive Hierarchy */
h1, .h1 {
  font-size: clamp(22px, 5vw, 56px) !important;
  line-height: 1.2 !important;
  word-break: break-word !important;
}

h2, .h2, .section-title h2, .text-anim {
  word-break: break-word !important;
}

@media (min-width: 992px) {
  .section-title h2 { font-size: 44px !important; }
}
@media (max-width: 768px) {
  .section-title h2 { font-size: 30px !important; line-height: 1.3 !important; }
  h3, .h3 { font-size: 20px !important; }
  p { font-size: 15px !important; }
}
@media (max-width: 425px) {
  .section-title h2 { font-size: 24px !important; line-height: 1.3 !important; }
  h3, .h3 { font-size: 18px !important; }
  p { font-size: 14px !important; line-height: 1.6 !important; }
}
@media (max-width: 320px) {
  .section-title h2 { font-size: 20px !important; }
  h3, .h3 { font-size: 16px !important; }
}

/* 7. NAVIGATION & HEADER RESPONSIVE */
@media (max-width: 1199px) {
  .mean__menu-wrapper {
    display: none !important;
  }
  .header__hamburger {
    display: block !important;
  }
}

.offcanvas__info {
  max-width: 340px !important;
  width: 85% !important;
}

@media (max-width: 360px) {
  .offcanvas__info {
    max-width: 290px !important;
    width: 90% !important;
    padding: 20px 15px !important;
  }
}

/* 8. CARDS, GRIDS & SECTIONS */
@media (max-width: 768px) {
  .feature-box-style-3,
  .service-box-style-5,
  .counter-box-style-5,
  .news-box-items,
  .project-box-style-5 {
    margin-bottom: 20px !important;
    width: 100% !important;
  }
  .section-padding {
    padding-top: 50px !important;
    padding-bottom: 50px !important;
  }
}

/* 9. FOOTER RESPONSIVE */
@media (max-width: 991px) {
  .footer-widget-wrapper-5 .row {
    flex-direction: column !important;
  }
  .footer-left-item,
  .footer-right-item {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 30px !important;
  }
}

@media (max-width: 575px) {
  .footer-bottom-5 {
    flex-direction: column !important;
    text-align: center !important;
    gap: 12px !important;
  }
  .footer-left-item form {
    width: 100% !important;
  }
  .footer-left-item form input {
    width: 100% !important;
    font-size: 16px !important;
  }
}

/* 10. FORMS & INPUTS - Prevent iOS Auto-Zoom */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
select,
textarea {
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important; /* iOS zoom prevention */
  }
  .contact-wrapper .contact-box-items {
    padding: 24px 16px !important;
  }
}

/* 11. TABLES & PRE - Responsive Scroll Wrapper */
table {
  max-width: 100% !important;
}

.table-responsive,
.table-scroll-wrapper {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  max-width: 100% !important;
  margin-bottom: 1.5rem;
}

pre, code {
  white-space: pre-wrap !important;
  word-break: break-all !important;
}

/* 12. SWIPER & BRAND SLIDER RESPONSIVE */
.brand-slider,
.swiper {
  max-width: 100% !important;
  overflow: hidden !important;
}


/* ==========================================================================
   13. 100% BULLETPROOF STICKY SIDEBARS (Services, Projects, Blog Articles & Directory)
   ========================================================================== */

/* Ancestor containers must allow visible overflow so position:sticky is never clipped */
#smooth-wrapper,
#smooth-content,
.page-wrapper,
.service-details-section,
.project-details-section,
.news-standard-section,
.news-details-section,
.service-details-wrapper,
.project-details-wrapper,
.news-details-area,
.gt-news-standard-wrapper {
  overflow: visible !important;
}

@media (min-width: 992px) {
  /* Parent rows and columns must stretch to provide the sticky runway */
  .service-details-wrapper > .row,
  .project-details-wrapper > .row,
  .news-details-area > .row,
  .gt-news-standard-wrapper > .row,
  .service-details-section .row,
  .project-details-section .row,
  .news-standard-section .row,
  .news-details-section .row {
    display: flex !important;
    align-items: stretch !important;
    overflow: visible !important;
  }

  .service-details-wrapper > .row > [class*="col-"],
  .project-details-wrapper > .row > [class*="col-"],
  .news-details-area > .row > [class*="col-"],
  .gt-news-standard-wrapper > .row > [class*="col-"],
  .service-details-section .row > [class*="col-"],
  .project-details-section .row > [class*="col-"],
  .news-standard-section .row > [class*="col-"],
  .news-details-section .row > [class*="col-"] {
    position: relative !important;
    align-self: stretch !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* All Sticky Sidebars: Services, Projects, Blog Articles, Blog Directory (No Internal Scroll) */
  .service-details-sidebar,
  .project-details-sidebar,
  .main-sidebar,
  .gt-main-sideber,
  .sidebar-sticky,
  .sticky-style,
  aside.main-sidebar,
  div.service-details-sidebar,
  div.project-details-sidebar,
  aside.gt-main-sideber {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 95px !important;
    z-index: 99 !important;
    display: block !important;
    margin-top: 0 !important;
    overflow: visible !important;
    overflow-y: visible !important;
    max-height: none !important;
  }
}
