.p31-page {
  --p31-red: #e31e24;
  --p31-red-dark: #c4181d;
  --p31-ink: #222;
  --p31-muted: #666;
  --p31-border: #e0e0e0;
  --p31-body: #f4f5f7;
  --p31-card: #fff;
  background: var(--p31-body);
  color: var(--p31-ink);
  font-family: "Noto Sans Devanagari", "Nirmala UI", Mangal, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.p31-page *,
.p31-page *::before,
.p31-page *::after {
  box-sizing: border-box;
  letter-spacing: 0;
}

.p31-page a {
  color: inherit;
  text-decoration: none;
}

.p31-page img {
  display: block;
  max-width: 100%;
}

.p31-container {
  margin: 0 auto;
  max-width: 1230px;
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
}

.p31-topbar {
  background: #f7f7f7;
  border-bottom: 1px solid var(--p31-border);
  color: var(--p31-muted);
  font-size: 0.75rem;
  padding: 6px 0;
}

.p31-topbar .p31-container,
.p31-header .p31-container,
.p31-actions,
.p31-actions form {
  align-items: center;
  display: flex;
}

.p31-topbar .p31-container,
.p31-header .p31-container {
  justify-content: space-between;
}

.p31-topbar div div {
  display: flex;
  gap: 18px;
}

.p31-header {
  background: #fff;
  padding: 15px 0;
}

.p31-logo {
  display: grid;
}

.p31-logo strong {
  color: var(--p31-red);
  font-size: 2.05rem;
  font-weight: 900;
  line-height: 1.05;
}

.p31-logo span {
  color: var(--p31-muted);
  font-size: 0.78rem;
}

.p31-actions {
  gap: 15px;
}

.p31-actions form {
  border: 1px solid var(--p31-border);
  border-radius: 4px;
  overflow: hidden;
}

.p31-actions input {
  border: 0;
  font: inherit;
  min-height: 38px;
  outline: 0;
  padding: 7px 11px;
  width: 210px;
}

.p31-actions button {
  background: #f7f7f7;
  border: 0;
  color: var(--p31-muted);
  cursor: pointer;
  font-size: 1.25rem;
  min-height: 38px;
  width: 42px;
}

.p31-login,
.p31-newsletter button {
  background: var(--p31-red);
  border: 0;
  border-radius: 4px;
  color: #fff !important;
  cursor: pointer;
  font-weight: 800;
  padding: 9px 16px;
}

.p31-nav {
  background: var(--p31-red);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.p31-nav .p31-container {
  display: flex;
  overflow-x: auto;
  padding-bottom: 0;
  padding-top: 0;
  white-space: nowrap;
}

.p31-nav a {
  color: #fff;
  display: block;
  font-size: 0.94rem;
  font-weight: 750;
  padding: 12px 18px;
}

.p31-nav a:hover,
.p31-nav a.active {
  background: rgba(0, 0, 0, 0.15);
}

.p31-ticker {
  align-items: center;
  background: #fff3f3;
  border-bottom: 1px solid #ffd4d4;
  display: flex;
  overflow: hidden;
  padding-bottom: 8px;
  padding-top: 8px;
}

.p31-ticker > strong {
  background: var(--p31-red);
  border-radius: 2px;
  color: #fff;
  flex: 0 0 auto;
  font-size: 0.78rem;
  padding: 5px 12px;
}

.p31-ticker > div {
  display: flex;
  gap: 30px;
  overflow-x: auto;
  padding-left: 16px;
  white-space: nowrap;
}

.p31-ticker a {
  font-size: 0.85rem;
  font-weight: 700;
}

.p31-top-ad {
  margin-top: 16px;
}

.p31-main-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr) minmax(220px, 1fr);
  padding-bottom: 40px;
  padding-top: 25px;
}

.p31-main-grid > * {
  min-width: 0;
}

.p31-section-heading {
  align-items: center;
  border-bottom: 2px solid var(--p31-border);
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 8px;
}

.p31-section-heading h2 {
  color: var(--p31-red);
  font-size: 1.35rem;
  margin: 0;
  position: relative;
}

.p31-section-heading h2::after {
  background: var(--p31-red);
  bottom: -10px;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  width: 60px;
}

.p31-section-heading > a {
  color: var(--p31-red);
  font-size: 0.82rem;
  font-weight: 800;
}

.p31-compact-feed {
  display: grid;
  gap: 14px;
}

