/* ==========================================================================
   Responsive layer – B Soft
   Load AFTER css/style.css (and css/contact.css on the contact page).

   Strategy: the desktop design (>1100px) is left exactly as it was. Everything
   below is mobile-first-ish fixes for tablets and phones (320px and up):
   fluid type with clamp(), grid/flex instead of fixed widths, no absolute
   positioned hero text, 44px+ touch targets, 16px form fonts (no iOS zoom).
   ========================================================================== */

:root {
  /* layout tokens */
  --gutter: clamp(16px, 4.5vw, 32px);
  --radius-card: clamp(18px, 4vw, 30px);
  --tap: 48px;                                   /* minimum touch target */

  /* colour tokens used by this file (the rest come from style.css :root).
     You can move this block into style.css :root if you prefer. */
  --color-white-80: rgba(255, 255, 255, 0.80);
  --color-white-76: rgba(255, 255, 255, 0.76);
  --color-white-70: rgba(255, 255, 255, 0.70);
  --color-white-68: rgba(255, 255, 255, 0.68);
  --color-white-90: rgba(255, 255, 255, 0.90);
  --color-accent-dark-62: rgba(18, 63, 58, 0.62);   /* placeholder text      */
  --color-accent-dark-16: rgba(18, 63, 58, 0.16);   /* button hover shadow   */
  --color-accent-dark-14: rgba(18, 63, 58, 0.14);   /* soft card shadow      */
  --color-accent-dark-06: rgba(18, 63, 58, 0.06);   /* input inner shadow    */
  --color-teal-border: rgba(106, 164, 165, 0.28);   /* input border          */
  --color-mint-75: rgba(202, 232, 225, 0.75);       /* read-only field       */
  --color-card-shadow: rgba(20, 69, 66, 0.09);
  --color-yellow-focus: rgba(235, 180, 71, 0.35);   /* focus ring            */
  --color-yellow-btn-from: #ffdc75;
  --color-yellow-btn-to: #ffd34f;
  --color-yellow-btn-hover: #f2c66c;
  --color-yellow-btn-border-hover: #dca33d;
}

/* ---------- 0. Foundations ------------------------------------------------ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, canvas, iframe { max-width: 100%; }
main, .container, .container-1, .container-news, .cards-wrapper { min-width: 0; }
.container { width: 100%; }                      /* was 100vw → caused horizontal scroll */

/* Everything below only applies to tablets/phones – the desktop layout is untouched. */
@media (max-width: 1100px) {
  html { height: auto; }
  body { height: auto; min-height: 100vh; min-height: 100dvh; }
  .container { max-width: 1320px; padding: clamp(16px, 4vw, 30px); }
  .container p { font-size: clamp(1rem, 2.4vw, 1.5rem); line-height: 1.5; }
  .title {
    margin: clamp(10px, 3vw, 20px) !important;
    font-size: clamp(1.35rem, 4.6vw, 2rem) !important;
    line-height: 1.25;
    overflow-wrap: break-word;
  }
}

