/* ==========================================================================
   FIXORAMA (PTY) LTD - RESPONSIVE STYLES
   ==========================================================================
   Responsive layout for:
   Desktop
   Laptop
   Tablet
   Mobile
   Small Mobile

   Designed to work with:
   - OpenLiteSpeed
   - Modern browsers
   - CSS Grid
   - Flexbox
   ========================================================================== */


/* ==========================================================================
   GLOBAL RESPONSIVE FOUNDATION
   ========================================================================== */

/* Prevent horizontal page overflow */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-x: hidden;
}

/* Make width calculations predictable */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Responsive media */
img,
svg,
video,
iframe,
embed,
object {
  max-width: 100%;
}

/* Images scale without distortion */
img {
  height: auto;
}

/* Prevent long words/URLs from breaking layouts */
p,
h1,
h2,
h3,
h4,
h5,
h6,
a,
span,
div {
  overflow-wrap: break-word;
}

/* Form elements must never exceed their parent */
input,
textarea,
select,
button {
  max-width: 100%;
  box-sizing: border-box;
}

/* Generic containers */
.container {
  width: min(100% - 30px, 1200px);
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Allow grid children to actually shrink */
.grid,
[class*="-grid"] {
  min-width: 0;
}

.grid > *,
[class*="-grid"] > * {
  min-width: 0;
}


/* ==========================================================================
   LARGE DESKTOP
   ========================================================================== */

@media (min-width: 1201px) {

  .container {
    width: min(100% - 40px, 1200px);
  }

}


/* ==========================================================================
   TABLET & SMALL DESKTOP
   <= 1024px
   ========================================================================== */

@media (max-width: 1024px) {

  /* ------------------------------------------------------------------------
     GLOBAL CONTAINER
     ------------------------------------------------------------------------ */

  .container {
    width: calc(100% - 40px);
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     HERO
     ------------------------------------------------------------------------ */

  .hero-content {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .hero-subheadline {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-visual-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-visual-block .glass-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }


  /* ------------------------------------------------------------------------
     ABOUT / CONTACT
     ------------------------------------------------------------------------ */

  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }


  /* ------------------------------------------------------------------------
     SERVICES / SOLUTIONS
     ------------------------------------------------------------------------ */

  .services-grid,
  .solutions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  /* ------------------------------------------------------------------------
     CALCULATOR
     ------------------------------------------------------------------------ */

  .calculator-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 32px;
  }

  .calculator-box > * {
    min-width: 0;
    max-width: 100%;
  }

  .calc-results-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .calc-slider-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .custom-range-slider {
    width: 100%;
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     GALLERY
     ------------------------------------------------------------------------ */

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  /* ------------------------------------------------------------------------
     QUALIFICATION BADGES
     ------------------------------------------------------------------------ */

  .qualification-badges {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }


  /* ------------------------------------------------------------------------
     TRUST BADGES
     ------------------------------------------------------------------------ */

  .trust-badges-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }


  /* ------------------------------------------------------------------------
     FOOTER
     ------------------------------------------------------------------------ */

  footer .container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 30px !important;
  }

}


/* ==========================================================================
   TABLET
   <= 900px
   ========================================================================== */

@media (max-width: 900px) {

  .container {
    width: calc(100% - 32px);
  }

  .hero-headline {
    font-size: clamp(2.2rem, 6vw, 3.5rem);
  }

  .section-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }

}


/* ==========================================================================
   MOBILE
   <= 768px
   ========================================================================== */

