/*
 * responsive.css — Webnixian
 * Comprehensive responsive overrides for mobile, tablet, and all screen ratios.
 *
 * Breakpoints used (matching the project's existing breakpoints):
 *   ≥1400px  — xl desktop
 *   ≥992px   — desktop
 *   768–991px — tablet
 *   576–767px — small tablet / large mobile
 *   ≤575px   — mobile
 */

/* ==========================================================================
   1. GLOBAL — prevent horizontal overflow on all pages
   ========================================================================== */
html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  overflow-x: hidden;
}

/* Ensure images never overflow their containers */
img {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   2. LOGO — override inline width: 15% / width: 40% with proper sizing
   ========================================================================== */

/* Header & preloader logos */
.main-brand img,
.dsnload__img img {
  width: 80px !important;
  max-width: 100% !important;
  height: auto !important;
}

/* Footer logo — slightly larger */
#dsn_footer .main-brand img {
  width: 110px !important;
  max-width: 100% !important;
  height: auto !important;
}

@media only screen and (max-width: 575px) {
  .main-brand img,
  .dsnload__img img {
    width: 65px !important;
  }

  #dsn_footer .main-brand img {
    width: 90px !important;
  }
}

/* ==========================================================================
   3. SITE HEADER — spacing & padding on small screens
   ========================================================================== */
@media only screen and (max-width: 575px) {
  #site_menu_header {
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

/* ==========================================================================
   4. CONTACT PAGE HERO — reduce oversized top padding on mobile
   ========================================================================== */
@media only screen and (max-width: 991px) {
  #dsn_header.header-normal {
    padding-top: 130px;
  }
}

@media only screen and (max-width: 767px) {
  #dsn_header.header-normal {
    padding-top: 100px;
  }

  #dsn_header.header-normal .title:not(.title-org) {
    --title-heading: 42px;
  }
}

@media only screen and (max-width: 575px) {
  #dsn_header.header-normal {
    padding-top: 80px;
  }

  #dsn_header.header-normal .title:not(.title-org) {
    --title-heading: 34px;
  }
}

/* ==========================================================================
   5. MAIN HERO SLIDER — text & controls on very small screens
   ========================================================================== */
@media only screen and (max-width: 575px) {
  /* Further reduce the giant hero slide title */
  .main-slider .dsn-slider-content .title {
    font-size: 36px;
    line-height: 1.1;
  }

  /* Slide meta / subtitle label */
  .main-slider .dsn-slider-content .head-meta {
    margin-bottom: 10px;
  }

  /* Pagination counter */
  .main-slider .control-nav .dsn-pagination .h2 {
    font-size: 22px;
  }

  /* Keep the "Let's Build" CTA button readable */
  .main-slider .dsn-slider-content .dsn-def-btn .dsn-btn {
    font-size: 12px;
  }
}

/* ==========================================================================
   6. VISUAL IDENTITY SECTION — reduce 80vh image height on mobile
   ========================================================================== */
@media only screen and (max-width: 991px) {
  .h-v-80 {
    height: 55vh;
  }

  .h-v-70 {
    height: 45vh;
  }
}

@media only screen and (max-width: 767px) {
  .h-v-80 {
    height: 45vh;
  }

  .h-v-70 {
    height: 38vh;
  }

  .hv-50 {
    height: 38vh;
  }

  /* About section bottom image */
  .about-one .box-img-bottom {
    height: 35vh;
  }
}

@media only screen and (max-width: 575px) {
  .h-v-80 {
    height: 38vh;
  }

  .hv-50 {
    height: 30vh;
  }

  .about-one .box-img-bottom {
    height: 28vh;
  }
}

/* ==========================================================================
   7. ABOUT / WE ARE WEBNIXIANS SECTION — mobile layout polish
   ========================================================================== */
@media only screen and (max-width: 767px) {
  /* Remove the decorative bg-mask on mobile (too distracting at small sizes) */
  .about-section.about-one .bg-mask {
    display: none;
  }
}

@media only screen and (max-width: 575px) {
  /* Stack the CTA + description paragraph cleanly */
  .about-one .box-info .d-grid.grid-half-1 {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Fix text-right on mobile — should be left-aligned */
  .about-one .box-info .d-grid .text-right {
    text-align: left;
  }
}

/* ==========================================================================
   8. TOP SERVICE STRIP (icon-left) — remove orphan borders when stacked
   ========================================================================== */
@media only screen and (max-width: 575px) {
  .container.icon-left .service-item.border-left {
    border-left: none;
    border-top: 1px solid var(--border-color);
  }

  .container.icon-left .service-item {
    padding-top: 20px;
  }
}

/* ==========================================================================
   9. SERVICES WITH IMAGE SECTION — padding on mobile
   ========================================================================== */
@media only screen and (max-width: 575px) {
  .service-with-img .dsn-service .service-item {
    padding: 36px 20px !important;
  }
}

/* ==========================================================================
   10. TESTIMONIALS — ensure single-column layout on mobile
       (JS handles slidesPerView via breakpoints; this handles CSS fallback)
   ========================================================================== */
@media only screen and (max-width: 767px) {
  .dsn-testimonials .testimonial-inner-item {
    padding: 24px 20px;
  }

  /* Make quote text smaller so it fits */
  .dsn-testimonials .quote p {
    font-size: 0.88em;
    line-height: 1.75;
  }
}

/* ==========================================================================
   11. PORTFOLIO HORIZONTAL SCROLL — safe scrolling on mobile
   ========================================================================== */
@media only screen and (max-width: 767px) {
  .box-image-transform.dsn-style-cards .root-posts {
    overflow: hidden;
  }

  .dsn-grid-layout.use-horizontal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .dsn-grid-layout.use-horizontal-scroll::-webkit-scrollbar {
    height: 3px;
  }

  .dsn-grid-layout.use-horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
  }
}