/* ---------- 1. Hero (tablet + phone) ------------------------------------- */
@media (max-width: 1100px) {

  .hero, .hero-news {
    min-height: clamp(200px, 40vw, 380px) !important;
    height: auto;
    padding: calc(var(--nav-gutter, 12px) + var(--nav-bar-h, 64px) + 22px) 0 clamp(20px, 5vw, 40px) !important;
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 3vw, 24px);
  }
  .hero:has(.home-hero-actions) {
    min-height: min(100svh, 700px) !important;
    justify-content: center;
  }

  /* text card that replaces the old absolutely positioned headline */
  .img-element,
  .img-element-about,
  .img-element-none-color,
  .img-element-products {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 var(--gutter) !important;
    padding: clamp(18px, 4.5vw, 32px) !important;
    transform: none !important;
    flex: 0 0 auto;                      /* never let the flex hero squash the text card */
    justify-content: flex-start;
    background: var(--color-white-80) !important;
    border: 1px solid var(--color-white-70);
    border-radius: var(--radius-card);
    box-shadow: 0 14px 40px var(--color-accent-dark-14);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }
  .img-element-about { left: auto !important; bottom: auto !important; }

  .img-text, .img-text-product {
    position: static !important;
    transform: none !important;
    z-index: auto !important;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0 !important;
    background: none !important;
    border-radius: 0;
    color: var(--color-accent-dark) !important;
    font-size: clamp(1.5rem, 6vw, 2.6rem) !important;
    line-height: 1.2 !important;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  .home-hero-description {
    transform: none;
    max-width: none;
    margin: 12px 0 0;
    font-size: clamp(.95rem, 2.4vw, 1.1rem);
    line-height: 1.6;
  }
  .home-hero-actions { transform: none; margin-top: 18px; gap: 10px; }
  .home-hero-button {
    flex: 1 1 160px;
    max-width: none;
    min-height: var(--tap);
    padding: 0 18px;
    font-size: 15px;
  }

  .intro-text { font-size: clamp(.95rem, 3.6vw, 1.1rem) !important; line-height: 1.6 !important; }
  .inline-icon { height: clamp(34px, 9vw, 50px); }

  /* about page stats bar: in the flow below the text, not on top of it */
  .hero > .bg-black-about {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    margin: 0 var(--gutter);
    transform: none;                     /* old translateY(-50px) pulled it over the text */
    flex: 0 0 auto;
  }
}

