/*
Theme Name: Parent Child
Template: parent
*/

/* Fix mixed-content: update front page image to HTTPS */
#front-page {
  background-image: url('https://www.manonparent.com/wp-content/themes/parent/images/front_1200.jpg');
}

/* ── TABLET / NARROW DESKTOP ───────────────────────────────── */
@media screen and (min-width: 641px) and (max-width: 1100px) {

  /* Shrink content width and adjust left margin
     so it doesn't collide with the side menu */
  #content,
  .entry,
  .post-title,
  #page-title {
    width: 55%;
    min-width: 0;
    margin-left: 8%;
    box-sizing: border-box;
  }

  #content img {
    min-width: 0;
    width: 100%;
  }

  /* Pull side menu in a bit */
  .side-menu {
    left: 68%;
    width: 200px;
  }

  /* Header and footer */
  #header {
    width: 100%;
    box-sizing: border-box;
  }

  #footer {
    width: 100%;
    box-sizing: border-box;
  }

}

/* ── MOBILE ────────────────────────────────────────────────── */
@media screen and (max-width: 640px) {

  body {
    overflow-x: hidden;
  }

  /* 1. Viewport-filling content blocks, no min-width */
  #content,
  .entry,
  .post-title,
  #page-title {
    width: auto;
    min-width: 0;
    max-width: 100% !important;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    padding: 15px;
    overflow: hidden;
  }

  /* 2. All images: fluid, no min-width, constrained to container */
  img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
  }

  /* 3. Header full width */
  #header {
    width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
  }

  /* 4. Footer: hide on mobile */
  #footer,
  div#footer {
    display: none;
  }

  /* 5. Front page hero: shorter, cover crop */
  #front-page {
    height: 320px;
    background-size: cover;
    background-position: center top;
  }

  /* 6. Hide the absolute side menu — replaced by hamburger.
        mobile-menu.js relocates .side-menu in the DOM to sit just
        after .top-menu, so when opened it pushes content down and
        appears directly below the SOUND/MOVEMENT/SELF tabs rather
        than overlaying them. */
  .side-menu {
    display: none;
    position: static;
    width: 100%;
    left: auto;
    top: auto;
    background-color: #111;
    padding: 10px 0 20px;
    box-sizing: border-box;
  }

  .side-menu.open {
    display: block;
  }

  .side-menu ul {
    padding-left: 20px;
  }

  .side-menu ul li {
    padding: 5px 0;
  }

  /* 7. Top menu: center and stack */
  .top-menu {
    margin-left: 0;
    text-align: center;
  }

  .top-menu ul li {
    display: block;
    padding: 8px 0;
    font-size: 1.1em;
  }

  /* 8. Hamburger button — injected via JS */
  #hamburger {
    display: block;
    position: fixed;
    top: 12px;
    right: 15px;
    z-index: 200;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
  }

  #hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    transition: 0.2s;
  }

  /* 9. Media player full width */
  .mejs-container {
    width: 100% !important;
  }

  /* 10. Canvas — neutralise adjust_canvas_height() inline style */
  #canvas {
    height: auto !important;
    min-height: 100vh !important;
    display: flex;
    flex-direction: column;
	justify-content: flex-start;
 /*   justify-content: space-between; */
  }

  /* 11. Canvas div width */
  div.canvas,
  #canvas {
    max-width: 100% !important;
    overflow-x: hidden;
  }

  /* 12. Paragraph and heading margins */
  p {
    margin: 0 0 10px 0;
  }

  h2 {
    margin: 0 0 8px 0;
  }

}

/* 13. Responsive video embeds */
iframe[src*="vimeo.com"],
iframe[src*="youtube.com"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* 14. No-Title */
#page-title:empty {
    height: 0px; /* desktop default */
}

@media screen and (max-width: 640px) {
    #page-title:empty {
        height: 0px; /* mobile */
    }
}

@media screen and (min-width: 641px) and (max-width: 1100px) {
    #page-title:empty {
        height: 0px; /* tablet */
    }
}