/* ============================================
   SOLUTION-FRONT — Responsive Fixes
   RTL Arabic Cooling Tower Website
   Breakpoints: 1199px, 991px, 767px, 575px, 480px, 375px
   ============================================ */

/* ============================================
   0. GLOBAL OVERFLOWS & BASE FIXES
   ============================================ */
html, body {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

img {
  max-width: 100%;
  height: auto;
}

svg {
  max-width: 100%;
}

/* ============================================
   1. HEADER — Top Bar Responsive
   ============================================ */

/* Tablet: hide top bar on smaller screens */
@media only screen and (max-width: 991px) {
  .rs-header-top {
    display: none;
  }
}

/* Header logo on mobile */
@media only screen and (max-width: 767px) {
  .rs-header-logo img {
    max-width: 100px;
  }
}

@media only screen and (max-width: 480px) {
  .rs-header-logo img {
    max-width: 85px;
  }
}

/* Header inner - sticky bar mobile adjustments */
@media only screen and (max-width: 575px) {
  .rs-header-inner {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .rs-header-right {
    gap: 10px;
  }

  .rs-header-search-wrapper {
    margin-inline-start: 5px;
  }
}

/* Language switch icon sizing */
@media only screen and (max-width: 480px) {
  .lang-switch i {
    font-size: 18px;
  }
}

/* ============================================
   2. BANNER / SLIDER — Mobile Fixes
   ============================================ */

@media only screen and (max-width: 575px) {
  .rs-banner-four .rs-banner-title {
    font-size: 28px !important;
    line-height: 1.2;
  }

  .rs-banner-four .rs-banner-subtitle {
    font-size: 14px;
  }

  .rs-banner-four .rs-banner-desc {
    font-size: 14px;
    line-height: 1.6;
  }

  .rs-banner-four .rs-banner-btn-wrapper {
    flex-direction: column;
    gap: 10px;
  }

  .rs-banner-four .rs-banner-btn-wrapper .rs-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .rs-banner-four .rs-banner-content-wrapper {
    padding-top: 80px;
    padding-bottom: 60px;
  }
}

@media only screen and (max-width: 480px) {
  .rs-banner-four .rs-banner-title {
    font-size: 24px !important;
  }
}

@media only screen and (max-width: 375px) {
  .rs-banner-four .rs-banner-title {
    font-size: 22px !important;
  }

  .rs-banner-four .rs-banner-content-wrapper {
    padding-top: 60px;
    padding-bottom: 40px;
  }
}

/* ============================================
   3. BREADCRUMB — Mobile Adjustments
   ============================================ */

@media only screen and (max-width: 575px) {
  .rs-breadcrumb-one .rs-breadcrumb-title {
    font-size: 26px;
  }

  .rs-breadcrumb-one .rs-breadcrumb-menu ul {
    flex-wrap: wrap;
    gap: 5px;
  }

  .rs-breadcrumb-one .rs-breadcrumb-menu ul li {
    font-size: 14px;
  }
}

@media only screen and (max-width: 480px) {
  .rs-breadcrumb-one .rs-breadcrumb-title {
    font-size: 22px;
  }

  .rs-breadcrumb-area {
    min-height: auto;
  }
}

/* ============================================
   4. ABOUT SECTION (rs-about-five) — Tablet & Mobile
   ============================================ */

@media only screen and (max-width: 767px) {
  .rs-about-five .rs-about-wrapper {
    gap: 20px;
  }

  .rs-about-five .rs-about-thumb.has-large img,
  .rs-about-five .rs-about-thumb.has-small img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .rs-about-five .rs-about-content-wrapper {
    margin-top: 20px;
  }

  .rs-about-five .rs-about-tab .nav-pills {
    flex-direction: column;
  }

  .rs-about-five .rs-about-tab .nav-link {
    width: 100%;
    padding: 10px 15px;
  }

  .rs-about-five .rs-section-title {
    font-size: 24px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-about-five .rs-about-tab .nav-link {
    font-size: 14px;
    padding: 8px 12px;
    height: auto;
  }

  .rs-about-five .rs-about-tab-content p {
    font-size: 14px;
    line-height: 1.7;
  }

  .rs-about-five .rs-about-feature-list .rs-list-item ul li {
    font-size: 14px;
  }
}

/* ============================================
   5. SERVICES SECTIONS — Responsive
   ============================================ */

/* Services tab section (rs-services-one) */
@media only screen and (max-width: 767px) {
  .rs-services-one .rs-services-tab .nav-pills {
    flex-wrap: wrap;
  }

  .rs-services-one .rs-services-tab .nav-link {
    flex: 1 1 calc(50% - 10px);
    font-size: 14px;
    padding: 10px 15px;
  }
}

@media only screen and (max-width: 480px) {
  .rs-services-one .rs-services-tab .nav-link {
    flex: 1 1 100%;
  }
}

/* Services cards (rs-services-five) */
@media only screen and (max-width: 767px) {
  .rs-services-five .rs-services-item {
    padding: 25px 20px;
  }

  .rs-services-five .rs-services-title {
    font-size: 18px;
  }

  .rs-services-five .rs-services-desc {
    font-size: 14px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-services-five .rs-services-icon svg {
    width: 40px;
    height: 40px;
  }
}

/* Services Details Page */
@media only screen and (max-width: 767px) {
  .rs-services-details-wrapper .rs-services-details-title {
    font-size: 22px;
  }

  .rs-services-details-wrapper .rs-list-item ul {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .rs-services-details-wrapper .rs-list-item ul li {
    font-size: 14px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-services-details-wrapper .rs-services-details-thumb img {
    border-radius: 5px;
  }

  .rs-services-details-wrapper p {
    font-size: 14px;
    line-height: 1.7;
  }
}

/* ============================================
   6. MARKET SECTORS — Grid Responsive
   ============================================ */

@media only screen and (max-width: 767px) {
  .rs-sector-item,
  .rs-category-one .rs-category-item {
    min-height: auto;
  }
}

@media only screen and (max-width: 575px) {
  .rs-sector-item .rs-sector-title,
  .rs-category-one .rs-category-title {
    font-size: 16px;
  }

  .rs-sector-item .rs-sector-desc,
  .rs-category-one .rs-category-desc {
    font-size: 13px;
  }
}

/* ============================================
   7. PORTFOLIO — Grid & Details Responsive
   ============================================ */

@media only screen and (max-width: 767px) {
  .rs-portfolio-three .rs-portfolio-item {
    min-height: auto;
  }

  .rs-portfolio-three .rs-portfolio-title {
    font-size: 18px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-portfolio-three .rs-portfolio-content {
    padding: 15px;
  }

  .rs-portfolio-three .rs-portfolio-title {
    font-size: 16px;
  }
}

/* Portfolio details page */
@media only screen and (max-width: 767px) {
  .rs-portfolio-details-wrapper .rs-portfolio-details-title {
    font-size: 22px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-portfolio-details-wrapper p {
    font-size: 14px;
    line-height: 1.7;
  }
}

/* ============================================
   8. PRODUCTS — Slider & Details Responsive
   ============================================ */

/* Products slider */
@media only screen and (max-width: 575px) {
  .rs-portfolio-one .rs-portfolio-title {
    font-size: 16px;
  }
}

/* Product Details Page */
@media only screen and (max-width: 991px) {
  .rs-product-details h3 {
    font-size: 22px;
  }
}

@media only screen and (max-width: 767px) {
  .rs-product-details {
    margin-top: 20px;
  }

  .rs-product-details h3 {
    font-size: 20px;
    margin-top: 15px;
    margin-bottom: 15px;
  }

  .rs-product-details-tab-list {
    margin-bottom: 30px;
  }

  .rs-product-details-tab-list ul li {
    font-size: 14px;
    padding-inline-start: 25px;
  }

  .rs-product-details-tab-list ul li::before {
    font-size: 12px;
    width: 18px;
    height: 18px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-product-details h3 {
    font-size: 18px;
  }

  .rs-product-details p,
  .rs-product-details .descrip {
    font-size: 14px;
    line-height: 1.7;
  }

  .productSwiper img {
    border-radius: 5px;
  }

  /* Swiper navigation buttons on mobile */
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
}

/* ============================================
   9. COOLING TOWERS — Tab & Details Pages
   ============================================ */

@media only screen and (max-width: 767px) {
  .rs-services-one .rs-services-tab-content img {
    width: 100%;
    height: auto;
  }
}

@media only screen and (max-width: 575px) {
  .rs-services-one .rs-services-tab-content .rs-services-desc {
    font-size: 14px;
  }
}

/* ============================================
   10. WHY CHOOSE US — (rs-why-choose-three)
   ============================================ */

@media only screen and (max-width: 767px) {
  .rs-why-choose-three .rs-why-choose-content-wrapper {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .rs-why-choose-three .rs-why-choose-content-item {
    flex-direction: column;
    text-align: center;
  }

  .rs-why-choose-three .rs-why-choose-icon {
    margin-bottom: 15px;
  }

  .rs-why-choose-three .rs-why-choose-title {
    font-size: 18px;
  }

  .rs-why-choose-three .rs-why-choose-content .descrip {
    font-size: 14px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-why-choose-btn-wrapper {
    min-height: 250px;
  }

  .rs-play-btn.has-theme-orange {
    width: 60px;
    height: 60px;
    font-size: 20px;
  }
}

/* ============================================
   11. CONTACT PAGE — Cards, Form, Info
   ============================================ */

/* Contact info cards */
@media only screen and (max-width: 575px) {
  .rs-contact-nine .rs-contact-wrapper {
    gap: 15px;
  }

  .rs-contact-nine .rs-contact-item {
    padding: 20px;
  }

  .rs-contact-nine .rs-contact-title {
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 15px;
  }

  .rs-contact-nine .rs-contact-content a {
    font-size: 14px;
    word-break: break-all;
  }

  .rs-contact-nine .rs-contact-content p {
    font-size: 14px;
  }
}

/* Contact Form */
@media only screen and (max-width: 575px) {
  .rs-contact-ten .rs-contact-form {
    padding: 25px 15px;
  }

  .rs-contact-ten .rs-contact-title,
  .rs-contact-ten .rs-contact-form-title {
    font-size: 24px;
  }

  .rs-contact-ten .rs-contact-form .descrip {
    font-size: 14px;
    margin: 10px auto 20px;
  }

  .rs-contact-ten .rs-contact-input input {
    padding: 12px 15px;
    font-size: 14px;
  }

  .rs-contact-ten .rs-contact-input textarea {
    padding: 12px 15px;
    font-size: 14px;
    height: 120px;
  }

  .rs-contact-ten .rs-contact-btn .rs-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

@media only screen and (max-width: 480px) {
  .rs-contact-ten .rs-contact-title,
  .rs-contact-ten .rs-contact-form-title {
    font-size: 20px;
  }
}

/* ============================================
   12. BRAND / CLIENTS SECTION — Mobile Fix
   ============================================ */

@media only screen and (max-width: 575px) {
  .rs-brand-one .rs-brand-thumb img {
    max-height: 60px;
    object-fit: contain;
  }
}

/* ============================================
   13. FOOTER — Full Responsive
   ============================================ */

@media only screen and (max-width: 991px) {
  .rs-footer-two .rs-footer-top {
    padding-top: 50px;
    padding-bottom: 30px;
  }
}

@media only screen and (max-width: 767px) {
  .rs-footer-widget-title {
    font-size: 18px;
  }

  .rs-footer-widget-description {
    font-size: 14px;
  }

  .rs-footer-widget-links ul li a {
    font-size: 14px;
  }

  .rs-footer-widget-address a {
    font-size: 14px;
    word-break: break-word;
  }

  .rs-footer-widget-email a {
    font-size: 14px;
    word-break: break-all;
  }

  .rs-footer-widget-number span a {
    font-size: 14px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-footer-two .rs-footer-top {
    padding-top: 40px;
    padding-bottom: 20px;
  }

  .rs-footer-widget-stroke-text img {
    width: 50%;
    margin-bottom: 20px;
  }

  .rs-footer-copyright p {
    font-size: 13px;
    line-height: 1.7;
  }

  .rs-footer-copyright-area {
    padding-top: 15px;
    padding-bottom: 15px;
  }

  .rs-theme-social.has-theme-orange a {
    width: 35px;
    height: 35px;
    font-size: 14px;
  }
}

/* ============================================
   14. SECTION SPACING — Extra Small Screens
   ============================================ */

@media only screen and (max-width: 575px) {
  .section-space {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .section-space-top {
    padding-top: 50px;
  }

  .section-space-bottom {
    padding-bottom: 50px;
  }

  .section-title-space {
    margin-bottom: 25px;
  }
}

@media only screen and (max-width: 480px) {
  .section-space {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  .section-space-top {
    padding-top: 40px;
  }

  .section-space-bottom {
    padding-bottom: 40px;
  }

  .section-title-space {
    margin-bottom: 20px;
  }
}

/* ============================================
   15. SECTION TITLE — Mobile Typography
   ============================================ */

@media only screen and (max-width: 575px) {
  .rs-section-subtitle {
    font-size: 13px;
  }
}

@media only screen and (max-width: 480px) {
  .rs-section-title {
    font-size: 22px;
    line-height: 1.3;
  }
}

@media only screen and (max-width: 375px) {
  .rs-section-title {
    font-size: 20px;
  }

  h2 {
    font-size: 22px;
  }
}

/* ============================================
   16. BUTTONS — Mobile Full-Width
   ============================================ */

@media only screen and (max-width: 575px) {
  .rs-btn {
    padding: 12px 25px;
    font-size: 14px;
  }
}

@media only screen and (max-width: 480px) {
  .rs-btn {
    padding: 10px 20px;
    font-size: 13px;
  }
}

/* ============================================
   17. WORKING PROCESS — Mobile Grid
   ============================================ */

@media only screen and (max-width: 575px) {
  .working-process-wrapper5 .content .title {
    font-size: 14px;
  }

  .working-process-wrapper5 .content .desc {
    font-size: 13px;
    line-height: 1.5;
  }
}

/* ============================================
   18. SIDEBAR — Detail Pages Responsive
   ============================================ */

@media only screen and (max-width: 991px) {
  .rs-sidebar-area {
    margin-top: 40px;
  }
}

@media only screen and (max-width: 575px) {
  .rs-sidebar-area {
    margin-top: 30px;
  }

  .rs-sidebar-area .rs-sidebar-widget {
    padding: 20px;
  }
}

/* ============================================
   19. POSTBOX / VIDEO — Detail Pages
   ============================================ */

@media only screen and (max-width: 575px) {
  .rs-postbox-details-video {
    min-height: 200px;
  }

  .rs-postbox-details-video .rs-video-play-btn {
    transform: translate(-50%, -50%) scale(0.8);
  }
}

/* ============================================
   20. ACCORDION — Mobile Spacing
   ============================================ */

@media only screen and (max-width: 575px) {
  .rs-accordion-one .accordion-body {
    padding: 15px;
    font-size: 14px;
  }

  .rs-accordion-one .accordion-button {
    font-size: 15px;
    padding: 12px 15px;
  }
}

/* ============================================
   21. RTL-SPECIFIC MOBILE FIXES
   ============================================ */

@media only screen and (max-width: 767px) {
  [dir="rtl"] .rs-header-info-wrapper {
    justify-content: center;
    text-align: center;
  }

  [dir="rtl"] .rs-breadcrumb-menu ul {
    justify-content: flex-start;
  }

  [dir="rtl"] .rs-section-subtitle.justify-content-start {
    justify-content: center !important;
  }
}

@media only screen and (max-width: 575px) {
  [dir="rtl"] .rs-about-five .rs-section-title-wrapper {
    text-align: center;
  }

  [dir="rtl"] .rs-footer-widget {
    text-align: center;
  }

  [dir="rtl"] .rs-footer-widget-links ul li a::before {
    display: none;
  }

  [dir="rtl"] .rs-footer-widget-social {
    justify-content: center;
  }

  [dir="rtl"] .rs-theme-social.has-theme-orange {
    justify-content: center;
  }
}

/* ============================================
   22. BACK TO TOP — Mobile Position
   ============================================ */

@media only screen and (max-width: 575px) {
  .backtotop-wrap {
    bottom: 15px;
    inset-inline-end: 15px;
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   23. CUSTOM CURSOR — Disable on Touch
   ============================================ */

@media (hover: none) and (pointer: coarse) {
  #rs-mouse,
  #cursor-ball {
    display: none !important;
  }
}

/* ============================================
   24. TABLES & OVERFLOW — General Mobile
   ============================================ */

@media only screen and (max-width: 767px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  iframe {
    max-width: 100%;
  }
}

/* ============================================
   25. ROW GAP — Tighter on Mobile
   ============================================ */

@media only screen and (max-width: 575px) {
  .row.g-5 {
    --bs-gutter-y: 1.5rem;
    --bs-gutter-x: 1rem;
  }
}

@media only screen and (max-width: 480px) {
  .row.g-5 {
    --bs-gutter-y: 1rem;
    --bs-gutter-x: 0.75rem;
  }
}

/* ============================================
   26. SMOOTH SCROLLER — Disable on Mobile
   (prevents janky mobile scroll)
   ============================================ */

@media only screen and (max-width: 991px) {
  .rs-smoother-yes .has-smooth {
    overflow-y: auto !important;
  }
}

/* ============================================
   27. FIXES FOR VERY SMALL SCREENS (375px)
   ============================================ */

@media only screen and (max-width: 375px) {
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .rs-header-logo img {
    max-width: 75px;
  }

  .rs-breadcrumb-one .rs-breadcrumb-title {
    font-size: 20px;
  }

  .rs-contact-ten .rs-contact-form {
    padding: 20px 10px;
  }

  .rs-footer-widget-title {
    font-size: 16px;
  }
}