body {
  font-family: 'Noto Sans Devanagari', Arial, sans-serif;
  margin: 0;
  padding-top: 48px;
  background: #f9f9f9;
}

h1, h2 {
  text-align: center;
}

/* --- NAVIGATION MENU (SCOPED TO nav) --- */
nav {
  background: #000;
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

nav ul.main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  height: 48px;
}

nav ul.main-menu > li {
  position: relative;
}

nav ul.main-menu > li > a,
nav ul.main-menu > li > .dropbtn {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 0 18px;
  height: 48px;
  line-height: 48px;
  display: inline-block;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1em;
}

nav ul.main-menu > li > a:hover,
nav ul.main-menu > li > .dropbtn:hover,
nav ul.main-menu > li.dropdown:hover > .dropbtn {
  background: #222;
  text-decoration: underline;
}

/* First-level dropdown */
nav ul.dropdown-content {
  display: none;
  position: absolute;
  background: #111;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  top: 48px;
  left: 0;
  z-index: 2000;
  padding: 0;
  list-style: none;
}

nav li.dropdown:hover > ul.dropdown-content {
  display: block;
}

nav ul.dropdown-content > li > a,
nav ul.dropdown-content > li > .dropbtn {
  color: #fff;
  padding: 10px 18px;
  text-decoration: none;
  display: block;
  font-weight: normal;
  background: #111;
  height: auto;
  line-height: normal;
  white-space: nowrap;
}

nav ul.dropdown-content > li > a:hover,
nav ul.dropdown-content > li > .dropbtn:hover {
  background: #222;
}

nav li.dropdown-sub {
  position: relative;
}

nav li.dropdown-sub > .dropbtn {
  padding-right: 30px;
  position: relative;
}

nav li.dropdown-sub > .dropbtn::after {
  content: '▶';
  position: absolute;
  right: 12px;
  font-size: 0.8em;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
}

nav ul.sub-content {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 140px;
  background: #111;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  z-index: 2100;
  padding: 0;
  list-style: none;
}

nav li.dropdown-sub:hover > ul.sub-content {
  display: block;
}

nav ul.sub-content > li > a {
  padding: 10px 18px;
  background: #111;
  color: #fff;
  text-decoration: none;
  display: block;
  white-space: nowrap;
}

nav ul.sub-content > li > a:hover {
  background: #222;
}

/* --- Hamburger Icon (AllTop style) --- */
.hamburger {
  display: none;
  position: absolute;
  right: 16px;
  top: 8px;
  width: 38px;
  height: 38px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2001;
}
.hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 3px 0;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

/* --- COMPACT MOBILE MENU --- */
@media (max-width: 800px) {
  .hamburger { display: flex; }
  nav ul.main-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 48px;
    right: 12px;
    left: auto;
    width: 220px;
    min-width: 160px;
    max-width: 90vw;
    background: #111;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 2000;
    padding: 8px 0;
    margin: 0;
    transition: opacity 0.2s;
    opacity: 0;
    pointer-events: none;
  }
  nav ul.main-menu.open {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
  nav ul.main-menu > li {
    width: 100%;
  }
  nav ul.main-menu > li > a,
  nav ul.main-menu > li > .dropbtn {
    width: 100%;
    box-sizing: border-box;
    font-size: 1.1em;
    padding: 0 16px;
    height: 44px;
    line-height: 44px;
    text-align: left;
  }
  nav ul.dropdown-content, nav ul.sub-content {
    position: static;
    min-width: 100%;
    box-shadow: none;
    background: #222;
    border-radius: 0;
  }
  nav ul.dropdown-content > li > a,
  nav ul.dropdown-content > li > .dropbtn {
    padding-left: 32px;
  }
}

/* --- CONTAINER AND GRID --- */
.container {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 16px;
}

.grid {
  display: grid;
  grid-gap: 18px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 24px;
}

@media (max-width: 900px) {
  .container { max-width: 100%; }
  .grid { grid-template-columns: repeat(2, 1fr);}
}
@media (max-width: 600px) {
  .container { max-width: 100%; }
  .grid { grid-template-columns: 1fr;}
}

