/* ============================================================
   1. GLOBAL RESETS & BASE (From your original)
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  overflow-x: hidden;
  width: 100%;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

img, video, canvas, svg, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================================
   2. MOBILE STYLES (0px to 768px)
   ============================================================ */
@media screen and (max-width: 768px) {
  
  /* --- YOUR WORKING HEADER BLOCK --- */
  .topHeader {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    align-items: center !important;
  }

  .logo {
    order: -1 !important;
    display: block !important;
    width: 100% !important;
    max-width: 425px !important;
    height: auto !important;
    margin: 0 auto 20px auto !important; 
  }

  .newsroom-nav ul {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 0 !important;
    list-style: none !important;
    gap: 4px !important; /* This is the "magic" number to reduce vertical space */
    margin: 5px 0 !important; /* Keeps the whole menu from touching top/bottom elements */
  }

  /* This ensures individual menu items don't have their own "secret" margins */
  .newsroom-nav ul li {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* --- TYPOGRAPHY & OVERRIDES --- */
  .playfair-display-pagehed {
    font-family: "Playfair Display", serif !important;
    font-size: clamp(20pt, 8vw, 28pt) !important; /* Uses clamp for better scaling */
    margin: 20px 10px !important;
    line-height: 1.2;
    text-align: center;
  }

  /* --- VIDEO SECTION --- */
  .video-item-container {
    margin-left: 0;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  /* Helper Classes */
  .hide-mobile { display: none !important; }

  /* Target the container holding your 3 HTML modules */
  .your-grid-container-class { 
    display: flex !important;
    flex-direction: column !important;
  }

  /* Target the specific column wrappers */
  .middle-column-class { order: 1; } /* Becomes first */
  .left-column-class   { order: 2; } /* Becomes second */
  .right-column-class  { order: 3; } /* Becomes third */

  /* Ensure they take full width when stacked */
  .middle-column-class, 
  .left-column-class, 
  .right-column-class {
    width: 100% !important;
    margin-bottom: 20px;
  }
  /* 1. Target the parent wrapper of the panes */
  /* We use [id*="Pane"]'s parent to find the container automatically */
  .pane.col-xs-12 { 
    width: 100% !important; 
  }

  /* Force the parent to be a Flex container so we can reorder children */
  #dnn_697E_Pane2, 
  #dnn_697E_Pane1, /* Assuming your left pane is Pane1 */
  #dnn_697E_Pane3  /* Assuming your right pane is Pane3 */
  {
      display: block !important;
  }

  /* The actual Reorder: Middle(2) -> Left(1) -> Right(3) */
  .row, .main-layout-container { /* Replace with your actual parent class if known */
    display: flex !important;
    flex-direction: column !important;
  }

  #dnn_697E_Pane2 { order: 1 !important; } /* Middle moves to Top */
  #dnn_697E_Pane1 { order: 2 !important; } /* Left moves to Middle */
  #dnn_697E_Pane3 { order: 3 !important; } /* Right stays at Bottom */

  /* 2. Fix the specific internal styling for the DigArticle Module */
  .DnnModule-6614::before, 
  .DnnModule-6614::after {
    display: none !important; /* Hide those vertical border lines on mobile */
  }

  .DnnModule-6614 .summarySec {
    margin: 0 !important; /* Remove the 50px left margin so text fits on phones */
    text-align: left !important;
  }

  /* Remove heavy desktop margins for the DigArticle module on mobile */
#dnn_ctr6618_View_ctr6614_ModuleContent .normal {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    padding: 0 10px; /* Optional: adds a tiny bit of "breathing room" so text doesn't hit the screen edge */
}
}

/* ============================================================
   3. DESKTOP/TABLET STYLES (769px and up)
   ============================================================ */
@media screen and (min-width: 769px) {
  .show-mobile-only { display: none !important; }
  
  /* This is where you will add your NEW Flexbox/Grid rules 
     for the major changes you made to the page. */
}
