/* === Alliance Solutions - Mobile + Polish v4 (mei 2026) === */

/* === BASIS — alle schermen === */
html, body { overflow-x: hidden; max-width: 100%; }
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe { max-width: 100%; height: auto; }
table { max-width: 100%; }

/* ============================================================ */
/*  RESPONSIVE GRID FIXES — voorkomt afgesneden kolommen        */
/* ============================================================ */

/* TABLET (<= 1024px): 2-koloms layouts klappen naar 1 kolom */
@media (max-width: 1024px) {
  .split,
  .contact-grid,
  .hoe-split {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
  .how-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .how-step { border-right: none !important; border-bottom: 1px solid var(--gray-200); }
  .how-step:nth-child(2n) { border-right: none !important; }
  .how-step:nth-last-child(-n+2) { border-bottom: none; }
  .fgrid { grid-template-columns: 1fr 1fr !important; gap: 2rem !important; }
}

/* MOBIEL (<= 640px): alles 1 kolom */
@media (max-width: 640px) {
  .how-grid { grid-template-columns: 1fr !important; }
  .how-step { border-right: none !important; border-bottom: 1px solid var(--gray-200); }
  .how-step:last-child { border-bottom: none; }
  .frow { grid-template-columns: 1fr !important; }
  .fgrid { grid-template-columns: 1fr !important; gap: 2rem !important; text-align: center; }
  .stat-grid { grid-template-columns: 1fr !important; }
  .stat-box { border-right: none !important; border-bottom: 1px solid rgba(255,255,255,.1); padding: 1.75rem 1rem !important; }
  .stat-box:last-child { border-bottom: none; }
  .tgrid { grid-template-columns: 1fr !important; }
  .prof-grid, .pricing-grid { grid-template-columns: 1fr !important; }
  .cta-box { padding: 2.5rem 1.5rem !important; }
}

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Selectie-kleur (rood ipv blauw) */
::selection { background: rgba(204,41,54,.18); color: #1a2a5e; }

/* Hamburger knop - verborgen op desktop */
.mobile-menu-btn {
  display: none; background: transparent; border: 0; cursor: pointer;
  padding: 8px; width: 44px; height: 44px; z-index: 1001; position: relative;
}
.mobile-menu-btn span {
  display: block; width: 26px; height: 3px; background: #1a2a5e;
  margin: 5px auto; border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================================ */
/*  POLISH — alle schermen (subtle improvements)                */
/* ============================================================ */

/* Smoothe fade-in voor cards/sections wanneer ze scrollen */
.fcard {
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.fcard:hover {
  box-shadow: 0 12px 32px rgba(26,42,94,.10);
  transform: translateY(-3px);
  border-color: rgba(204,41,54,.25);
}

/* Klikbare badge-hover (pulse) */
@keyframes badgePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
.fcard:hover > span[style*="position:absolute"] {
  animation: badgePulse 1.2s ease-in-out infinite;
}

/* Prijs-regel: subtiele pijltje-hover */
.fcard:hover > div[style*="border-top"] {
  color: #e8404d !important;
}

/* Logo crisp op retina */
.logo-img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Knoppen: extra polish */
button, .btn-red, .btn-wht, .btn-solid, .btn-ghost, .btn-outline {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  letter-spacing: .02em;
}

/* Form-inputs: scherper focus */
input:focus, textarea:focus, select:focus {
  outline: 2px solid rgba(204,41,54,.4);
  outline-offset: 1px;
  border-color: #cc2936 !important;
}

/* Links: zachte underline-animatie */
a:not(.logo-link):not(.btn-red):not(.btn-wht):not(.btn-solid):not(.btn-ghost):not(.btn-outline) {
  text-decoration: none;
  transition: color .15s;
}

/* ============================================================ */
/*  TABLET (<= 900px)                                            */
/* ============================================================ */
@media (max-width: 900px) {
  .feat-grid { grid-template-columns: 1fr 1fr !important; gap: 16px !important; }
  nav { padding: 0 1.5rem !important; }
}

/* ============================================================ */
/*  MOBIEL (<= 768px)                                            */
/* ============================================================ */
@media (max-width: 768px) {

  /* Toon hamburger */
  .mobile-menu-btn { display: block; }

  /* Nav: layout met logo links, hamburger rechts */
  nav {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px !important;
    flex-wrap: wrap;
    position: sticky; top: 0; z-index: 100;
    height: auto !important;
  }

  /* Verberg standaard nav-links, toon als dropdown bij open */
  nav .nav-links, nav .nav-cta {
    display: none !important;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    background: #fff;
    box-shadow: 0 8px 24px rgba(26,42,94,.12);
    padding: 8px 0;
    margin-top: 12px;
    border-radius: 12px;
  }
  nav.is-open .nav-links, nav.is-open .nav-cta { display: flex !important; }
  nav.is-open .nav-links a {
    display: block; padding: 14px 20px; width: 100%;
    text-align: left; border-bottom: 1px solid #f3f4f6;
    font-size: 16px; color: #1a2a5e;
  }
  nav.is-open .nav-links a:last-child { border-bottom: 0; }
  nav.is-open .nav-cta {
    padding: 12px;
    border-top: 1px solid #f3f4f6;
    margin-top: 0;
    gap: 8px !important;
  }
  nav.is-open .nav-cta button {
    width: 100% !important;
    margin: 4px 0;
  }

  /* Algemene container/secties */
  section, header, footer, main, .container, .wrap, .hero, .page-hero {
    padding-left: 16px !important;
    padding-right: 16px !important;
    max-width: 100% !important;
  }

  /* Hero responsief */
  .hero h1, .page-hero h1 {
    font-size: 30px !important;
    line-height: 1.18 !important;
    padding: 0 4px;
    margin-bottom: 1rem !important;
  }
  .hero-sub, .page-hero p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    padding: 0 8px;
  }
  .hero, .page-hero {
    padding-top: 2.5rem !important;
    padding-bottom: 2rem !important;
  }
  .hero-badge, .page-hero-label {
    font-size: 10px !important;
    padding: 4px 12px !important;
  }

  /* SECTION titels */
  .stitle {
    font-size: 22px !important;
    line-height: 1.25 !important;
    padding: 0 4px;
  }
  .slead { font-size: 15px !important; padding: 0 4px; }

  /* DIENST-KAARTEN: 1 kolom, ruime padding voor badge */
  .feat-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 0 !important;
  }
  .fcard {
    padding: 2.5rem 1.5rem 1.5rem !important;
    text-align: left;
    min-height: auto !important;
  }
  .fcard h3 {
    font-size: 17px !important;
    margin-bottom: 0.5rem !important;
    line-height: 1.3;
    padding-right: 90px; /* ruimte voor badge */
  }
  .fcard p {
    font-size: 14px !important;
    line-height: 1.55;
  }
  /* Badge: kleinere font op mobiel */
  .fcard > span[style*="position:absolute"] {
    font-size: 9px !important;
    padding: 5px 10px !important;
    top: 14px !important;
    right: 14px !important;
  }
  /* Prijs-regel mobiel */
  .fcard > div[style*="border-top"] {
    margin-top: 16px !important;
    padding-top: 12px !important;
    font-size: 13px !important;
  }

  /* HERO-STATS: stack onder elkaar */
  .hero-stats {
    flex-direction: column !important;
    gap: 18px !important;
    margin-top: 2rem;
  }
  .hero-stats > div { width: 100%; text-align: center; }
  .hstat-num { font-size: 28px !important; }

  /* BUTTONS: full-width, betere tap-target */
  .btn-red, .btn-wht, .btn-solid, .btn-ghost, .btn-outline {
    width: 100% !important;
    min-height: 48px;
    font-size: 15px !important;
    padding: 14px 18px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
  }
  .hero-btns {
    flex-direction: column !important;
    width: 100%;
    gap: 10px !important;
    padding: 0 12px;
    margin-top: 1.5rem;
  }

  /* FORMULIEREN */
  .form-row, .form-grid > div, .form-2col > div {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 12px;
  }
  .form-grid, .form-2col {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }
  label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px !important;
  }
  input, select, textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 14px !important;
    font-size: 16px !important; /* voorkomt auto-zoom iOS */
    border-radius: 8px !important;
  }

  /* TYPOGRAFIE algemeen */
  h1 { font-size: 28px !important; line-height: 1.22 !important; }
  h2 { font-size: 22px !important; line-height: 1.3 !important; }
  h3 { font-size: 17px !important; }
  p, li { font-size: 15px; line-height: 1.6; }

  /* PROCES-STAPPEN */
  .process-steps { max-width: 100% !important; padding: 0 4px; }

  /* PARTNERS/LOGO-STROOK */
  .logos-bar, .logos-row {
    flex-wrap: wrap !important;
    justify-content: center;
    gap: 10px !important;
    padding: 0 8px;
  }
  .logo-item { font-size: 12px !important; }

  /* FLOATING WIDGETS — geen overlap */
  .whatsapp-badge-widget { bottom: 14px !important; left: 14px !important; }
  .calendly-badge-widget, div[class*="calendly-badge"] {
    bottom: 14px !important; right: 14px !important;
  }

  /* FOOTER netjes gestapeld */
  footer { padding: 2.5rem 1rem !important; text-align: center; }
  footer .fcols, footer .footer-cols, footer > div > div { display: block !important; }
  footer .fcols > div, footer .footer-cols > div { margin-bottom: 18px; }
  footer .logo-img { margin: 0 auto 16px; }
  footer a { display: inline-block; padding: 6px 0; }

  /* MAILTO-link op aanmelden-pagina's */
  a[href^="mailto:"] {
    word-break: break-all;
    font-size: 15px !important;
  }

  /* Disable hover-effects op touch (voorkomt sticky-hover) */
  .fcard:hover {
    transform: none !important;
    box-shadow: 0 2px 8px rgba(26,42,94,.06) !important;
  }
}

