/* ===============================
   MADHUSHALA 4.0 — SIMPLE CLASSY THEME
   Off-white background + wine accents
   Scoped to .m4-body so it won’t affect other pages
   =============================== */

.m4-body{
  /* Dark wine theme background */
  background:
    radial-gradient(900px 420px at 20% 10%, rgba(139,16,36,0.35), transparent 60%),
    radial-gradient(900px 520px at 80% 15%, rgba(58,10,82,0.28), transparent 60%),
    radial-gradient(820px 520px at 50% 95%, rgba(28,107,69,0.18), transparent 65%),
    linear-gradient(180deg, #12070a, #0b0b0d);
  color: #f4ede4; /* base text color on dark bg */
}

/* We reuse your existing navbar markup, but override colors */
.m4-navbar{
  background: rgba(18, 7, 10, 0.55) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.m4-navbar .nav-links a{
  color: #ffffff !important;
  font-weight: 700;
}

.m4-navbar .nav-links a:hover{
  color: #6b0f1a !important;
}

.m4-navbar .mobile-nav-toggle{
  color: #241a1f !important;
}

/* Back button */
.m4-back{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  color: #241a1f !important;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
}
.m4-back:hover{
  border-color: rgba(107,15,26,0.35);
  color: #6b0f1a !important;
}

/* Navbar register pill */
.m4-nav-cta{
  padding: 8px 12px;
  border-radius: 999px;
  background: #6b0f1a;
  color: #fff !important;
  border: 1px solid rgba(107,15,26,0.65);
}
.m4-nav-cta:hover{
  filter: brightness(1.05);
}

/* Main layout */
.m4-main{
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 18px 36px;
}

/* Hero */
.m4-hero{
  text-align: center;
  padding: 26px 14px 18px;
}

.m4-hero-img{
  width: min(980px, 100%);
  height: auto;
  object-fit: contain;     /* IMPORTANT: never crop */
  display: block;
  margin: 0 auto 14px;
  border-radius: 14px;
  background: #fff;        /* keep it clean */
  padding: 10px;           /* gives “frame” without being extra */
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 14px 34px rgba(0,0,0,0.10);
}

/* Sub line */
.m4-subtitle{
  margin: 0 auto 14px;
  max-width: 820px;
  color: rgba(36,26,31,0.78);
  font-weight: 700;
}

/* CTA */
.m4-hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.m4-cta{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 900;
  text-decoration: none;
  background: #6b0f1a;
  color: #fff !important;
  box-shadow: 0 12px 26px rgba(107,15,26,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.m4-cta:hover{
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 30px rgba(107,15,26,0.22);
}

.m4-cta-secondary{
  margin-top: 12px;
  width: 100%;
  text-align: center;
  background: #241a1f;
  box-shadow: 0 12px 26px rgba(0,0,0,0.10);
}

.m4-note{
  color: rgba(36,26,31,0.70);
  font-weight: 700;
}

/* Sections */
.m4-section{
  margin-top: 24px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.m4-section h2{
  margin: 0 0 12px;
  font-size: 1.35rem;
  color: #6b0f1a;
}

/* Pills */
.m4-pills{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.m4-pill{
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 12px;
}
.m4-pill b{
  display: block;
  color: #241a1f;
}
.m4-pill span{
  display: block;
  margin-top: 4px;
  color: rgba(36,26,31,0.70);
  font-weight: 700;
}

/* Grid details */
.m4-grid{
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 14px;
}

.m4-card{
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  padding: 16px;
}

.m4-list{
  margin: 10px 0 0;
  padding-left: 18px;
}
.m4-list li{
  margin: 8px 0;
}

/* Key-value rows */
.m4-kv{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(247,242,232,0.85);
  border: 1px solid rgba(0,0,0,0.07);
  margin: 10px 0;
}
.m4-kv span{
  color: rgba(36,26,31,0.70);
  font-weight: 800;
}
.m4-kv b{
  color: #241a1f;
}

/* FAQ */
.m4-faq details{
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 12px 12px;
  margin: 10px 0;
}
.m4-faq summary{
  cursor: pointer;
  font-weight: 900;
  color: #241a1f;
}
.m4-faq p{
  margin: 8px 0 0;
  color: rgba(36,26,31,0.78);
  font-weight: 600;
}

/* Footer */
.m4-footer{
  margin-top: 26px;
  text-align: center;
  color: rgba(36,26,31,0.70);
  font-weight: 700;
}
.m4-footer a{
  color: #6b0f1a;
  text-decoration: none;
  font-weight: 900;
}
.m4-footer a:hover{
  text-decoration: underline;
}

/* Fade-in animation */
.m4-fade{
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 420ms ease, transform 420ms ease;
}
.m4-fade.is-in{
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 900px){
  .m4-grid{ grid-template-columns: 1fr; }
  .m4-pills{ grid-template-columns: 1fr; }
}
@media (max-width: 768px){
  .m4-main{ padding: 18px 12px 30px; }
}
/* Force register button text visible */
.m4-nav-cta,
.m4-nav-cta:visited,
.m4-nav-cta:hover,
.m4-nav-cta:active{
  color: #ffffff !important;
}

/* If the big CTA button ever gets overridden by global styles */
.m4-cta,
.m4-cta:visited,
.m4-cta:hover,
.m4-cta:active{
  color: #ffffff !important;
}
/* ===============================
   FIX: Text contrast on white cards + footer visibility
   (After dark wine background change)
   =============================== */

/* Make sure all white sections/cards use dark ink */
.m4-section,
.m4-card,
.m4-pill,
.m4-faq details{
  color: #241a1f !important;
}

/* Paragraphs + lists inside cards/sections */
.m4-section p,
.m4-section li,
.m4-card p,
.m4-card li,
.m4-pill span,
.m4-note{
  color: rgba(36,26,31,0.78) !important;
}

/* Headings inside cards/sections */
.m4-section h2,
.m4-card h2,
.m4-card h3{
  color: #6b0f1a !important;
}

/* Key-value rows (Quick Info boxes) */
.m4-kv span{
  color: rgba(36,26,31,0.70) !important;
}
.m4-kv b{
  color: #241a1f !important;
}

/* Footer must be visible on dark background */
.m4-footer{
  color: rgba(244,237,228,0.85) !important;
}
.m4-footer a{
  color: #e9c46a !important; /* gold link pops on wine bg */
}
.m4-footer a:hover{
  text-decoration: underline;
}