@media (max-width: 768px) {

  /* ------------------------------------------------------------------------
     GLOBAL
     ------------------------------------------------------------------------ */

  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    width: calc(100% - 30px);
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }


  /* ------------------------------------------------------------------------
     HEADER
     ------------------------------------------------------------------------ */

  .site-header {
    width: 100%;
    max-width: 100%;
  }

  .header-container {
    width: calc(100% - 30px);
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     MOBILE NAVIGATION
     ------------------------------------------------------------------------ */

  .nav-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    max-width: 100vw;

    background: var(--glass-bg);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    flex-direction: column;

    padding: 32px;

    gap: 20px;

    border-bottom: 1px solid var(--glass-border);

    transform: translateY(-150%);

    transition: transform var(--transition-normal);

    box-shadow: var(--shadow-lg);

    overflow-y: auto;
    overflow-x: hidden;
  }

  .nav-menu.open {
    transform: translateY(0);
  }

  .mobile-hamburger {
    display: block;
  }


  /* ------------------------------------------------------------------------
     HERO
     ------------------------------------------------------------------------ */

  .hero-content {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 100%;
  }

  .hero-content > * {
    min-width: 0;
    max-width: 100%;
  }

  .hero-headline {
    font-size: clamp(2rem, 8vw, 3rem);
    line-height: 1.1;
  }

  .hero-subheadline {
    font-size: clamp(1rem, 4vw, 1.25rem);
    line-height: 1.6;
  }

  .hero-badge-group {
    width: 100%;
    max-width: 100%;
  }

  .widget-pill {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .hero-visual-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .hero-visual-block .glass-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 16px !important;
  }

  .hero-visual-block svg {
    width: 100%;
    max-width: 100%;
    height: auto;
  }


  /* ------------------------------------------------------------------------
     HERO CTA BUTTONS
     ------------------------------------------------------------------------ */

  .hero-cta-group {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }

  .hero-cta-group .btn {
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     TRUST BADGES
     ------------------------------------------------------------------------ */

  .trust-badges-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
  }

  .trust-badge-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }


  /* ------------------------------------------------------------------------
     SERVICES
     ------------------------------------------------------------------------ */

  .services-grid,
  .solutions-grid {
    grid-template-columns: minmax(0, 1fr) !important;

    width: 100%;
    max-width: 100%;
  }

  .service-card-3d {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .service-visual-banner {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }

  .service-visual-banner svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
  }

  .service-card-body {
    min-width: 0;
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     ABOUT / CONTACT
     ------------------------------------------------------------------------ */

  .about-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     CALCULATOR
     ------------------------------------------------------------------------ */

  .calculator-box {
    display: grid;

    grid-template-columns: minmax(0, 1fr) !important;

    width: 100%;
    max-width: 100%;
    min-width: 0;

    padding: 24px !important;

    gap: 25px;
  }

  .calculator-box > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .calc-title {
    font-size: clamp(1.4rem, 6vw, 2rem);
    line-height: 1.2;
    overflow-wrap: break-word;
  }

  .calc-subtitle {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .calc-slider-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .calc-label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
  }

  .custom-range-slider {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .calc-results-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 20px;
  }

  /* Calculator result rows */
  .result-item {
    width: 100%;
    max-width: 100%;
    min-width: 0;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;
  }

  .result-item-label,
  .result-item-val {
    min-width: 0;
    overflow-wrap: break-word;
  }

  .result-item-label {
    flex: 1 1 auto;
  }

  .result-item-val {
    flex: 0 1 auto;
    text-align: right;
  }

  .calc-results-card .btn {
    width: 100% !important;
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     GALLERY
     ------------------------------------------------------------------------ */

  .gallery-grid {
    grid-template-columns: minmax(0, 1fr) !important;

    width: 100%;
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     QUALIFICATIONS
     ------------------------------------------------------------------------ */

  .qualification-badges {
    grid-template-columns: minmax(0, 1fr) !important;

    width: 100%;
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     SECTIONS
     ------------------------------------------------------------------------ */

  .section-padding {
    padding: 60px 0;
  }

  section {
    max-width: 100%;
    overflow-x: hidden;
  }


  /* ------------------------------------------------------------------------
     LIGHTBOX
     ------------------------------------------------------------------------ */

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }


  /* ------------------------------------------------------------------------
     BUTTONS
     ------------------------------------------------------------------------ */

  .btn {
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     FOOTER
     ------------------------------------------------------------------------ */

  footer {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  footer .container {
    grid-template-columns: minmax(0, 1fr) !important;

    width: calc(100% - 30px);
    max-width: 100%;

    gap: 30px !important;
  }

  footer form {
    display: flex !important;

    width: 100%;
    max-width: 100%;

    gap: 8px;
  }

  footer form input[type="email"] {
    flex: 1 1 auto;

    min-width: 0;

    width: auto !important;
    max-width: 100%;
  }

  footer form button {
    flex: 0 0 auto;
    white-space: nowrap;
  }


  /* ------------------------------------------------------------------------
     FOOTER TEXT
     ------------------------------------------------------------------------ */

  footer p,
  footer div,
  footer li,
  footer a {
    overflow-wrap: break-word;
  }

}


/* ==========================================================================
   SMALL MOBILE
   <= 480px
   ========================================================================== */

@media (max-width: 480px) {

  /* ------------------------------------------------------------------------
     GLOBAL CONTAINER
     ------------------------------------------------------------------------ */

  .container {
    width: calc(100% - 20px);
    max-width: 100%;
  }


  /* ------------------------------------------------------------------------
     HEADER
     ------------------------------------------------------------------------ */

  .header-container {
    width: calc(100% - 20px);
  }


  /* ------------------------------------------------------------------------
     HERO
     ------------------------------------------------------------------------ */

  .hero-headline {
    font-size: 1.85rem;
    line-height: 1.15;
  }

  .hero-subheadline {
    font-size: 0.95rem;
  }

  .hero-visual-block .glass-card {
    padding: 12px !important;
  }


  /* ------------------------------------------------------------------------
     BUTTONS
     ------------------------------------------------------------------------ */

  .btn {
    width: 100%;
    max-width: 100%;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta-group .btn {
    width: 100%;
  }


  /* ------------------------------------------------------------------------
     CALCULATOR
     ------------------------------------------------------------------------ */

  .calculator-box {
    width: 100%;
    max-width: 100%;

    padding: 18px !important;

    gap: 20px;
  }

  .calc-results-card {
    width: 100%;
    max-width: 100%;

    padding: 16px;
  }

  .calc-title {
    font-size: 1.5rem;
  }

  .calc-subtitle {
    font-size: 0.9rem;
  }

  .calc-label {
    flex-direction: column;

    align-items: flex-start;

    width: 100%;
  }

  .calc-slider-val {
    white-space: nowrap;
  }

  /* Stack calculator results */
  .result-item {
    flex-direction: column;

    align-items: flex-start;

    gap: 5px;
  }

  .result-item-label,
  .result-item-val {
    width: 100%;
    max-width: 100%;

    text-align: left;
  }


  /* ------------------------------------------------------------------------
     FOOTER NEWSLETTER
     ------------------------------------------------------------------------ */

  footer form {
    flex-direction: column;

    width: 100%;
    max-width: 100%;

    gap: 10px;
  }

  footer form input[type="email"],
  footer form button {
    width: 100% !important;
    max-width: 100%;

    min-height: 44px;
  }


  /* ------------------------------------------------------------------------
     SECTION SPACING
     ------------------------------------------------------------------------ */

  .section-padding {
    padding: 50px 0;
  }

}


/* ==========================================================================
   VERY SMALL PHONES
   <= 360px
   ========================================================================== */

@media (max-width: 360px) {

  .container {
    width: calc(100% - 16px);
  }

  .header-container {
    width: calc(100% - 16px);
  }

  .hero-headline {
    font-size: 1.65rem;
  }

  .calculator-box {
    padding: 14px !important;
  }

  .calc-results-card {
    padding: 14px;
  }

  .section-padding {
    padding: 40px 0;
  }

}


/* ==========================================================================
   RESPONSIVE TABLE SUPPORT
   ========================================================================== */

.table-wrapper {
  width: 100%;
  max-width: 100%;

  overflow-x: auto;

  -webkit-overflow-scrolling: touch;
}

table {
  max-width: 100%;
}


/* ==========================================================================
   RESPONSIVE FORMS
   ========================================================================== */

form {
  max-width: 100%;
}

form input,
form textarea,
form select {
  max-width: 100%;
}


/* ==========================================================================
   RESPONSIVE CARDS
   ========================================================================== */

.glass-card,
.service-card-3d,
.trust-badge-card,
.calc-results-card {
  min-width: 0;
  max-width: 100%;
}


/* ==========================================================================
   PREVENT FIXED-WIDTH ELEMENTS FROM BREAKING MOBILE
   ========================================================================== */

@media (max-width: 768px) {

  [style*="width: 100vw"] {
    max-width: 100vw !important;
  }

  [style*="width: 100%"] {
    max-width: 100% !important;
  }

}


/* ==========================================================================
   ACCESSIBILITY - REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

}