/*
Theme Name: Astra Child
Template: astra
Version: 1.0
*/

/* =================================================================== */
/* 0. CONTAINER VOOR BEHEER (smal in het midden)                       */
/* =================================================================== */
.integratenl-beheer-wrap { 
  max-width: 1100px; 
  margin: 0 auto; 
  padding: 0 16px; 
}

/* =================================================================== */
/* 1. KLEUREN UIT QUILL/GUTENBERG                                      */
/* =================================================================== */
/* Belangrijk: we OVERRULEN GEEN inline color/background meer.
   Zo blijven Quill/Gutenberg kleuren gewoon zichtbaar.
   (De oude regels met 'inherit !important' zijn bewust verwijderd) */

/* =================================================================== */
/* 2. UITLIJNING (Quill + Gutenberg + klassiek), ALTIJD ACTIEF         */
/* =================================================================== */
/* Center */
.smart-content .ql-align-center,
.formulier-inzending .ql-align-center,
.handleiding-content .ql-align-center,
.smart-content .has-text-align-center,
.formulier-inzending .has-text-align-center,
.handleiding-content .has-text-align-center,
.smart-content .aligncenter,
.formulier-inzending .aligncenter,
.handleiding-content .aligncenter,
.smart-content .text-center,
.formulier-inzending .text-center,
.handleiding-content .text-center { text-align: center !important; }

/* Right */
.smart-content .ql-align-right,
.formulier-inzending .ql-align-right,
.handleiding-content .ql-align-right,
.smart-content .has-text-align-right,
.formulier-inzending .has-text-align-right,
.handleiding-content .has-text-align-right,
.smart-content .alignright,
.formulier-inzending .alignright,
.handleiding-content .alignright,
.smart-content .text-right,
.formulier-inzending .text-right,
.handleiding-content .text-right { text-align: right !important; }

/* Left */
.smart-content .ql-align-left,
.formulier-inzending .ql-align-left,
.handleiding-content .ql-align-left,
.smart-content .has-text-align-left,
.formulier-inzending .has-text-align-left,
.handleiding-content .has-text-align-left,
.smart-content .alignleft,
.formulier-inzending .alignleft,
.handleiding-content .alignleft,
.smart-content .text-left,
.formulier-inzending .text-left,
.handleiding-content .text-left { text-align: left !important; }

/* Justify */
.smart-content .ql-align-justify,
.formulier-inzending .ql-align-justify,
.handleiding-content .ql-align-justify,
.smart-content .has-text-align-justify,
.formulier-inzending .has-text-align-justify,
.handleiding-content .has-text-align-justify,
.smart-content .text-justify,
.formulier-inzending .text-justify,
.handleiding-content .text-justify { text-align: justify !important; }

/* Afbeeldingen/figuren netjes centreren bij .aligncenter */
.smart-content figure.aligncenter,
.formulier-inzending figure.aligncenter,
.handleiding-content figure.aligncenter,
.smart-content img.aligncenter,
.formulier-inzending img.aligncenter,
.handleiding-content img.aligncenter { 
  display: block; 
  margin-left: auto; 
  margin-right: auto; 
}

/* =================================================================== */
/* 3. HANDLEIDING EDITOR (.handleiding-editor)                         */
/* =================================================================== */
body.handleiding-editor,
.handleiding-editor {
  font-family: sans-serif;
  background-color: #f4f4f4;
  color: #333;
}

.handleiding-editor .container {
  max-width: 900px;
  margin: 20px auto;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.handleiding-editor .step-section {
  border: 1px solid #ddd;
  border-radius: 8px;
  margin: 20px 0;
  padding: 20px;
  background: #fafafa;
}

.handleiding-editor .step-header {
  color: #0056b3;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  border-bottom: 2px solid #0056b3;
  padding-bottom: 8px;
}

.handleiding-editor .form-group { margin: 15px 0; }

.handleiding-editor .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #555;
}

.handleiding-editor .form-group input[type="text"],
.handleiding-editor .form-group input[type="url"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.handleiding-editor .upload-area {
  border: 2px dashed #007cba;
  border-radius: 6px;
  padding: 20px;
  text-align: center;
  background: #f0f8ff;
  cursor: pointer;
  margin: 10px 0;
  font-weight: bold;
  transition: all 0.3s ease;
}
.handleiding-editor .upload-area:hover,
.handleiding-editor .upload-area.dragover {
  border-color: #005a8b;
  background: #e6f3ff;
}

.handleiding-editor .images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 15px 0;
}

.handleiding-editor .image-item {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px;
  background: white;
  text-align: center;
  position: relative;
}

.handleiding-editor .image-item img {
  max-width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
}