@media (max-width: 1100px) {
  /* ---------- 2. Sections ----------------------------------------------------- */
  .btn-call {
    width: min(100% - 2 * var(--gutter), 420px);
    min-height: 56px;
    height: auto;
    margin: clamp(16px, 4vw, 50px) auto;
    transform: none;
    padding: 12px 24px;
    font-size: clamp(1rem, 3.6vw, 1.25rem);
  }

  /* activity / project cards */
  .cards-wrapper { padding-inline: var(--gutter); }
  .card, .card.reverse { height: auto; min-height: 0; border-radius: var(--radius-card); margin: clamp(16px, 4vw, 40px) auto; }
  @media (min-width: 769px) { .card { min-height: 340px; } }
  .card-content { padding: clamp(18px, 3vw, 36px); }
  .card-text { padding: clamp(14px, 3vw, 30px); }
  .card-text h2, .activity_title h2 { font-size: clamp(1.15rem, 3.2vw, 2rem); line-height: 1.25; }
  .card-text p, .card-content p { font-size: clamp(.95rem, 2.3vw, 1.1rem); }
  @media (max-width: 768px) {
    .card-image { height: clamp(180px, 52vw, 300px); }
  }
  .btn-activity {
    width: auto;
    min-width: 150px;
    height: auto;
    min-height: var(--tap);
    padding: 10px 22px;
    align-self: flex-start;
  }

  /* project feature lists */
  .project-features li, .product-features li { min-width: 0; overflow-wrap: anywhere; }

  /* certificates */
  .container-certificat { width: auto; margin: 0 var(--gutter); padding: clamp(10px, 3vw, 30px) 0; }
  .certificat { font-size: clamp(1.25rem, 4.6vw, 1.9rem); }
  .bg-white-certificat { gap: clamp(10px, 2vw, 18px); margin: 10px 0; padding: clamp(14px, 3vw, 24px); }
  .img-certificat { max-width: 100%; object-fit: contain; }
  @media (max-width: 768px) { .img-certificat { height: clamp(150px, 46vw, 250px); } }

  /* partners + achievements carousels */
  .partners-wrapper, .achievements-wrapper { max-width: min(1200px, 100% - 2 * var(--gutter)); }
  @media (min-width: 601px) {
    #partnersContainer { gap: clamp(10px, 2vw, 30px); }
    .partner-img { flex: 1 1 0; min-width: 0; max-width: 200px; width: auto; height: clamp(80px, 14vw, 120px); }
  }
  @media (max-width: 600px) {
    .achievements-wrapper {
      min-height: 0;
      margin: 20px auto 32px;
      padding: 16px 56px;
      gap: 0;
    }
    #achievementsContainer { gap: 10px; }
    .achievement-img { flex: 0 1 auto; min-width: 0; max-width: calc(50% - 5px); width: auto; height: clamp(150px, 50vw, 230px); object-fit: contain; }
    .achievements-wrapper button, .partners-wrapper button {
      position: absolute; z-index: 1; width: 44px; height: 44px; font-size: 26px; line-height: 1;
    }
    #achievementsPrev, #partnersPrev { left: 6px; }
    #achievementsNext, #partnersNext { right: 6px; }
  }
  .achievement-img:hover, .partner-img:hover { transform: none; }
  @media (hover: hover) { .achievement-img:hover, .partner-img:hover { transform: scale(1.05); } }

  /* products list */
  .container-1 {
    width: 100%;                                   /* explicit: auto side-margins + flex parent would shrink-wrap */
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 40px) var(--gutter);
    gap: clamp(14px, 3vw, 32px);
  }
  .col-50-white { height: auto; min-height: 110px; padding: 18px 22px; border-radius: var(--radius-card); }
  .col-50-white::before, .col-50-white::after { border-radius: var(--radius-card); }
  .col-50-white p { font-size: clamp(1rem, 3.8vw, 1.25rem); overflow-wrap: anywhere; }
  @media (hover: none) { .col-50-white:hover { transform: none; } }

  /* news list */
  .container-news {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: clamp(14px, 3vw, 24px);
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 40px) var(--gutter);
  }
  .news-card { width: auto; min-height: 220px; margin: 0; }
  .news-title { margin: 22px 14px 0; overflow-wrap: break-word; }
  .news-content { margin-inline: 14px; }
  @media (hover: none) { .news-card:hover { transform: none; } }

  /* ---------- 3. Product + news detail pages -------------------------------- */
  .product-details {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
    gap: clamp(16px, 3vw, 32px);
    align-items: start;
    text-align: left;
  }
  .product-image { width: 100%; max-height: 460px; margin: 0; }
  .text { max-width: 100%; padding: 0; flex-direction: column; }
  .product-description p, .text p {
    max-width: 100%;
    font-size: clamp(.95rem, 2.6vw, 1.1rem);
    line-height: 1.65;
    text-align: left;
  }
  .product-description { padding: clamp(18px, 3vw, 28px); }
  .product-actions .btn-product { min-height: var(--tap); }
  @media (max-width: 860px) {
    .product-details { grid-template-columns: minmax(0, 1fr); }
    .product-actions .btn-product { width: 100%; }
  }
  .data { position: static; margin: 16px 0 0; text-align: right; }

  /* ---------- 4. Footer --------------------------------------------------------- */
  .site-footer a, .header-inner a { min-width: 0; flex-basis: auto; }
  @media (max-width: 1100px) {
    .site-footer { padding: 0 var(--gutter); }
    .site-footer-container { width: 100%; }
  }
  @media (max-width: 900px) { .site-footer-list li { white-space: normal; overflow-wrap: anywhere; } }
  @media (max-width: 900px) {
    .site-footer-list a { display: inline-flex; align-items: center; min-height: 36px; }
    .site-footer-social a { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
    .site-footer-brand h3 { font-size: clamp(1.4rem, 6vw, 1.75rem); }
  }

  /* ---------- 5. Forms, modals, phone input (touch friendly) ------------------- */
  .bg-none {
    width: min(440px, calc(100vw - 2 * var(--gutter)));
    max-width: 100%;
    padding: clamp(18px, 5vw, 28px);
  }
  .modal { height: 100vh !important; height: 100dvh !important; overflow-y: auto !important; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: var(--gutter); box-sizing: border-box; }
  .modal.active { align-items: flex-start !important; }
  .modal > .bg-none, .modal > .modal-content { margin: auto !important; }
  .modal-content { width: min(420px, 100%) !important; padding: 0 !important; }
  .close {
    display: grid; place-items: center;
    width: 44px; height: 44px;
    top: 6px !important; right: 6px !important;
    font-size: 30px; line-height: 1;
  }

  form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  form textarea,
  form select,
  .form-control,
  .form-group,
  .form-container .form-group {
    width: 100%;
    max-width: 100%;
  }
  form:not(.contact-form) input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
  form:not(.contact-form) select,
  .form-control { min-height: var(--tap); font-size: 16px; }   /* 16px = no zoom on iOS focus */
  form:not(.contact-form) textarea { min-height: 110px; font-size: 16px; }
  input[type="submit"].btn-form, .btn-form {
    width: 100%;
    min-height: 52px;
    margin: 12px 0 0;
    transform: none;
    justify-content: center;
    align-items: center;
    font-size: 16px;
  }
  .form-container { padding: clamp(10px, 3vw, 30px) var(--gutter); }

  /* intl-tel-input: bigger hit area for the country selector, sane dropdown width */
  .iti { display: block; width: 100%; }
  .iti__flag-container { z-index: 1; }
  @media (max-width: 900px) {
    .iti__selected-flag { min-width: 56px; padding: 0 10px 0 14px; }
    .iti__selected-dial-code { font-size: 16px; }
  }
  .iti__country-list {
    width: min(320px, calc(100vw - 2 * var(--gutter)));   /* the list used to collapse to one letter per line */
    max-width: none;
    max-height: min(50vh, 300px);
    white-space: normal;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }
  .modal .iti__country-list { width: min(320px, calc(100vw - 2 * var(--gutter) - 2 * clamp(18px, 5vw, 28px))); }
  .iti__country { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; }
  .iti__country-name { flex: 1; min-width: 0; margin: 0; overflow-wrap: anywhere; }
  .iti__dial-code { flex: none; margin: 0; }
  .iti__flag-box { flex: none; margin: 0; }
  .iti--fullscreen-popup.iti--container { padding: 16px; }
  .iti--fullscreen-popup .iti__country { min-height: 52px; }

}