/* ============================================================ */
/*  KLEIN MOBIEL (<= 480px iPhone SE)                            */
/* ============================================================ */
@media (max-width: 480px) {
  .hero h1, .page-hero h1 { font-size: 26px !important; line-height: 1.2 !important; }
  h1 { font-size: 26px !important; }
  h2 { font-size: 20px !important; }
  .fcard h3 { font-size: 16px !important; padding-right: 80px; }
  .stitle { font-size: 20px !important; }
  nav { padding: 8px 12px !important; }
  .hero, .page-hero { padding-top: 2rem !important; padding-bottom: 1.5rem !important; }
}

/* ============================================================ */
/*  PARTNERS-GRID (was al in v2)                                 */
/* ============================================================ */
.partners-section {
  background: #f9fafb; padding: 56px 24px; text-align: center;
  border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb;
}
.partners-section h2 {
  font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 700;
  color: #1a2a5e; margin: 0 0 8px; letter-spacing: .5px;
}
.partners-section .partners-sub { font-size: 14px; color: #6b7280; margin: 0 0 32px; }
.partners-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 32px;
  max-width: 1100px; margin: 0 auto; align-items: center; justify-items: center;
}
.partners-grid .partner-logo {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 90px; padding: 8px; background: #fff;
  border-radius: 12px; box-shadow: 0 1px 4px rgba(26,42,94,.06);
  transition: transform .25s, box-shadow .25s;
}
.partners-grid .partner-logo:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(26,42,94,.12);
}
.partners-grid .partner-logo img {
  max-width: 100%; max-height: 70px; width: auto; height: auto;
  object-fit: contain; filter: grayscale(20%); transition: filter .25s;
}
.partners-grid .partner-logo:hover img { filter: grayscale(0%); }

@media (max-width: 900px) { .partners-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) {
  .partners-section { padding: 40px 16px; }
  .partners-section h2 { font-size: 18px; }
  .partners-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .partners-grid .partner-logo { height: 70px; padding: 6px; }
  .partners-grid .partner-logo img { max-height: 55px; }
}

/* ============================================================ */
/*  WHATSAPP BADGE WIDGET                                        */
/* ============================================================ */
.whatsapp-badge-widget {
  position: fixed; bottom: 20px; left: 20px; z-index: 9998;
}
.whatsapp-badge-content {
  display: inline-flex; align-items: center; gap: 8px;
  background: #25D366; color: #fff; padding: 12px 20px; border-radius: 999px;
  font-family: 'Open Sans', system-ui, sans-serif; font-size: 14px; font-weight: 600;
  line-height: 1; text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.whatsapp-badge-content:hover {
  background: #1ebe5b; transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.whatsapp-badge-content svg { display: block; }

@media (max-width: 640px) {
  .whatsapp-badge-widget { bottom: 16px; left: 16px; }
  .whatsapp-badge-content { padding: 10px 14px; font-size: 13px; }
  .whatsapp-badge-content span { display: none; }
}
