/* Hide the checkbox toggle */
.nav-toggle {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; border: 0; padding: 0;
  clip: rect(0 0 0 0); overflow: hidden;
}

/* Base header styles */
.rumours-header {
  width: 100%;
  position: absolute;
  top: 0; left: 0;
  height: 70px;
  color: #fff;
  padding: 0;
  z-index: 999;
  box-sizing: border-box;
}
.header-container {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 20px 40px;
  border-bottom: solid rgba(255,255,255,0.49) 1px;
  border-left: solid rgba(255,255,255,0.49) 1px;
  border-right: solid rgba(255,255,255,0.49) 1px;
  background-color: rgba(0,0,0,0.206);
  border-radius: 0 0 50px 50px;
}
.logo { display: flex; align-items: center; }
.header-left .logo img { width: 100%; max-width: 180px; height: auto; }
.rumours-menu { list-style: none; margin: 0; padding: 0; display:inline-flex; gap: 20px; }
.rumours-menu li a { color: #fff; text-decoration: none; font-weight: bold; transition: color .2s; }
.rumours-menu li a:hover { color: #e91e63; }
.header-right { text-align: right; }
.events-btn {
  background: #ffffff; color: #000000; padding: .5em 1.5em; border-radius: 24px;
  text-decoration: none; font-weight: bold; transition: all .4s; border: solid #fff 1px;
}
.events-btn:hover { background: #FFFFFF38; color: #fff; }

/* Hamburger */
.hamburger-menu { background: none; border: 0; padding: 0; display: none; flex: 0 0 auto; align-items: center; justify-content: center; cursor: pointer; width: 40px; height: 40px; }
.hamburger-menu svg { display: block; width: 40px; height: 40px; }
.line { fill: none; stroke: #fff; stroke-width: 6; transition: stroke-dasharray 600ms cubic-bezier(0.4,0,0.2,1), stroke-dashoffset 600ms cubic-bezier(0.4,0,0.2,1); }
.line1 { stroke-dasharray: 20 207; stroke-width: 6; }
.line2 { stroke-dasharray: 60 60; stroke-width: 6; }
.line3 { stroke-dasharray: 40 207; stroke-width: 6; }

/* Animate hamburger when checked */
.nav-toggle:checked + header .header-container .header-left .hamburger-menu .line1 { stroke-dasharray: 90 207; stroke-dashoffset: -134; }
.nav-toggle:checked + header .header-container .header-left .hamburger-menu .line2 { stroke-dasharray: 1 60; stroke-dashoffset: -30; }
.nav-toggle:checked + header .header-container .header-left .hamburger-menu .line3 { stroke-dasharray: 90 207; stroke-dashoffset: -134; }

/* ===== Overlay (scrolls), background locked ===== */
.header-modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  width: 100vw;           /* never wider than viewport */
  max-width: 100vw;
  background: rgba(0,0,0,0.61);
  align-items: stretch; 
  justify-content: flex-end;
  z-index: 1;
  opacity: 0; 
  pointer-events: none;
  transition: background .6s ease, opacity .6s ease;
  backdrop-filter: blur(11.3px); 
  -webkit-backdrop-filter: blur(11.3px);

  /* Overlay is the ONLY thing that scrolls */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Show overlay when the checkbox is checked */
.nav-toggle:checked ~ .rumours-content .header-modal-overlay {
  opacity: 1; 
  pointer-events: auto;
}

/* Clicking the backdrop closes (label in markup) */
.overlay-backdrop {
  position: absolute; inset: 0;
  display: block;
  content: "";
}

/* ===== Modal box (no own scrolling, stays within 100vw) ===== */
.header-modal-box {
  position: relative;
  left: 0;
  width: 100%;
  max-width: 100vw;        /* enforce viewport width */
  box-sizing: border-box;  /* include padding in width */
  background-color: rgba(0,0,0,0.224);
  border-radius: 0 50px 50px 0;
  box-shadow: 0 4px 30px rgba(0,0,0,0.1);
  padding: 60px 2rem 2rem;
  display: flex; 
  flex-direction: column; 
  align-items: flex-start; 
  justify-content: flex-start;

  /* Entrance animation without affecting layout */
  transform: translateY(70px);
  opacity: 0;
  transition: transform 1.1s ease .2s, opacity 1.1s ease .2s;
}

/* Animate modal in */
.nav-toggle:checked ~ .rumours-content .header-modal-overlay .header-modal-box {
  transform: translateY(0);
  opacity: 1;
}

/* Modal menu layout */
.header-modal-box .header-center { margin-top: 50px; width: 100%; display: flex; justify-content: end; }
.header-modal-box .rumours-menu {
  display: flex; flex-direction: column; gap: 15px; align-items: center; width: 100%;
  padding: 0; margin: 0;
}
.header-modal-box .rumours-menu li { width: 100%; text-align: start; }
.header-modal-box .rumours-menu li a {
  position: relative; font-size: 20px; text-align: start;
  padding: .5em 0; color: #fff; text-decoration: none; font-weight: bold; transition: color .2s; border-radius: 8px; display: inline-block;
}
.header-modal-box .rumours-menu li a:hover { color: #e91e63; }
.header-modal-box .rumours-menu li a::after {
  content: ""; position: absolute; left: 0; bottom: .2em; width: 100%; height: 2px; background: #e91e63;
  transform: scaleX(0); transition: transform .3s cubic-bezier(0.4,0,0.2,1); border-radius: 2px;
}
.header-modal-box .rumours-menu li a:hover::after { transform: scaleX(1); }

.modal-logo img { max-width: 200px; }
.modal-header-right {

  border-radius: 20px;  box-sizing: border-box; overflow: hidden; 
    background-color: rgba(255,255,255,0.117); color: #fff;
  border: solid #fff 1px;
    width: 100%;
  max-width: 200px;
  text-align: center;
  padding: 10px 20px;
  

  position: static;         /* part of flow */
  margin-top:40px;         /* spacing under nav */
  transition:all .4s;

}
.modal-header-right .modal-events-btn {
  width: 100%; text-align: center; display: block; text-decoration: none; color: #fff;
}

.modal-header-right:hover{
    background: #ffffff;
}
.modal-header-right:hover .modal-events-btn{
color: #000000;
}

/* ===== Lock body scroll when menu open (NO JS) ===== */
body:has(#nav-toggle:checked) {
  overflow: hidden;     /* no background scroll */
  touch-action: none;
}
@supports (-webkit-touch-callout: none) {
  body:has(#nav-toggle:checked) {
    position: fixed;    /* iOS fix */
    width: 100%;
  }
}

/* Responsive */
@media screen and (max-width: 768px) {
  .hamburger-menu { display: inline-block; }
  .header-container { display: flex; align-items: center; justify-content: space-between; padding: 10px 40px; gap: 30px; }
  .header-left { width: 300px; display: flex; align-items: center; }
  .header-center { display: none; }
}
@media screen and (max-width: 700px) {
  .header-modal-box { width: 100vw; max-width: 100vw; border-radius: 0; }
}
@media screen and (max-width: 500px) {
  .events-btn { padding: 2vw 4vw; font-size: .9em; }
}
@media screen and (max-width: 368px) {
  .header-container { padding: 10px 20px; }
}
@media screen and (max-width: 280px) {
  .header-container { gap: 10px; }
}