/* Knoppen */
.handleiding-editor .btn {
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  margin: 5px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}
.handleiding-editor .btn-primary { background: #007cba; color: white; }
.handleiding-editor .btn-primary:hover { background: #005a8b; }
.handleiding-editor .btn-success { background: #28a745; color: white; }
.handleiding-editor .btn-success:hover { background: #218838; }

.handleiding-editor .remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #dc3545;
  color: white;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  z-index: 10;
}

/* Responsive editor */
@media (max-width: 768px) {
  .handleiding-editor .container { margin: 10px; padding: 15px; }
  .handleiding-editor .images-grid { grid-template-columns: 1fr; }
}

/* =================================================================== */
/* 4. CONTACT FORM 7 (.wpcf7-form)                                     */
/* =================================================================== */
.wpcf7-form { font-family: "Segoe UI", sans-serif; }

/* Teller alleen op formulierpagina's */
.page-template-formulier .wpcf7-form,
body.page-formulier .wpcf7-form { counter-reset: stapnummer; }

.page-template-formulier .wpcf7-form h2,
body.page-formulier .wpcf7-form h2 {
  counter-increment: stapnummer;
  position: relative;
  padding: 1.5rem 1rem 1.5rem 4.5rem;
  margin: 3rem 0 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e40af;
}
.page-template-formulier .wpcf7-form h2::before,
body.page-formulier .wpcf7-form h2::before {
  content: "Stap " counter(stapnummer);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: #2563eb;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 0 0 3px #e0e7ff;
}

/* Achtergrondkleuren per stap (alleen formulierpagina) */
.page-template-formulier .wpcf7-form h2:nth-of-type(1),
body.page-formulier .wpcf7-form h2:nth-of-type(1) { background-color: #e0f2fe; }
.page-template-formulier .wpcf7-form h2:nth-of-type(2),
body.page-formulier .wpcf7-form h2:nth-of-type(2) { background-color: #fef9c3; }
.page-template-formulier .wpcf7-form h2:nth-of-type(3),
body.page-formulier .wpcf7-form h2:nth-of-type(3) { background-color: #dcfce7; }
.page-template-formulier .wpcf7-form h2:nth-of-type(4),
body.page-formulier .wpcf7-form h2:nth-of-type(4) { background-color: #fee2e2; }
.page-template-formulier .wpcf7-form h2:nth-of-type(5),
body.page-formulier .wpcf7-form h2:nth-of-type(5) { background-color: #f3e8ff; }
.page-template-formulier .wpcf7-form h2:nth-of-type(6),
body.page-formulier .wpcf7-form h2:nth-of-type(6) { background-color: #ccfbf1; }

/* H2-styling op andere pagina’s (zonder cirkel) */
.wpcf7-form h2 {
  padding: 1.5rem 1rem;
  margin: 3rem 0 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.04);
  font-size: 1.4rem;
  font-weight: 600;
  color: #1e40af;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="url"],
.wpcf7-form input[type="file"],
.wpcf7-form textarea,
.wpcf7-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  box-sizing: border-box;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form textarea:focus,
.wpcf7-form select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}
.wpcf7-form .wpcf7-form-control-wrap { margin-bottom: 1.5rem; }

.wpcf7-form input[type="submit"] {
  background-color: #2563eb;
  color: white;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 2rem;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}
.wpcf7-form input[type="submit"]:hover { background-color: #1e3a8a; }

@media (max-width: 768px) {
  .page-template-formulier .wpcf7-form h2,
  body.page-formulier .wpcf7-form h2 {
    padding-left: 4rem;
    font-size: 1.15rem;
  }
  .page-template-formulier .wpcf7-form h2::before,
  body.page-formulier .wpcf7-form h2::before {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }
  .wpcf7-form input[type="submit"] { width: 100%; }
}

/* =================================================================== */
/* 5. VIDEO STYLING                                                    */
/* =================================================================== */
.video-embed {
  position: relative !important;
  padding-bottom: 56.25% !important;
  height: 0 !important;
  width: 100% !important;
  max-width: 600px !important;
  margin: 15px auto !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1) !important;
}
.video-embed iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}
.video-link-item {
  display: flex !important;
  justify-content: center !important;
  margin: 20px 0 !important;
}
.video-link-item > div {
  width: 80% !important;
  max-width: 600px !important;
}
@media (max-width: 768px) {
  .video-embed {
    padding-bottom: 56.25% !important;
    max-width: 95% !important;
    margin: 15px auto !important;
  }
  .video-link-item > div {
    width: 95% !important;
    max-width: none !important;
  }
}
@media (min-width: 769px) {
  .video-embed { max-width: 600px !important; }
}
.handleiding-editor .video-embed { max-width: 500px !important; }

/* Video/file renders (geen embeds) */
.handleiding-bestand video {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
  background: black;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}
.handleiding-bestand iframe {
  max-width: 100%;
  max-height: 400px;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

/* =================================================================== */
/* 6. IMG RESPONSIVE IN FORMULIER-INZENDING                            */
/* =================================================================== */
.formulier-inzending .machine-foto img,
.formulier-inzending .start-foto-item img,
.formulier-inzending .paneel-foto-item img,
.formulier-inzending .storing-foto-item img,
.formulier-inzending .onderhoud-foto-item img,
.formulier-inzending .handleiding-foto-item img {
  width: 60% !important;  /* Desktop */
  margin: 0 auto !important;
  display: block !important;
}
@media (max-width: 768px) {
  .formulier-inzending .machine-foto img,
  .formulier-inzending .start-foto-item img,
  .formulier-inzending .paneel-foto-item img,
  .formulier-inzending .storing-foto-item img,
  .formulier-inzending .onderhoud-foto-item img,
  .formulier-inzending .handleiding-foto-item img {
    width: 90% !important; /* Mobile */
  }
}