/* global, desktop-safe */
/* the sticky header must not sit above an open modal */
body:has(.modal.active) header { z-index: 1; }
.iti--container { z-index: 10050; }          /* above header (3000) and modal (9999) */

/* ---------- 6. Contact page -------------------------------------------------- */
.contact-page { overflow-x: clip; }            /* the blurred bg (inset:-8px) leaked ~18px sideways */
.contact-page .contact-layout { grid-template-columns: minmax(min(360px, 100%), .9fr) minmax(0, 1.45fr); }
@media (max-width: 1200px) {
  .contact-page { padding: 112px var(--gutter) 40px; }
}
@media (max-width: 900px) {
  .contact-page .contact-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .contact-page .contact-intro { max-width: none; }
}
@media (max-width: 600px) {
  .contact-page .contact-info-card .contact-details-list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .contact-page .contact-intro h1 { font-size: clamp(1.9rem, 8.5vw, 2.4rem); }
  .contact-page .contact-submit { width: 100%; }
}
@media (max-width: 600px) { .contact-page .contact-detail a { display: inline-flex; align-items: center; min-height: 32px; } }

/* ---------- 7. Lessons ------------------------------------------------------- */
@media (max-width: 900px) {
  .yt-item { min-height: 56px; }
  .yt-sidebar { max-height: min(400px, 60vh); }
}

/* ---------- 8. Performance / comfort on phones ------------------------------- */
@media (max-width: 700px) {
  .reveal-ready { filter: none; transform: translateY(14px); }   /* big blur() filters make scrolling janky */
}
@media (prefers-reduced-motion: reduce) {
  .col-50-white::before { animation: none; }
}


/* ===== Activity modal – same look as the contact page form ===== */

/* card */
#activityModal .bg-none {
  background: var(--color-white-70);
  border: 1px solid var(--color-white-68);
  border-radius: 25px;
  box-shadow: 0 20px 56px var(--color-card-shadow), inset 0 1px var(--color-white-90);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--color-accent-dark);
}

/* inputs + textarea */
#activityModal form input:not([type="hidden"]):not([type="submit"]),
#activityModal form textarea {
  background-color: var(--color-white-76);
  color: var(--color-accent-dark);
  border: 1px solid var(--color-teal-border);
  border-radius: 13px;
  box-shadow: inset 0 1px 2px var(--color-accent-dark-06);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
