/* ==========================================================================
   Bhadra Homoeopathic Forum — Modernized layout CSS
   Same brand colors as the original site. Table-based layout replaced with
   flexbox. New pages should use these classes instead of inline styles.
   ========================================================================== */

:root{
  --brand-navy:      #022873;  /* page background */
  --brand-blue:       #114b6b; /* footer */
  --brand-lightblue:  #a1c3db; /* content band background */
  --brand-link:       #0e5e9a;
  --brand-link-hover: #064a88;
  --brand-highlight:  #ff2b00; /* the repeated inline "highlight" color from the old site */
  --brand-text:       #434648;
  --white:            #ffffff;
}

*{ box-sizing: border-box; }

body{
  background: url('../Images/back_bg.jpg') no-repeat top var(--brand-navy);
  margin: 0;
  color: var(--brand-text);
  font-size: 14px;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a{ color: var(--brand-link); text-decoration: none; }
a:hover{ color: var(--brand-link-hover); text-decoration: underline; }

.wrapper{ max-width: 980px; margin: 0 auto; }

/* ---- Top bar: logo + login status + nav ---- */
.site-header{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}
.site-header__logo img{ display: block; height: 90px; }

.site-header__right{ display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.top-login{ font-size: 12px; display: flex; align-items: center; gap: 6px; }
.top-login a{ font-weight: bold; }

.site-nav{
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.site-nav a{
  display: block;
  padding: 10px 16px;
  background: var(--brand-blue);
  color: var(--white);
  font-weight: bold;
  font-size: 13px;
  border-radius: 3px;
}
.site-nav a:hover{ background: var(--brand-link-hover); text-decoration: none; }

/* ---- Main two-column area ---- */
.site-main{
  display: flex;
  gap: 10px;
  background: var(--brand-lightblue);
  padding: 10px;
  margin-top: 10px;
}

.site-sidebar{
  flex: 0 0 260px;
  background: var(--white);
  padding: 10px;
}
.site-sidebar h2{
  font-size: 17px;
  color: #27146d;
  border-bottom: 1px solid #d1d3d5;
  padding-bottom: 6px;
  margin: 0 0 8px 0;
}
.site-sidebar ul{ list-style: none; margin: 0; padding: 0; }
.site-sidebar li{ border-bottom: 1px dotted #dbdcdc; }
.site-sidebar li a{
  display: block;
  padding: 8px 4px 8px 20px;
  background: url('../Images/arrow_icon.jpg') left center no-repeat;
  color: var(--brand-text);
}
.site-sidebar li a:hover{ color: var(--brand-link-hover); text-decoration: none; }

.site-content{
  flex: 1;
  min-width: 0;
  background: var(--white);
  padding: 10px;
}

/* ---- Content helpers (replace old inline styles) ---- */
.callout-band{
  padding: 8px 0;
  background: #66ecff;
  text-align: center;
  margin-bottom: 8px;
}
.highlight{
  color: var(--brand-highlight);
  font-weight: bold;
  font-size: 16px;
  font-family: 'Hoefler Text', Constantia, Cambria, Georgia, serif;
}
.info-grid{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid #ccc;
  padding: 10px;
  margin-bottom: 10px;
}
.info-grid__col{ display: flex; flex-direction: column; gap: 14px; }
.info-grid__logo{ text-align: center; }

.cta-block{ text-align: center; margin-top: 20px; }
.cta-block__heading{ color: var(--brand-highlight); font-size: 20px; font-weight: bold; }
.cta-block__sub{ color: #4145a9; font-size: 17px; font-weight: bold; }
.cta-block__link{ color: var(--brand-highlight); font-size: 16px; font-weight: bold; }

/* ---- Footer ---- */
.site-footer{
  background: var(--brand-blue);
  color: var(--white);
  text-align: center;
  font-size: 12px;
  padding: 10px;
  margin-top: 10px;
}
.site-footer a{ color: var(--white); padding: 0 6px; }
.site-footer a:hover{ color: var(--white); text-decoration: underline; }
.site-footer__tagline{ display: block; margin-top: 6px; }

/* ---- Text + image side-by-side (replaces old nested tables) ---- */
.text-with-image{
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.text-with-image__photo{
  flex: 0 0 auto;
  max-width: 280px;
  height: auto;
}
.text-with-image p{ margin: 0; text-align: justify; }

.section-heading{
  color: #ff0000;
  margin-top: 24px;
}

.motto-quote{
  text-align: center;
  font-weight: bold;
  font-style: italic;
  max-width: 640px;
  margin: 0 auto 24px auto;
}

.portrait-row{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.portrait-row img{ display: block; max-width: 154px; height: auto; margin: 0 auto; }

.cause-intro{
  text-align: center;
  font-weight: bold;
}

.trustee-profile{
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 24px;
}
.trustee-profile__photo{ flex: 0 0 auto; max-width: 250px; height: auto; }
.trustee-profile p{ text-align: justify; margin: 0 0 10px 0; }
.trustee-profile__name{ text-align: center; font-weight: bold; font-size: 15px; }

.in-memory-note{ font-style: italic; color: #666; margin-bottom: 14px; }

.trustee-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.trustee-card{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
}
.trustee-card img{ width: 100%; max-width: 154px; height: auto; }
.trustee-card__placeholder{
  width: 154px;
  height: 180px;
  background: #eef1f3;
  border: 1px dashed #b9c3c9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a969c;
  font-size: 12px;
  text-align: center;
  padding: 8px;
}

@media (max-width: 700px){
  .trustee-grid{ grid-template-columns: repeat(2, 1fr); }
  .trustee-profile{ flex-direction: column; align-items: center; text-align: center; }
}

@media (max-width: 600px){
  .text-with-image{ flex-direction: column; align-items: center; }
}

/* ---- Responsive ---- */
@media (max-width: 760px){
  .site-main{ flex-direction: column; }
  .site-sidebar{ flex: 1 1 auto; }
  .site-header{ justify-content: center; text-align: center; }
  .site-header__right{ align-items: center; }
  .info-grid{ grid-template-columns: 1fr; text-align: center; }
}

/* ---- Contact Us page ---- */
.contact-list dt{
  font-weight: bold;
  margin-top: 16px;
  color: #27146d;
}
.contact-list dd{
  margin: 4px 0 0 0;
  padding: 0;
}
.text-warning{ color: #cc0000; }
.map-embed iframe{ max-width: 100%; }

/* ---- Donations page ---- */
.paypal-heading{
  font-weight: bold;
  color: #27146d;
  margin: 18px 0 4px 0;
}
.paypal-link{
  color: #ff2b00;
  font-size: 15px;
}
.donation-method{
  border-top: 1px dotted #d1d3d5;
  padding-top: 14px;
  margin-top: 14px;
}
.donation-method img{ max-width: 100%; height: auto; margin: 6px 8px 6px 0; }

/* ---- Cases section ---- */
.cases-list{ columns: 2; column-gap: 32px; list-style: disc; padding-left: 20px; }
.cases-list li{ break-inside: avoid; margin-bottom: 6px; }

.case-breadcrumb{ font-size: 13px; color: #666; margin-bottom: 10px; }
.case-breadcrumb a{ color: #0e5e9a; }

.case-info{ width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.case-info th{
  background: #caeedc;
  text-align: left;
  padding: 8px;
  width: 140px;
  vertical-align: top;
}
.case-info td{ background: #f1d0f4; padding: 8px; }
.case-info__narrative{ background: #d1e4fc !important; }

.case-symptoms{ width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.case-symptoms th{
  background: #f4e6d0;
  text-align: left;
  padding: 6px 8px;
  width: 160px;
  font-weight: normal;
}
.case-symptoms td{ background: #f1f4ce; padding: 6px 8px; }

.case-repertorization-wrap{ overflow-x: auto; margin-bottom: 20px; }
.case-repertorization{ border-collapse: collapse; min-width: 680px; }
.case-repertorization th, .case-repertorization td{
  border: 1px solid #ccc;
  padding: 5px 8px;
  text-align: center;
  font-size: 13px;
}
.case-repertorization thead th, .case-repertorization tr:first-child th{
  background: #674621;
  color: #fff;
}
.case-repertorization th:first-child{ background: #c4c0f8; text-align: left; }
.case-repertorization td{ background: #f4c8b9; }
.case-repertorization__remarks-head{ min-width: 260px; }
.case-repertorization__remarks{
  background: #f4c8b9;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  min-width: 260px;
}

@media (max-width: 700px){
  .cases-list{ columns: 1; }
}

/* ---- Cases: gallery-type (before/after image comparison) ---- */
.case-gallery-intro{
  text-align: center;
  font-weight: bold;
  margin-bottom: 16px;
}
.case-gallery-row{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.case-gallery-row__image{ flex: 1 1 200px; max-width: 330px; }
.case-gallery-row__image img{ display: block; width: 100%; height: auto; border: 1px solid #ccc; }
.case-gallery-row__text{ flex: 1 1 200px; margin: 0; }
.case-gallery-conclusion{
  border-top: 1px dotted #d1d3d5;
  padding-top: 14px;
  margin-top: 10px;
}

@media (max-width: 700px){
  .case-gallery-row{ flex-direction: column; }
  .case-gallery-row__image{ max-width: 100%; margin: 0 auto; }
}

/* ---- Cases: narrative type extras ---- */
.case-figure-caption{
  text-align: center;
  font-weight: bold;
  margin: 4px 0 16px 0;
}
.case-repertorization__extra{
  background: #c4c0f8 !important;
  text-align: left;
  font-size: 13px;
}

/* ---- Testimonials (frozen guestbook) ---- */
.testimonial-list{ display: flex; flex-direction: column; gap: 16px; }
.testimonial-card{
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 14px 16px;
  background: #fafcfe;
}
.testimonial-card__text{ margin: 0 0 8px 0; }
.testimonial-card__meta{
  margin: 0;
  font-size: 13px;
  color: #666;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}
.testimonial-card__date{ color: #999; }

@media (max-width: 500px){
  .testimonial-card__meta{ flex-direction: column; gap: 2px; }
}

/* ---- Mobile hamburger nav toggle ---- */
.nav-toggle{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 30px;
  background: var(--brand-blue);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span{
  display: block;
  height: 3px;
  width: 22px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 2px;
}

@media (max-width: 700px){
  .nav-toggle{ display: flex; }

  .site-nav{
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 8px;
  }
  .site-nav.is-open{ display: flex; }
  .site-nav a{ text-align: center; }
}

/* ---- Mobile sidebar toggle ---- */
.sidebar-toggle__icon{
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 22px;
  height: 18px;
  margin-right: 8px;
}
.sidebar-toggle__icon span{
  display: block;
  height: 2px;
  width: 100%;
  background: #27146d;
  border-radius: 1px;
}

@media (max-width: 700px){
  .sidebar-toggle{
    display: flex;
    align-items: center;
    cursor: pointer;
  }
  .sidebar-toggle__icon{ display: flex; }

  .sidebar-menu{ display: none; }
  .sidebar-menu.is-open{ display: block; }
}

/* ---- Patient detail page ---- */
.patient-switcher{
  margin-bottom: 16px;
  padding: 10px;
  background: #eef1f3;
  border-radius: 4px;
}
.patient-switcher a{
  display: inline-block;
  margin: 4px 8px 0 0;
  padding: 4px 10px;
  border-radius: 3px;
  background: #fff;
  border: 1px solid #ccc;
  color: #27146d;
  font-size: 13px;
}
.patient-switcher a.is-active{
  background: #3fa0a6;
  color: #fff;
  border-color: #3fa0a6;
}

.message-entry{
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 8px;
}
.message-entry summary{
  padding: 8px 12px;
  cursor: pointer;
  font-weight: bold;
  background: #fafcfe;
}
.message-entry__body{
  padding: 10px 12px;
  border-top: 1px solid #eee;
}
.message-entry__body p{ margin: 0 0 6px 0; }

.message-pagination{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
}

.remedy-item{ margin-top: 14px; margin-bottom: 4px; }

/* ---- Special dose cards ---- */
.dose-card{
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 10px;
}
.dose-card__name{ font-weight: bold; margin: 0 0 4px 0; }
.dose-card__date{ margin: 0 0 6px 0; }
.dose-card__alert{
  background: #fff3cd;
  border: 1px solid #ffcc00;
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 13px;
  animation: dose-alert-pulse 2s ease-in-out infinite;
}
@keyframes dose-alert-pulse{
  0%, 100% { background: #fff3cd; }
  50% { background: #ffe58a; }
}

/* ---- New (unread) doctor message highlight ---- */
.message-entry--new summary{
  animation: new-message-pulse 1.6s ease-in-out infinite;
}
@keyframes new-message-pulse{
  0%, 100% { background: #d1e4fc; }
  50% { background: #8fc1f7; }
}
.message-entry{ margin-bottom: 4px; }
.dose-card{ padding: 8px 12px; margin-bottom: 6px; }

/* Admin list row highlight — needs !important since .case-info td sets its own background */
.admin-row-highlight td{ background: #f9c256 !important; }

/* Admin tables — clean white background, separate from patient-side .case-info theme */
.admin-table{ border-collapse: collapse; }
.admin-table th{ background:#e8ecef; padding:8px; text-align:left; border:1px solid #ddd; }
.admin-table td{ background:#fff; padding:8px; border:1px solid #ddd; }
.admin-table tr.admin-row-highlight td{ background:#f9c256 !important; }

/* Prominent "New Message from Doctor" box — distinct light yellow, separate from the blue pulse used in the message list */
.new-doctor-message{
  background: #fff9db;
  border: 1px solid #f0e0a0;
  border-radius: 4px;
}

/* Next visit date banner — blinking to draw attention */
.next-visit-banner{
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: bold;
  animation: next-visit-blink 1.4s ease-in-out infinite;
}
@keyframes next-visit-blink{
  0%, 100% { background: #ffe08a; }
  50% { background: #ffb3b3; }
}