.p31-horizontal-story {
  align-items: flex-start;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: grid;
  gap: 12px;
  grid-template-columns: 110px minmax(0, 1fr);
  overflow: hidden;
}

.p31-horizontal-story img {
  aspect-ratio: 4 / 3;
  height: 100%;
  object-fit: cover;
  width: 110px;
}

.p31-horizontal-story div {
  padding: 10px 10px 10px 0;
}

.p31-horizontal-story h3 {
  font-size: 0.96rem;
  line-height: 1.35;
  margin: 0 0 7px;
}

.p31-horizontal-story span,
.p31-story-card span {
  color: var(--p31-muted);
  font-size: 0.72rem;
}

.p31-hero-card {
  background: #111;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
  color: #fff !important;
  display: block;
  height: 450px;
  overflow: hidden;
  position: relative;
}

.p31-hero-card::after {
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), transparent 68%);
  bottom: 0;
  content: "";
  height: 70%;
  left: 0;
  position: absolute;
  right: 0;
}

.p31-hero-card > img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.p31-hero-card > div {
  bottom: 0;
  left: 0;
  padding: 25px;
  position: absolute;
  right: 0;
  z-index: 2;
}

.p31-hero-card span {
  background: var(--p31-red);
  border-radius: 2px;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 850;
  padding: 3px 8px;
}

.p31-hero-card h1 {
  font-size: 1.85rem;
  line-height: 1.25;
  margin: 10px 0 6px;
}

.p31-hero-card p {
  color: #ddd;
  margin: 0;
}

.p31-section-block {
  margin-top: 30px;
}

.p31-scroll-row {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-color: var(--p31-red) #eee;
  scrollbar-width: thin;
}

.p31-scroll-row .p31-story-card {
  flex: 0 0 220px;
}

.p31-story-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  display: grid;
  overflow: hidden;
}

.p31-story-card > img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
}

.p31-story-card > div {
  padding: 13px;
}

.p31-story-card h3 {
  font-size: 1rem;
  line-height: 1.35;
  margin: 5px 0;
}

.p31-story-card p {
  color: var(--p31-muted);
  font-size: 0.83rem;
  margin: 0;
}

.p31-two-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.p31-social-feed {
  display: grid;
  gap: 20px;
}

.p31-social-story {
  background: #fff;
  border: 1px solid var(--p31-border);
  border-radius: 8px;
  overflow: hidden;
}

.p31-social-head {
  align-items: center;
  display: flex;
  gap: 11px;
  padding: 12px 15px;
}

