:root {
  --navy: #0b3a57;
  --light-green: #eaf5ed;
  --text-dark: #222;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: #f3f6f9;
  color: #111;
}

/* === Banner section === */
.banner {
  width: 100%;
  height: 120px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: url('../images/banner.png');
}

.banner-title {
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  text-shadow: 0 2px 6px rgba(0,0,0,0.45);
  text-align: center;
  padding: 0 10px;
}

/* ========================= */
/*      NAVBAR (DESKTOP)     */
/* ========================= */

.navbar {
background: #e8f0f7;
display: flex;
align-items: center;
justify-content: space-between;
padding: 18px 40px;
box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.nav-left {
display: flex;
align-items: center;
gap: 12px;
}

.nav-left img {
height: 40px;
}

.nav-right {
list-style: none;
display: flex;
gap: 5px;
}

.nav-right li {
display: inline-block;
}

.nav-right li::after {
content: "|";
margin-left: 4px;
color: var(--text-dark);
}

.nav-right li:last-child::after {
content: "";
}

.nav-right a {
text-decoration: none;
color: var(--text-dark);
margin: 0 8px;
padding: 4px 8px;
font-size: 19px;
font-weight: 500;
border-radius: 6px;
transition: background 0.25s ease, color 0.25s ease;
}

.nav-right a:hover {
background: #b3cff0;
color: #0b3a57;
}

#menu-toggle {
display: none;
}

.hamburger {
display: none;
font-size: 32px;
cursor: pointer;
}

/* ========================= */
/*      MOBILE VIEW          */
/* ========================= */
@media (max-width: 760px) {

  .banner {
    /* Use the background-image property with the linear-gradient function */
    background-image: linear-gradient(to right, #007bff, #002E5D);
    /* Fallback color for very old browsers that don't support gradients */
    background-color: #007bff; 
    
    /* Optional styling for the banner appearance */
    padding: 0px; /* Adjust padding as needed */
    color: white; /* Text color for visibility */
    text-align: center;
    font-family: sans-serif;
    font-size: 16px;
    height: 100px; /* Adjust height as needed */
    /* We remove the flex properties here because the pseudo-element can be centered differently */
    position: relative; /* Needed to absolutely position the text */
    /*display: flex;
    align-items: center;
    justify-content: center;*/
  }

  /* Inject the text content using a pseudo-element */
.banner::before {
  content: "District Vulnerability Index for Pakistan (DVIP)"; /* The actual text */
  position: absolute;
  /*top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); *//* Centers the text perfectly */
  top: 40%;
  left: 35%;
  transform: translate(-25%, -25%); /* Centers the text perfectly */
  /* Ensures the text wraps if the banner is too narrow */
  max-width: 90%; 
  box-sizing: border-box; 
}

  .hamburger {
    display: block;
    
  }

  .navbar {
    padding: 16px 20px;
  }

  /*.nav-right {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #e8f0f7;
    padding: 12px 0;
    margin-top: 14px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.13);
    border-radius: 10px;    
  }*/

  .nav-right {
    display: none;
    position: absolute;
    top: 40px;
    width: 50%;
    background: #e8f0f7;
    padding: 10px 10px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    flex-direction: column;
    z-index: 5000;
  }

  .nav-right li::after { content: ""; }

  .nav-right a {
    padding: 0px 0;
    margin: 0;
    display: block;
    font-size: 18px;
  }

  .nav-left {
    display: flex;
    align-items: right;
    gap: 5px;
    }
    
    .nav-left img {
    height: 20px;
    }

  #menu-toggle:checked ~ .nav-right {
    display: flex;
    left: 40%;
  }
}

/* Mobile close‑menu fix */
/*.hamburger { position: relative; z-index: 9999; }
.nav-right { position: relative; z-index: 1; }*/
#menu-toggle { position: absolute; z-index: -1; }
/* Mobile close‑menu fix */

  
  .page-container {
      display: flex;
      flex-direction: column;
      min-height: 100vh; /* Ensures the container takes full viewport height */
  }
  .mainbody {
      flex-grow: 1; /* Pushes the footer to the bottom */
  }
  

/*//////// Start index.php page specific styles ///////////*/
  