/* ==========================================================================
   12. GRID HELPERS — force single column for 2-col grids on mobile
   ========================================================================== */
@media only screen and (max-width: 767px) {
  /* The contact page form/info panel and any generic grid-1-half */
  .d-grid.grid-1-half,
  .d-grid.grid-half-1 {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }
}

/* ==========================================================================
   13. SECTION SPACING — reduce large margins/paddings on mobile
   ========================================================================== */
@media only screen and (max-width: 767px) {
  .mb-70 {
    margin-bottom: 40px !important;
  }

  .mt-70 {
    margin-top: 40px !important;
  }

  .section-title.mb-70 {
    margin-bottom: 30px !important;
  }

  .pt-60 {
    padding-top: 30px !important;
  }

  .mt-60 {
    margin-top: 30px !important;
  }
}

@media only screen and (max-width: 575px) {
  .mb-70 {
    margin-bottom: 28px !important;
  }

  .mt-70 {
    margin-top: 28px !important;
  }
}

/* ==========================================================================
   14. FOOTER — mobile layout improvements
   ========================================================================== */
@media only screen and (max-width: 767px) {
  /* Add vertical spacing between stacked footer columns */
  #dsn_footer .grid-col-2,
  #dsn_footer .grid-col-3,
  #dsn_footer .grid-col-4 {
    margin-top: 24px;
  }

  /* Footer headline text size */
  #dsn_footer .footer-content .text-center .title-h2 {
    font-size: var(--title-heading);
  }

  /* Reduce top margin for footer content */
  #dsn_footer .footer-content {
    margin-top: 40px;
  }
}

@media only screen and (max-width: 575px) {
  /* Footer tagline: slightly tighter */
  #dsn_footer .footer-content .text-center .title-h2 {
    font-size: calc(var(--title-heading) * 0.9);
  }

  /* Footer bottom copyright */
  #dsn_footer .footer-bottom {
    margin-top: 30px;
  }
}

/* ==========================================================================
   15. CONTACT PAGE SPECIFICS — stats, process strip, form
   ========================================================================== */
@media only screen and (max-width: 767px) {
  /* Contact section padding */
  .contact-section-wrap.section-padding {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  /* Process strip padding */
  .process-strip {
    padding: 45px 0;
  }

  .process-strip .process-header {
    margin-bottom: 30px;
  }
}

@media only screen and (max-width: 575px) {
  /* Process steps: compact padding */
  .process-step {
    padding: 24px 18px;
  }

  /* Form submit row: stack vertically */
  .form-submit-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  /* Contact social buttons: allow wrap */
  .contact-social-row {
    flex-wrap: wrap;
  }

  /* Stat numbers: slightly smaller */
  .stat-num {
    font-size: 2.2em;
  }

  /* c-card hover transform: disable on mobile (no hover) */
  .c-card:hover {
    transform: none;
  }
}

/* ==========================================================================
   16. PRIVACY POLICY & TERMS — fix content padding on mobile
   ========================================================================== */
@media only screen and (max-width: 575px) {
  .p-callout {
    padding: 14px 16px;
  }
}

/* ==========================================================================
   17. SCROLL BOTTOM INDICATOR — hide on very small screens
   ========================================================================== */
@media only screen and (max-width: 575px) {
  .dsn-scroll-bottom {
    display: none;
  }
}

/* ==========================================================================
   18. MAX-WIDTH HELPERS — allow full width on mobile
   ========================================================================== */
@media only screen and (max-width: 575px) {
  .max-w570,
  .max-w350 {
    max-width: 100% !important;
  }
}

/* ==========================================================================
   19. TYPOGRAPHY — prevent very large text overflow on narrow screens
   ========================================================================== */
@media only screen and (max-width: 575px) {
  /* Section title headings */
  .title-h2,
  h2.title-h2 {
    word-break: break-word;
    hyphens: auto;
  }

  /* Portfolio OUR WORK / AWESOME DESIGNS letter-stroke heading */
  .dsn-item-post.start-section h2,
  .dsn-item-post.end-section h2 {
    font-size: clamp(24px, 8vw, 48px);
  }
}

/* ==========================================================================
   20. PRELOADER — logo size in loader animation
   ========================================================================== */
.dsnload .dsnload__img img {
  width: 80px !important;
  height: auto !important;
}

@media only screen and (max-width: 575px) {
  .dsnload .dsnload__img img {
    width: 60px !important;
  }
}