#activityModal form input::placeholder,
#activityModal form textarea::placeholder { color: var(--color-accent-dark-62); }
#activityModal form input:focus-visible,
#activityModal form textarea:focus-visible {
  border-color: var(--color-yellow-deep);
  box-shadow: 0 0 0 3px var(--color-yellow-focus), inset 0 1px 2px var(--color-accent-dark-06);
}

/* read-only product name field */
#activityModal form input[readonly] {
  background-color: var(--color-mint-75);
  font-weight: 700;
}

/* phone: dial code + arrow */
#activityModal .iti__selected-dial-code { color: var(--color-accent-dark) !important; }
#activityModal .iti__arrow { border-top-color: var(--color-accent-dark); }
#activityModal .iti__arrow--up { border-bottom-color: var(--color-accent-dark); }

/* submit button */
#activityModal input[type="submit"].btn-form {
  background: linear-gradient(105deg, var(--color-yellow-btn-from), var(--color-yellow-btn-to));
  color: var(--color-accent-dark);
  border: 1px solid var(--color-yellow-deep);
  border-radius: 32px;
  box-shadow: none;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
#activityModal input[type="submit"].btn-form:hover {
  background: var(--color-yellow-btn-hover);
  border-color: var(--color-yellow-btn-border-hover);
  box-shadow: 0 5px 14px var(--color-accent-dark-16);
  color: var(--color-accent-dark);
}
#activityModal input[type="submit"].btn-form:active { transform: translateY(1px); box-shadow: none; }
#activityModal input[type="submit"].btn-form:focus-visible { outline: 3px solid var(--color-accent-dark); outline-offset: 3px; }

/* close (×) */
#activityModal .close { color: var(--color-accent-dark); }


/* ===== Reserve-call modal (#modal) – same look as the activity modal ===== */

/* card */
#modal .bg-none {
  background: var(--color-white-70);
  border: 1px solid var(--color-white-68);
  border-radius: 25px;
  box-shadow: 0 20px 56px var(--color-card-shadow), inset 0 1px var(--color-white-90);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--color-accent-dark);
}

/* heading (it was white from the global .title rule) */
#modal .title { color: var(--color-accent-dark); }

/* inputs */
#modal form input:not([type="hidden"]):not([type="submit"]),
#modal form textarea {
  background-color: var(--color-white-76);
  color: var(--color-accent-dark);
  border: 1px solid var(--color-teal-border);
  border-radius: 13px;
  box-shadow: inset 0 1px 2px var(--color-accent-dark-06);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
#modal form input::placeholder,
#modal form textarea::placeholder { color: var(--color-accent-dark-62); }
#modal form input:focus-visible,
#modal form textarea:focus-visible {
  border-color: var(--color-yellow-deep);
  box-shadow: 0 0 0 3px var(--color-yellow-focus), inset 0 1px 2px var(--color-accent-dark-06);
}

/* phone: dial code + arrow */
#modal .iti__selected-dial-code { color: var(--color-accent-dark) !important; }
#modal .iti__arrow { border-top-color: var(--color-accent-dark); }
#modal .iti__arrow--up { border-bottom-color: var(--color-accent-dark); }

/* submit button */
#modal input[type="submit"].btn-form {
  background: linear-gradient(105deg, var(--color-yellow-btn-from), var(--color-yellow-btn-to));
  color: var(--color-accent-dark);
  border: 1px solid var(--color-yellow-deep);
  border-radius: 32px;
  box-shadow: none;
  font-weight: 800;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
#modal input[type="submit"].btn-form:hover {
  background: var(--color-yellow-btn-hover);
  border-color: var(--color-yellow-btn-border-hover);
  box-shadow: 0 5px 14px var(--color-accent-dark-16);
  color: var(--color-accent-dark);
}
#modal input[type="submit"].btn-form:active { transform: translateY(1px); box-shadow: none; }
#modal input[type="submit"].btn-form:focus-visible { outline: 3px solid var(--color-accent-dark); outline-offset: 3px; }

/* close (×) */
#modal .close { color: var(--color-accent-dark); }