/* --- NEWS/FEED CELLS --- */
.cell {
  background: #fff;
  padding: 18px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.cell h3 {
  font-size: 1.1em;
  margin: 0 0 10px 0;
  color: #c00;
  flex-shrink: 0;
}
.cell h3 a {
  color: #c00;
  text-decoration: none;
}
.cell h3 a:hover {
  text-decoration: underline;
}
.cell ul {
  list-style-type: none;
  padding-left: 0;
  margin: 0;
  flex-grow: 1;
}
.cell ul li {
  border-bottom: 1px solid #ccc;
  padding-bottom: 6px;
  margin-bottom: 6px;
}
.cell ul li:last-child {
  border-bottom: none;
}
.cell li a {
  color: #000;
  text-decoration: none;
  font-size: 0.98em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.cell li a:hover {
  color: #444;
  text-decoration: underline;
}

/* --- AD CELLS --- */
.ad-cell.ad-fullwidth {
  grid-column: 1 / -1 !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 90px !important;
  height: 90px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-728x90 {
  margin: 0 auto;
  padding: 0;
  width: 100%;
  max-width: 728px;
  min-width: 320px;
  height: 90px;
  max-height: 90px;
  min-height: 90px;
  border: 2px dashed #bbb;
  background: #f5f5f5;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 800px) {
  .ad-728x90, .ad-cell.ad-fullwidth {
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
  }
}
.ad-728x90 > span, .ad-728x90 > div {
  width: 100%;
  text-align: center;
  display: block;
  line-height: normal;
}

.ad-300x250 {
  width: 100%;
  max-width: 300px;
  min-width: 0;
  height: 250px;
  min-height: 250px;
  max-height: 250px;
  background: #f5f5f5;
  border: 2px dashed #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}
.ad-300x250 > span, .ad-300x250 > div {
  width: 100%;
  text-align: center;
  display: block;
  line-height: normal;
}

.ad-300x350 {
  width: 100%;
  max-width: 300px;
  min-width: 0;
  height: 350px;
  min-height: 350px;
  max-height: 350px;
  background: #f5f5f5;
  border: 2px dashed #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
}
.ad-300x350 > span, .ad-300x350 > div {
  width: 100%;
  text-align: center;
  display: block;
  line-height: normal;
}

/* --- TOOLTIP --- */
#custom-tooltip {
  display: none;
  position: absolute;
  z-index: 9999;
  max-width: 350px;
  min-width: 250px;
  background: #222;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 0.95em;
  line-height: 1.4;
  pointer-events: none;
}
#custom-tooltip strong {
  font-size: 1.04em;
  color: #fff;
}
#custom-tooltip span {
  color: #eee;
  font-size: 0.98em;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  color: #888;
  margin: 40px 0 10px 0;
}

/* --- IMPROVE TOUCH TARGETS & MOBILE FEED UX --- */
@media (max-width: 600px) {
  nav ul.main-menu > li > a,
  nav ul.main-menu > li > .dropbtn {
    font-size: 1.1em;
    padding: 0 12px;
    height: 44px;
    line-height: 44px;
  }
  .cell {
    padding: 12px 6px;
    min-height: 150px;
  }
  .cell h3 {
    font-size: 1em;
  }
  .ad-728x90, .ad-cell.ad-fullwidth {
    min-height: 40px !important;
    height: 40px !important;
    max-height: 40px !important;
  }
  #custom-tooltip {
    min-width: 160px;
    max-width: 95vw;
    font-size: 0.92em;
    padding: 8px 8px;
  }
  .cell ul li {
    padding-bottom: 10px;
    margin-bottom: 10px;
    font-size: 1em;
  }
  .cell li a {
    font-size: 1.1em;
    padding: 10px 0;
    min-height: 44px;
  }
  .ad-300x250, .ad-300x350 {
    max-width: 95vw;
    height: 120px;
    min-height: 80px;
    max-height: 140px;
  }
}