/* PUSH DOWN 100px MORE */
.dvip-home-wrapper {
    max-width: 1300px;
    margin: 40px auto 40px;   /* was 80px → now 180px */
    padding: 0 16px;
  }
  
  /* Smaller boxes, less width, proportionate scaling */
  .dvip-kpi-grid {
      display: grid;
      grid-template-columns: repeat(3, 400px); /* smaller boxes */
      justify-content: center;                 /* centers all boxes */
      gap: 26px;
  }
  
  /* KPI CARD */
  .dvip-kpi-card {
    padding: 24px 20px;
    border-radius: 20px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100px;
  
    /* Animation */
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
  }
  
  .dvip-kpi-card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 14px 28px rgba(0,0,0,0.22);
  }
  
  /* LABEL + NUMBER SIZE */
  .dvip-kpi-label {
    font-size: 20px;          /* was 18px */
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.95;
  }
  
  /* BIGGER numbers */
  .dvip-kpi-value {
    font-size: 52px;          /* was 46px */
    font-weight: 900;
    line-height: 1;
  }
  
  /* High-risk population slightly smaller */
  .dvip-kpi-value.small {
    font-size: 38px;          /* was 32px */
  }
  
  /* Attractive gradient colors */
  .card-1 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
  .card-2 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
  .card-3 { background: linear-gradient(135deg, #89f7fe, #66a6ff); }
  .card-4 { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
  .card-6 { background: linear-gradient(135deg, #f6d365, #fda085); }
  .card-5 { background: linear-gradient(135deg, #FF78A7, #EF437F); }
  
  /* Responsive */
  @media (max-width: 900px) {
    .dvip-kpi-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 600px) {
    .dvip-kpi-grid {
      grid-template-columns: 1fr;
    }
    .dvip-kpi-card {
      min-height: 120px;
    }
    .dvip-kpi-value {
      font-size: 40px;
    }
  }

/*//////// End index.php page specific styles ///////////*/

/*//////// Start objectives.php page specific styles ///////////*/

.obj-wrapper {
    max-width: 1100px;
    margin: 40px auto 80px;   /* space below key messages */
    padding: 0 16px;
  }

  /* no card look now – only layout */
  .obj-card {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr);
    gap: 40px;
    align-items: center;
  }

  .obj-title {
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 18px;
    color: #132437;
  }

  .obj-subtitle {
    font-size: 16px;
    color: #5b6875;
    margin-bottom: 24px;
    max-width: 640px;
  }

  .obj-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .obj-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
    font-size: 17px;
    line-height: 1.7;
    color: #111827;
  }

  .obj-check {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 2px solid #11b87c;
    margin-right: 12px;
    margin-top: 4px;
    position: relative;
    flex-shrink: 0;
  }

  .obj-check::after {
    content: "";
    position: absolute;
    inset: 2px;
    background: #11b87c14;
    border-radius: 2px;
  }

  /* Target graphic on the right */
  .obj-target-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .obj-target {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    border: 12px solid #d6f0ff;
    position: relative;
    box-sizing: border-box;
  }

  .obj-target::before,
  .obj-target::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 8px solid #e3f4ff;
    width: 165px;
    height: 165px;
  }

  .obj-target::after {
    border-width: 6px;
    width: 90px;
    height: 90px;
  }

  .obj-target-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f9fdff;
    border: 6px solid #cfe8ff;
  }

  .obj-target-line {
    position: absolute;
    background: #d6f0ff;
  }

  .obj-target-line.h {
    height: 10px;
    width: 260px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .obj-target-line.v {
    width: 10px;
    height: 260px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  @media (max-width: 900px) {
    .obj-card {
      grid-template-columns: 1fr;
      gap: 28px;
    }
    .obj-target {
      width: 190px;
      height: 190px;
    }
  }

/*//////// End objectives.php page specific styles ///////////*/

/*//////// Start methodology.php page specific styles ///////////*/

.meth-wrapper {
    max-width: 1100px;
    margin: 40px auto 100px;
    padding: 0 16px;
  }

  .meth-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(240px, 2fr);
    gap: 40px;
    align-items: center;
  }

  .meth-title {
    font-size: 32px;
    font-weight: 800;
    color: #123553;
    margin-bottom: 10px;
  }

  .meth-subtitle {
    font-size: 15px;
    color: #5b6875;
    margin-bottom: 28px;
    max-width: 640px;
  }

  .meth-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #0da96e;
    margin: 26px 0 10px;
  }

  .meth-list {
    margin: 0;
    padding-left: 20px;
    font-size: 17px;
    line-height: 1.7;
    color: #111827;
  }

  .meth-list li {
    margin-bottom: 6px;
  }

  /* Right-side icon */
  .meth-icon-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .meth-icon {
    position: relative;
    width: 210px;
    height: 210px;
    border-radius: 24px;
    background: linear-gradient(145deg, #e3f3ff, #f4fbff);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
    overflow: hidden;
  }

  .meth-icon-grid-line {
    position: absolute;
    background: #d3e5f7;
    opacity: 0.6;
  }
  .meth-icon-grid-line.h { height: 1px; left: 18px; right: 18px; }
  .meth-icon-grid-line.v { width: 1px; top: 18px; bottom: 18px; }

  .meth-icon-grid-line.h:nth-child(1) { top: 60px; }
  .meth-icon-grid-line.h:nth-child(2) { top: 110px; }
  .meth-icon-grid-line.h:nth-child(3) { top: 160px; }
  .meth-icon-grid-line.v:nth-child(4) { left: 60px; }
  .meth-icon-grid-line.v:nth-child(5) { left: 120px; }
  .meth-icon-grid-line.v:nth-child(6) { left: 180px; }

  .meth-bar {
    position: absolute;
    bottom: 26px;
    width: 18px;
    border-radius: 10px 10px 2px 2px;
    background: linear-gradient(160deg, #46c3a4, #0da96e);
  }

  .meth-bar.b1 { left: 38px; height: 50px; }
  .meth-bar.b2 { left: 78px; height: 80px; }
  .meth-bar.b3 { left: 118px; height: 110px; }
  .meth-bar.b4 { left: 158px; height: 140px; }

  .meth-mag {
    position: absolute;
    right: 18px;
    top: 24px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 6px solid rgba(13, 169, 110, 0.18);
  }

  .meth-mag-inner {
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffffff, #def4ff);
  }

  .meth-mag-handle {
    position: absolute;
    width: 10px;
    height: 38px;
    background: #0da96e;
    border-radius: 20px;
    bottom: -26px;
    right: 8px;
    transform: rotate(35deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
  }

  /* Second section spacing */
  .meth-block {
    margin-top: 70px;
  }

  .formula {
    font-family: "Georgia", serif;
    font-size: 18px;
    font-style: italic;
    padding: 6px 0;
  }

  @media (max-width: 900px) {
    .meth-grid {
      grid-template-columns: 1fr;
      gap: 28px;
    }
  }

/*//////// End methodology.php page specific styles ///////////*/

/*//////// Start domains.php page specific styles ///////////*/

.domains-wrapper {
    max-width: 1150px;
    margin: 40px auto 90px;
    padding: 0 16px;
    text-align: center;
  }

  .domains-title {
    font-size: 30px;
    font-weight: 800;
    color: #123553;
    margin-bottom: 26px;
  }

  .domains-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 38px 34px;
    justify-items: center;
  }

  .domain-group {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .domain-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 34px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    background: #ffffff;
  }

  .icon-house      { color: #00bcd4; border: 3px solid #00c5de; }
  .icon-road       { color: #00a0c6; border: 3px solid #13b1d7; }
  .icon-briefcase  { color: #ffb63a; border: 3px solid #ffc453; }
  .icon-health     { color: #ff4b7b; border: 3px solid #ff7ea3; }
  .icon-education  { color: #f8b500; border: 3px solid #ffd96a; }
  .icon-people     { color: #4caf50; border: 3px solid #7ed57b; }

  .domain-card {
    width: 100%;
    max-width: 330px;
    min-height: 150px;
    padding: 18px 18px 16px;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(0,0,0,0.16);
    text-align: center;
    font-size: 14.5px;
    line-height: 1.6;
  }

  .domain-card h3 {
    margin: 0 0 8px;
    font-size: 19px;
    font-weight: 700;
  }

/* Domain card backgrounds + top color strip */
.domain-housing {
background: #e3f7fb;
border-top: 5px solid #0F7C8E; /* Housing */
}
.domain-comm {
background: #e4f1ff;
border-top: 5px solid #0A73B8; /* Communication */
}
.domain-livelihoods {
background: #ffeccf;
border-top: 5px solid #E67E22; /* Livelihood */
}
.domain-health {
background: #ffe4ee;
border-top: 5px solid #E63950; /* Health */
}
.domain-education {
background: #fff5d6;
border-top: 5px solid #6A4CBC; /* Education */
}
.domain-demography {
background: #e8f9ee;
border-top: 5px solid #4E8A57; /* Demography */
}

/* Domain title colors */
.domain-housing h3     { color: #007da3; }
.domain-comm h3        { color: #0076c0; }
.domain-livelihoods h3 { color: #f0781b; }
.domain-health h3      { color: #e32663; }
.domain-education h3   { color: #d48000; }
.domain-demography h3  { color: #119b4b; }

  @media (max-width: 950px) {
    .domains-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  @media (max-width: 640px) {
    .domains-grid {
      grid-template-columns: 1fr;
    }
  }

/*//////// End domains.php page specific styles ///////////*/

/*//////// Start indicators.php page specific styles ///////////*/

.indicators-wrapper {
    max-width: 1120px;
    margin: 30px auto 50px;
    padding: 0 16px;
  }

  .indicators-intro {
    margin-bottom: 24px;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
  }

  .indicators-intro h1 {
    margin: 0 0 10px;
    font-size: 26px;
    color: #0b3a57;
  }

  .indicators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 22px;
  }

  .indicators-card {
    --accent-color: #0b3a57;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    border-top: 4px solid var(--accent-color);
    padding: 18px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .indicators-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
  }

  .icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(11, 58, 87, 0.08);
  }

  .indicators-title {
    font-size: 18px;
    font-weight: 650;
    color: #0b3a57;
  }

  .indicators-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    margin-top: 4px;
    margin-bottom: 4px;
  }

  .indicators-card ul {
    margin: 4px 0 8px 18px;
    padding: 0;
  }

  .indicators-card li {
    margin-bottom: 3px;
    font-size: 14px;
    line-height: 1.5;
  }

  .source-list {
    margin-top: 2px;
  }

  .source-list li {
    font-size: 13px;
    color: #444;
  }

  /* indicators-specific accent colours */
  .indicators-housing       { --accent-color: #1e88e5; }
  .indicators-comm-transport{ --accent-color: #00acc1; }
  .indicators-livelihoods   { --accent-color: #43a047; }
  .indicators-health        { --accent-color: #e53935; }
  .indicators-education     { --accent-color: #8e24aa; }
  .indicators-demographics  { --accent-color: #fb8c00; }

  .indicators-housing .icon-badge {
    background: rgba(30, 136, 229, 0.12);
  }
  .indicators-comm-transport .icon-badge {
    background: rgba(0, 172, 193, 0.12);
  }
  .indicators-livelihoods .icon-badge {
    background: rgba(67, 160, 71, 0.12);
  }
  .indicators-health .icon-badge {
    background: rgba(229, 57, 53, 0.12);
  }
  .indicators-education .icon-badge {
    background: rgba(142, 36, 170, 0.12);
  }
  .indicators-demographics .icon-badge {
    background: rgba(251, 140, 0, 0.12);
  }

  @media (max-width: 600px) {
    .indicators-intro h1 {
      font-size: 22px;
    }

    .indicators-grid {
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      
    }
  }

/*//////// End indicators.php page specific styles ///////////*/

/*//////// Start findings.php page specific styles ///////////*/

.filter-card {
    max-width: 1320px;
    margin: 8px auto 18px auto;
    background:#fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    border: 1px solid #eef2f1;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    position: relative;
    z-index: 2; /* above map */
  }
  .filter-row {
    display:grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr)) auto;
    gap:12px;
    align-items:center;
  }
  .filter-group label {
    display:block;
    font-size:12px;
    color:#4a5a57;
    margin: 2px 0 6px;
    white-space: nowrap;
  }

  .ns { position: relative; width: 100%; }
  .ns-hidden { display:none !important; }

  .ns-toggle {
    background:#fafdfc;
    border:1px solid #dfe7e4;
    border-radius:8px;
    padding:6px 34px 6px 10px;
    font-size:13px;
    min-height:38px;
    line-height:1.1;
    box-shadow: 0 1px 3px rgba(0,0,0,.05) inset;
    cursor:pointer;
    user-select:none;
    position:relative;
    white-space: nowrap;
  }
  .ns-toggle:after {
    content:"";
    position:absolute;
    right:12px;
    top:50%;
    transform:translateY(-50%);
    border-left:6px solid transparent;
    border-right:6px solid transparent;
    border-top:7px solid #6c7c79;
  }
  .ns.open .ns-toggle {
    border-color:#9fd8bf;
    box-shadow: 0 0 0 3px #eaf5ed;
  }

  .ns-list {
    position:absolute;
    left:0;
    right:0;
    top: calc(100% + 6px);
    z-index: 4000; /* over Leaflet tiles */
    background:#fff;
    border:1px solid #e6efec;
    border-radius:12px;
    padding:6px;
    max-height:260px;
    overflow:auto;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
  }
  .ns .ns-list { display:none; }
  .ns.open .ns-list { display:block; }

  .ns-option {
    padding:8px 12px;
    line-height:1.25;
    border-radius:8px;
    cursor:pointer;
    font-size:14px;
    color:#1f2d2b;
  }
  .ns-option:hover { background:#eaf5ed; }
  .ns-option.active { background:#d7efe4; font-weight:600; }
  .ns.disabled .ns-toggle { opacity:.6; cursor:not-allowed; }

  .btn-view {
    padding:10px 16px;
    border:none;
    border-radius:10px;
    cursor:pointer;
    background:#0db36f;
    color:#fff;
    font-weight:700;
    font-size:14px;
    min-height:40px;
    box-shadow: 0 4px 10px rgba(13,179,111,.25);
    margin-top:4px;
    white-space:nowrap;
  }
  .btn-view:hover { background:#0a8453; }

  /* Map container */
  #dvip-map {
    max-width:1320px;
    height:650px;
    margin: 18px auto 24px;
    border-radius: 14px;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    border:1px solid #eef2f1;
    background:#f8fbfa;
    position: relative;
    z-index: 1;
  }
  .leaflet-container { z-index: 1; }




  /* Top-20 control inside the map (left side) – NO SCROLLBAR */

.dvip-top20-control { 
    width:210px;
    background:#fff;
    border-radius:12px;
    box-shadow:0 10px 20px rgba(0,0,0,.15);
    border:1px solid #eef2f1;
    font-family:"Segoe UI", Roboto, Arial, sans-serif;
    font-size:11px;

    /* NEW FINAL TUNING */
    height: 530px;        /* perfect height – leaves clean gap below */
    overflow: hidden;     /* no scrollbar + trims extra empty space */
    margin-bottom: 12px;  /* small gap from bottom of map frame */
}

/* Header */
.dvip-top20-control .top20-header {
    padding:6px 8px;
    font-weight:700;
    font-size:12px;
    border-bottom:1px solid #e5ecea;
    background:#f7faf9;
}

/* Table */
.dvip-top20-control table {
    width:100%;
    border-collapse:collapse;
    font-size:11px;
}

.dvip-top20-control th,
.dvip-top20-control td {
    padding:2.5px 6px;
    border-bottom:1px solid #f0f3f2;
    text-align:left;
}

.dvip-top20-control th {
    font-weight:600;
    background:#fafdfc;
}

.dvip-top20-control tr:nth-child(even) td {
    background:#f9fbfa;
}

/* Footnote */
.dvip-top20-control .top20-footnote {
    padding:4px 6px 6px;
    font-size:10px;
    color:#666;
}

/* Empty-state message */
.dvip-top20-control .top20-empty {
    padding:8px;
    font-size:11px;
    color:#777;
}

/* Center-align only the S.No column */
.dvip-top20-control table td:first-child,
.dvip-top20-control table th:first-child {
    text-align: center;
    width: 40px;    /* optional: adjusts column width */
}


/* Wrapper holding BOTH the legend box and the high-risk line */
.dvip-legend-wrapper {
  display: inline-block;         /* shrink to content */
  margin: 0 10px 18px 0;         /* right & bottom margin – matches Leaflet controls */
  text-align: center;            /* center contents horizontally */
}

/* Legend box */
.dvip-legend {
  background:#fff;
  padding:10px 14px;
  border-radius:10px;
  box-shadow:0 3px 10px rgba(0,0,0,.25);
  font-size:12px;
  line-height:1.9;
  display:inline-block;
  text-align: left;     /* ← THIS FIXES THE ALIGNMENT */
}

/* High-risk line OUTSIDE the legend box, centered under it */
.dvip-highrisk {
  font-size: 12px;
  font-weight: 700;
  color: #111;
  margin-top: 4px;               /* small gap under box */
  padding: 4px 2px;
  line-height: 1.4;
  white-space: nowrap;           /* keeps it on one line */
}





  /* Domain buttons (RIGHT side middle) */
  .dvip-domain-buttons {
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    margin-top:70px;
  }
  .dvip-domain-buttons button {
    display:block;
    width:130px;
    border:none;
    border-radius:8px;
    margin:6px 4px;
    padding:8px 10px;
    color:#fff;
    font-size:11px;
    cursor:pointer;
    text-align:center;
    font-weight:600;
  }
  .dvip-domain-buttons button.active {
    box-shadow:0 0 0 2px #ffffff, 0 0 0 4px rgba(0,0,0,.25);
  }

  /* Domain badge (top-right) */
  .dvip-domain-badge {
    padding:6px 14px;
    border-radius:999px;
    color:#fff;
    font-weight:700;
    font-size:13px;
    box-shadow:0 2px 8px rgba(0,0,0,.25);
    margin:8px 10px 0 0;
    font-family:"Segoe UI", Roboto, Arial, sans-serif;
    white-space:nowrap;
  }

  /* Rank labels on the map (1..20) */
  .dvip-rank-label div {
    width:24px;
    height:24px;
    border-radius:999px;
    background:rgba(0,0,0,0.65);
    color:#fff;
    font-size:12px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:700;
    border:1px solid rgba(255,255,255,0.8);
  }

  @media (max-width: 1100px){
    .filter-card { margin: 8px 12px 16px; padding: 12px; }
    .filter-row { grid-template-columns: repeat(2, minmax(240px, 1fr)); gap:10px; }
    #dvip-map { margin:12px 12px 24px; height:640px; }
  }
  @media (max-width: 600px){
    .filter-row { grid-template-columns: 1fr; }
    .filter-group label { font-size:12px; margin: 0 0 4px; }
    .ns-toggle { padding:10px 34px 10px 12px; min-height:44px; font-size:14px; }
    .btn-view { width:100%; margin-top:6px; min-height:44px; font-size:15px; }
    .ns-list { max-height: 50vh; box-shadow: 0 16px 28px rgba(0,0,0,.16); }
    #dvip-map { height:580px; }
  }


/*//////// End findings.php page specific styles ///////////*/

/*//////// Start dvip-report.php page specific styles ///////////*/

.pdf-wrapper {
    max-width: 1200px;
    margin: 30px auto 40px;
    padding: 0 16px;
  }

  /* ---- Updated Title + Paragraph ---- */
  .pdf-header-text h1 {
    margin: 0 0 14px;
    font-size: 34px;         /* increased */
    font-weight: 800;
    color: #0b3a57;
  }

  .pdf-header-text p {
    margin: 0;
    font-size: 18px;         /* increased */
    color: #444;
    line-height: 1.7;
  }

  .report-actions {
    margin-top: 24px;
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
  }

  /* ---- Updated Button Styles ---- */
  .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 16px;         /* slightly bigger */
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
  }

  /* ---- Bigger Icons ---- */
  .action-btn span.icon {
    font-size: 28px;         /* increased from 18px */
  }

  .action-btn.primary {
    background: #0b3a57;
    color: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
  }

  .action-btn.primary:hover {
    background: #0f476c;
    transform: translateY(-1px);
  }

  .action-btn.secondary {
    background: #e8f0f7;
    color: #0b3a57;
    border: 1px solid #c3d4e3;
  }

  .action-btn.secondary:hover {
    background: #d9e6f3;
  }

  /* ---- PDF Frame ---- */
  .pdf-card {
    margin-top: 22px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 10px;
  }

  .pdf-frame {
    width: 100%;
    height: 90vh;
    border: none;
    border-radius: 8px;
  }

  @media (max-width: 900px) {
    .pdf-header-text h1 {
      font-size: 28px;
    }
    .pdf-header-text p {
      font-size: 16px;
    }
    .action-btn span.icon {
      font-size: 24px;
    }
    .pdf-frame { height: 80vh; }
  }

/*//////// End dvip-report.php page specific styles ///////////*/

/*//////// Start footer.php page specific styles ///////////*/

.dvip-footer {
    background: #494A70;
    padding: 10px 0 12px; /* reduced top & bottom padding */
    text-align: center;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: #ffffff;
    font-size: 14px;
    margin-top: 40px; /* reduce if still too much space above footer */
}

.dvip-footer small {
    display: block;
    margin-top: 4px;
    color: #e2e2f2;
    font-size: 13px;
}
/*//////// End footer.php page specific styles ///////////*/

/*/////////Start menu close button on top////////////*/
/* CLOSE BUTTON (X) — FIX POSITION */
.close-btn {
  display: none;           /* hidden on desktop */
  position: absolute;
  top: 16px;
  right: 22px;
  font-size: 34px;
  cursor: pointer;
  z-index: 9999;
}

/* show close button only when menu is open */
#menu-toggle:checked ~ .close-btn {
  display: block;
}

@media (max-width: 760px) {
  .close-btn {
      display: none; /* overridden when menu is open */
  }
}
/*/////////End menu close button on top////////////*/
