/*
Theme Name: The Pancreas - Patient Education Hub
Theme URI: https://thepancreas.in
Author: The Pancreas Awareness Initiative
Description: Clean, accessible, bilingual public health portal for pancreas anatomy, pancreatitis, pancreatic cancer, and dietary guidelines.
Version: 1.0.0
*/

:root {
  --tp-navy: #0F172A;
  --tp-blue: #0284C7;
  --tp-teal: #0D9488;
  --tp-amber: #D97706;
  --tp-red: #DC2626;
  --tp-bg: #F8FAFC;
  --tp-card: #FFFFFF;
  --tp-text: #1E293B;
  --tp-muted: #64748B;
  --tp-border: #E2E8F0;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-gu: 'Shruti', 'Gujarati Sangam MN', 'Noto Sans Gujarati', system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  color: var(--tp-text);
  background-color: var(--tp-bg);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
  padding-bottom: 70px;
}

@media (min-width: 992px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--tp-blue);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--tp-navy);
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.tp-header {
  background: var(--tp-card);
  border-bottom: 1px solid var(--tp-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.tp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.tp-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tp-logo-icon {
  width: 38px;
  height: 38px;
  background: #E0F2FE;
  color: var(--tp-blue);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.tp-logo-text {
  display: flex;
  flex-direction: column;
}

.tp-logo-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--tp-navy);
  line-height: 1.1;
}

.tp-logo-subtitle {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tp-teal);
  letter-spacing: 0.5px;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  background: #F1F5F9;
  border-radius: 9999px;
  padding: 3px;
  border: 1px solid var(--tp-border);
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 9999px;
  cursor: pointer;
  color: var(--tp-muted);
  transition: all 0.2s ease;
}

.lang-btn.active {
  background: var(--tp-card);
  color: var(--tp-navy);
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* Hero Section */
.tp-hero {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0369A1 100%);
  color: #FFFFFF;
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.tp-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  padding: 0.35rem 1rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255,255,255,0.2);
}

.tp-hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 850px;
  margin: 0 auto 1rem;
}

.tp-hero-lead {
  font-size: 1.1rem;
  color: #E2E8F0;
  max-width: 720px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

.tp-hero-actions {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.tp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.tp-btn-primary {
  background: var(--tp-blue);
  color: #FFFFFF;
}

.tp-btn-primary:hover {
  background: #0275B1;
  color: #FFFFFF;
}

.tp-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #FFFFFF;
  border: 1px solid rgba(255,255,255,0.3);
}

.tp-btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  color: #FFFFFF;
}

/* Sections */
.tp-section {
  padding: 4rem 0;
}

.tp-section.white-bg {
  background: var(--tp-card);
}

.tp-sec-head {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 3rem;
}

.tp-sec-tag {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--tp-teal);
  display: block;
  margin-bottom: 0.35rem;
}

.tp-sec-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--tp-navy);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

.tp-sec-desc {
  font-size: 1.05rem;
  color: var(--tp-muted);
}

/* Disease Cards */
.disease-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .disease-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .disease-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.disease-card {
  background: var(--tp-card);
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.disease-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: #CBD5E1;
}

.disease-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.disease-badge.urgent {
  background: #FEE2E2;
  color: var(--tp-red);
}

.disease-badge.chronic {
  background: #FEF3C7;
  color: #B45309;
}

.disease-badge.oncology {
  background: #F3E8FF;
  color: #7E22CE;
}

.disease-badge.info {
  background: #E0F2FE;
  color: var(--tp-blue);
}

.disease-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--tp-navy);
  margin-bottom: 0.65rem;
}

.disease-desc {
  font-size: 0.93rem;
  color: var(--tp-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.disease-points {
  list-style: none;
  font-size: 0.88rem;
  color: var(--tp-text);
  margin-bottom: 1.25rem;
}

.disease-points li {
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.4rem;
}

.disease-points li::before {
  content: "•";
  color: var(--tp-blue);
  position: absolute;
  left: 0.25rem;
  font-size: 1.1rem;
  line-height: 1;
}

/* Triage Checker Box */
.triage-box {
  background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 100%);
  color: #FFFFFF;
  border-radius: 16px;
  padding: 2.5rem;
  margin-bottom: 3rem;
}

.triage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 992px) {
  .triage-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }
}

.triage-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 1.75rem;
}

.triage-card.emergency {
  border-left: 4px solid #EF4444;
}

.triage-card.routine {
  border-left: 4px solid #38BDF8;
}

.triage-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.triage-card ul {
  list-style: none;
  font-size: 0.92rem;
  color: #E2E8F0;
}

.triage-card ul li {
  margin-bottom: 0.6rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

/* Myths vs Facts */
.myths-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .myths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.myth-card {
  background: var(--tp-card);
  border: 1px solid var(--tp-border);
  border-radius: 12px;
  padding: 1.5rem;
}

.myth-header {
  color: var(--tp-red);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.myth-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tp-navy);
  margin-bottom: 0.65rem;
}

.fact-header {
  color: var(--tp-teal);
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}

.fact-text {
  font-size: 0.92rem;
  color: var(--tp-muted);
  line-height: 1.55;
}

/* Diet Box */
.diet-box {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 16px;
  padding: 2.5rem;
}

.diet-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .diet-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Footer */
.tp-footer {
  background: #0B132B;
  color: #94A3B8;
  padding: 3rem 0 2rem;
  font-size: 0.9rem;
}

.tp-footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.82rem;
}

/* Language Display Helpers */
body.lang-gu .lang-en-text {
  display: none !important;
}

body.lang-en .lang-gu-text {
  display: none !important;
}

body.lang-gu {
  font-family: var(--font-gu);
}

/* Educational Visual Callouts */
.tp-visual-box {
  background: #FFFFFF;
  border: 1px solid var(--tp-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
}

.tp-visual-media {
  width: 100%;
  position: relative;
  background: #0F172A;
}

.tp-visual-media img {
  width: 100%;
  height: auto;
  display: block;
}

.tp-visual-caption {
  padding: 1rem 1.5rem;
  background: #F8FAFC;
  border-top: 1px solid var(--tp-border);
  font-size: 0.88rem;
  color: var(--tp-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tp-visual-badge {
  background: var(--tp-blue);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
}

/* TP Navigation & Mobile Menu */
.tp-nav {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

@media (min-width: 992px) {
  .tp-nav {
    display: flex;
  }
}

.tp-nav a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tp-navy);
  text-decoration: none;
  transition: color 0.2s ease;
}

.tp-nav a:hover {
  color: var(--tp-blue);
}

.tp-nav.nav-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #FFFFFF;
  padding: 1.25rem 2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  border-bottom: 2px solid var(--tp-blue);
  z-index: 999;
  gap: 0.85rem;
  text-align: left;
}

.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

@media (min-width: 992px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.mobile-menu-toggle span {
  display: block;
  height: 2.5px;
  width: 100%;
  background: var(--tp-navy);
  border-radius: 2px;
}