.p31-social-head > span {
  align-items: center;
  background: var(--p31-red);
  border-radius: 50%;
  color: #fff;
  display: flex;
  font-weight: 900;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.p31-social-head div {
  display: grid;
}

.p31-social-head small {
  color: var(--p31-muted);
}

.p31-social-story > a h3,
.p31-social-story > a p {
  margin-left: 15px;
  margin-right: 15px;
}

.p31-social-story > a h3 {
  font-size: 1.05rem;
  margin-bottom: 5px;
}

.p31-social-story > a p {
  color: var(--p31-muted);
  margin-bottom: 12px;
}

.p31-social-story > a img {
  max-height: 390px;
  object-fit: cover;
  width: 100%;
}

.p31-social-actions {
  color: var(--p31-muted);
  display: flex;
  font-size: 0.82rem;
  gap: 22px;
  padding: 12px 15px;
}

.p31-widget {
  background: #fff;
  border-radius: 8px;
  border-top: 3px solid var(--p31-red);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  margin-bottom: 20px;
  padding: 15px;
}

.p31-widget > h2 {
  color: var(--p31-red);
  font-size: 1.12rem;
  margin: 0 0 14px;
  text-transform: uppercase;
}

.p31-ranked-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.p31-ranked-list li {
  align-items: flex-start;
  border-bottom: 1px dashed var(--p31-border);
  display: grid;
  gap: 10px;
  grid-template-columns: 25px minmax(0, 1fr);
  padding: 11px 0;
}

.p31-ranked-list li > span {
  color: var(--p31-red);
  font-size: 1.05rem;
  font-weight: 900;
}

.p31-ranked-list a {
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.4;
}

.p31-region-widget {
  margin-top: 30px;
}

.p31-region-links,
.p31-service-links {
  display: grid;
  gap: 9px;
}

.p31-region-links a,
.p31-service-links a {
  border-bottom: 1px dashed var(--p31-border);
  padding-bottom: 8px;
}

.p31-service-links a {
  display: grid;
}

.p31-service-links span {
  color: var(--p31-muted);
  font-size: 0.8rem;
}

.p31-newsletter {
  background: var(--p31-red);
  color: #fff;
  position: sticky;
  top: 74px;
}

.p31-newsletter > h2,
.p31-newsletter p {
  color: #fff;
}

.p31-newsletter form {
  display: grid;
  gap: 9px;
}

.p31-newsletter input {
  border: 0;
  border-radius: 4px;
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
}

.p31-newsletter button {
  background: #fff;
  color: var(--p31-red) !important;
}

.p31-ad-widget {
  background: #eaeaea;
  border-top-color: #bbb;
  text-align: center;
}

.p31-ad-slot {
  align-items: center;
  background: #ddd;
  border: 1px dashed #aaa;
  color: #777;
  display: grid;
  gap: 5px;
  justify-items: center;
  min-height: 180px;
  padding: 20px;
}

.p31-top-ad .p31-ad-slot {
  min-height: 88px;
}

.p31-ad-slot span,
.p31-ad-slot small {
  font-size: 0.72rem;
}

.p31-gallery {
  margin-bottom: 40px;
}

.p31-gallery-grid {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.p31-gallery-grid a {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.p31-gallery-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.p31-gallery-grid strong {
  display: block;
  padding: 12px;
}

.p31-footer {
  background: #222;
  color: #ccc;
  margin-top: 30px;
  padding: 48px 0 20px;
}

.p31-footer-grid {
  display: grid;
  gap: 30px;
  grid-template-columns: 1.4fr repeat(3, 1fr);
}

.p31-footer h2 {
  color: var(--p31-red);
  margin: 0 0 10px;
}

.p31-footer h3 {
  border-bottom: 1px solid #444;
  color: #aaa;
  font-size: 1rem;
  margin: 0 0 15px;
  padding-bottom: 10px;
}

.p31-footer section {
  align-content: start;
  display: grid;
  gap: 8px;
}

.p31-footer a {
  color: #ccc;
  font-size: 0.86rem;
}

.p31-footer p {
  margin: 0;
}

.p31-footer-bottom {
  border-top: 1px solid #333;
  color: #777;
  font-size: 0.8rem;
  margin: 35px auto 0;
  max-width: 1200px;
  padding: 18px 15px 0;
  text-align: center;
}

@media (max-width: 992px) {
  .p31-main-grid {
    grid-template-columns: minmax(210px, 0.7fr) minmax(0, 1.3fr);
  }

  .p31-right-column {
    display: grid;
    gap: 20px;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .p31-right-column .p31-widget {
    margin-bottom: 0;
  }

  .p31-newsletter {
    position: static;
  }
}

@media (max-width: 720px) {
  .p31-topbar .p31-container,
  .p31-header .p31-container {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .p31-topbar div div {
    flex-wrap: wrap;
  }

  .p31-logo {
    text-align: center;
  }

  .p31-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .p31-actions form,
  .p31-actions input {
    width: 100%;
  }

  .p31-login {
    text-align: center;
  }

  .p31-nav a {
    padding: 11px 14px;
  }

  .p31-ticker {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .p31-ticker > strong {
    align-self: flex-start;
  }

  .p31-ticker > div {
    padding-left: 0;
  }

  .p31-main-grid,
  .p31-right-column,
  .p31-two-grid,
  .p31-footer-grid,
  .p31-gallery-grid {
    grid-template-columns: 1fr;
  }

  .p31-left-column {
    order: 2;
  }

  .p31-center-column {
    order: 1;
  }

  .p31-right-column {
    order: 3;
  }

  .p31-hero-card {
    height: 390px;
  }

  .p31-hero-card h1 {
    font-size: 1.45rem;
  }

  .p31-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .p31-container {
    padding-left: 10px;
    padding-right: 10px;
  }

  .p31-horizontal-story {
    grid-template-columns: 100px minmax(0, 1fr);
  }

  .p31-horizontal-story img {
    width: 100px;
  }

  .p31-hero-card {
    height: 350px;
  }

  .p31-hero-card > div {
    padding: 18px;
  }

  .p31-gallery-grid {
    grid-template-columns: 1fr;
  }
}
