/* ==========================================================================
   RXHints WordPress Theme - Main Stylesheet
   ========================================================================== */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --teal: #16a34a;
  --teal-light: #22c55e;
  --bg: #f8fafc;
  --bg-card: #ffffff;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.08);
  --shadow-hover: 0 10px 25px -5px rgba(37, 99, 235, 0.15);
  --radius: 0.75rem;
  --radius-lg: 1rem;
  --header-height: 72px;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth;
  overflow-x: hidden;

}
.custom-logo-link img{
  width: 150px!important;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* Typography */
.section-title, .page-title, .hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

.section-title { font-size: clamp(1.75rem, 4vw, 2.25rem); }
.page-title { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: 0.5rem; }
.section-subtitle, .page-hero-subtitle { color: var(--text-muted); font-size: 1.125rem; margin-top: 0.5rem; }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius); font-weight: 600;
  font-size: 0.875rem; cursor: pointer; border: none; transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff; box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4); color: #fff; }

.btn-secondary {
  background: var(--bg-card); color: var(--primary);
  border: 2px solid var(--border);
}
.btn-secondary:hover { border-color: var(--primary); background: rgba(37, 99, 235, 0.05); color: var(--primary); }

.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* Cards */
.card-medical {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  box-shadow: var(--shadow); transition: all var(--transition);
}
.hero-search form input{
  border-radius: 10px;
  padding: 20px;
  border: navajowhite;
  box-shadow: 0px 0px 7px 0px #000000;
}

.card-medical:hover { box-shadow: var(--shadow-hover); }

.input-field {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-card); color: var(--text);
  font-size: 0.875rem; transition: border-color var(--transition);
}
.input-field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem 0; flex-wrap: wrap;
}

.site-logo, .footer-logo {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--text);
}
.footer-branding { margin-bottom: 0.25rem; }
.footer-branding .custom-logo-link { display: inline-block; }
.footer-branding .footer-logo-image { display: block; }
.logo-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff; font-weight: 800; font-size: 0.875rem; border-radius: 10px;
}
.logo-text { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; }
.logo-accent { color: var(--teal); }

.header-search { flex: 0 0 auto; width: 300px; max-width: 300px; margin-left: auto; position: relative; }
.search-form { display: flex; position: relative; }
.search-input {
  flex: 1; padding: 0.625rem 1rem; padding-right: 3rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); color: var(--text); font-size: 0.875rem;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.search-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: var(--primary); color: #fff; border: none; border-radius: 8px;
  width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; cursor: pointer;
}

.search-suggestions {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 4px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-hover); max-height: 320px; overflow-y: auto;
  display: none; z-index: 100;
}
.search-suggestions.active { display: block; }
.search-suggestion-item {
  display: block; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  color: var(--text); transition: background var(--transition);
}
.search-suggestion-item:hover { background: rgba(37, 99, 235, 0.05); }
.search-suggestion-item strong { display: block; }
.search-suggestion-item small { color: var(--text-muted); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.mobile-menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 8px;
}
.mobile-menu-toggle span {
  display: block; width: 24px; height: 2px; background: var(--text);
  transition: all var(--transition);
}

/* Navigation */
.main-nav { display: flex; align-items: center; }
.nav-menu {
  display: flex; list-style: none; gap: 0; margin: 0; padding: 0;
}
.nav-menu > li > a {
  display: flex; align-items: center; gap: 4px;
  padding: 0.875rem 1.25rem; color: var(--text); font-weight: 500;
  font-size: 0.9375rem; transition: color var(--transition);
}
.nav-menu > li > a:hover, .nav-menu > li.current-menu-item > a { color: var(--primary); }

/* Mega Menu */
.has-mega-menu { position: relative; }
.mega-menu {
  position: absolute; top: 100%; left: 0; min-width: 600px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-hover);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--transition); z-index: 200; padding: 1.5rem;
}
.has-mega-menu:hover .mega-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-menu-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
}
.mega-menu-item {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.625rem 0.75rem;
  border-radius: 8px; color: var(--text); font-size: 0.875rem;
  transition: background var(--transition);
}
.mega-menu-item:hover { background: rgba(37, 99, 235, 0.08); color: var(--primary); }
.mega-icon { font-size: 1.25rem; }
.mega-menu-footer { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); text-align: center; }
.mega-menu-toggle { display: none; }

/* Hero */
.hero-section {
  position: relative; padding: 5rem 0; overflow: hidden;
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 50%, #ffffff 100%);
}
.hero-bg {
  position: absolute; inset: 0; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232563eb' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; text-align: center; max-width: 800px; margin: 0 auto; }
.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  background: linear-gradient(135deg, var(--primary), var(--teal));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin-bottom: 1rem;
}
.hero-subtitle { font-size: 1.125rem; color: var(--text-muted); margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-search { max-width: 560px; margin: 0 auto 1.5rem; }
.hero-search form { display: flex; gap: 0.5rem; }
.hero-search-input { flex: 1; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* Stats */
.stats-section { padding: 3rem 0; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-item { text-align: center; padding: 1rem; }
.stat-number { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }

/* Sections */
.section { padding: 4rem 0; }
.section-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.section-header.text-center { justify-content: center; text-align: center; }
.section-link { color: var(--primary); font-weight: 600; font-size: 0.9375rem; }

/* Categories Grid */
.categories-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
@media (min-width: 640px) { .categories-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .categories-grid { grid-template-columns: repeat(5, 1fr); } }

.category-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-align: center; padding: 1.25rem; color: var(--text);
  transition: transform var(--transition), box-shadow var(--transition);
}
.category-card:hover { transform: translateY(-6px); color: var(--primary); }
.category-name { font-weight: 600; font-size: 0.875rem; }

/* Looping float animation for category icons */
.category-icon {
  font-size: 2rem; display: inline-block;
  animation: rxCategoryFloat 3s ease-in-out infinite;
  will-change: transform;
}
.category-card:nth-child(5n + 1) .category-icon { animation-delay: 0s; }
.category-card:nth-child(5n + 2) .category-icon { animation-delay: 0.3s; }
.category-card:nth-child(5n + 3) .category-icon { animation-delay: 0.6s; }
.category-card:nth-child(5n + 4) .category-icon { animation-delay: 0.9s; }
.category-card:nth-child(5n + 5) .category-icon { animation-delay: 1.2s; }
.category-card:hover .category-icon {
  animation: rxCategoryPop 0.6s ease-in-out infinite;
}

@keyframes rxCategoryFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
}

@keyframes rxCategoryPop {
  0%, 100% { transform: translateY(-4px) scale(1.05); }
  50% { transform: translateY(-8px) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .category-icon, .category-card:hover .category-icon { animation: none; }
}

/* Medicine Grid */
.medicine-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 640px) { .medicine-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .medicine-grid { grid-template-columns: repeat(3, 1fr); } }

.medicine-card-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.medicine-card-title a { color: var(--text); }
.medicine-card-title a:hover { color: var(--primary); }
.medicine-card-generic { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.medicine-card-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.meta-tag {
  font-size: 0.75rem; padding: 0.25rem 0.625rem; background: rgba(37, 99, 235, 0.08);
  border-radius: 999px; color: var(--primary);
}
.medicine-card-desc { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 1rem; line-height: 1.5; flex: 1; }
.medicine-card .btn-secondary { margin-top: auto; align-self: flex-start; }

.brand-names-list {
  list-style: none; padding: 0; margin: 0.75rem 0 0;
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.brand-names-list li a {
  display: inline-block; padding: 0.375rem 0.875rem;
  background: rgba(37, 99, 235, 0.08); border-radius: 999px;
  font-size: 0.875rem; font-weight: 500; color: var(--primary);
}
.brand-names-list li a:hover {
  background: var(--primary); color: #fff;
}

.medicine-section-content h3 {
  font-size: 1rem; font-weight: 600; margin: 1.25rem 0 0.5rem;
  color: var(--text);
}
.medicine-section-content h3:first-child { margin-top: 0; }

/* Articles Grid */
.articles-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 768px) { .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .articles-grid { grid-template-columns: repeat(3, 1fr); } }

.article-card { padding: 0; overflow: hidden; }
.article-card-image { display: block; aspect-ratio: 16/10; overflow: hidden; }
.article-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition); }
.article-card:hover .article-card-image img { transform: scale(1.05); }
.article-card-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eff6ff, #f0fdf4); color: var(--primary);
}
.article-card-body { padding: 1.25rem; }
.article-category {
  display: inline-block; font-size: 0.75rem; font-weight: 600;
  color: var(--teal); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem;
}
.article-card-title { font-size: 1.0625rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.article-card-title a { color: var(--text); }
.article-card-excerpt { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.article-card-meta { display: flex; gap: 0.75rem; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.75rem; flex-wrap: wrap; }
.read-more { font-weight: 600; font-size: 0.875rem; color: var(--primary); }

/* Why Choose */
.why-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
@media (min-width: 768px) { .why-grid { grid-template-columns: repeat(3, 1fr); } }
.why-card { display: flex; align-items: center; gap: 0.75rem; font-weight: 600; }
.why-check { color: var(--teal); font-size: 1.25rem; }

/* Newsletter */
.newsletter-box { text-align: center; padding: 3rem; background: linear-gradient(135deg, rgba(37,99,235,0.05), rgba(13,148,136,0.05)); }
.newsletter-form { display: flex; gap: 0.5rem; max-width: 480px; margin: 1.5rem auto 0; flex-wrap: wrap; }
.newsletter-form-inline .input-field { flex: 1; min-width: 200px; }

/* CTA */
.cta-box {
  text-align: center; padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  border-radius: var(--radius-lg); color: #fff;
}
.cta-box h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.5rem; }
.cta-box p { opacity: 0.9; margin-bottom: 1.5rem; }
.cta-box .btn-primary { background: #fff; color: var(--primary); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }

/* Page Hero */
.page-hero { padding: 3rem 0; text-align: center; background: linear-gradient(135deg, #eff6ff, #f0fdf4); }
.page-hero-title { font-size: clamp(2rem, 4vw, 2.75rem); margin-bottom: 0.5rem; }
.page-hero-search { max-width: 600px; margin: 1.5rem auto 0; }
.page-hero-search form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.page-hero-search .input-field { flex: 1; min-width: 200px; }
.page-hero-drugs { padding: 1.5rem 0; }

/* Drugs listing */
.alphabet-nav-section {
  padding: 0.75rem 0; background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: var(--header-height); z-index: 900;
}
.alphabet-nav-wrap {
  display: flex; align-items: center; gap: 0.35rem;
  position: relative;
}
.alphabet-scroll {
  flex-shrink: 0; display: flex;
  width: 36px; height: 36px; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: #334155; color: #fff;
  cursor: pointer; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
  transition: background var(--transition), opacity var(--transition);
}
.alphabet-scroll:hover { background: var(--primary); }
.alphabet-scroll:disabled { opacity: 0.35; cursor: default; }
.alphabet-nav {
  display: flex; gap: 0.25rem; overflow-x: auto; padding: 0.35rem 0;
  scrollbar-width: none; -ms-overflow-style: none; flex: 1; min-width: 0;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch;
}
.alphabet-nav::-webkit-scrollbar { display: none; }
.alpha-letter {
  flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-weight: 600; font-size: 0.875rem; color: var(--text-muted);
  transition: all var(--transition);
}
.alpha-letter:hover, .alpha-letter.active {
  background: var(--primary); color: #fff;
}

/* Drugs listing */
.drugs-listing-section { min-height: 200px; }
.drugs-filter-bar {
  margin-bottom: 1.25rem; padding: 1rem 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.drugs-filter-form {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; width: 100%;
}
.drugs-filter-label {
  font-weight: 600; font-size: 0.9375rem; color: var(--text); margin: 0;
  flex: 0 0 100%;
}
@media (min-width: 640px) {
  .drugs-filter-label { flex: 0 0 auto; }
}
.drugs-letter-select {
  flex: 1; min-width: 180px;
  padding: 0.75rem 1rem; cursor: pointer;
}
.drugs-letter-search-btn {
  flex-shrink: 0; min-width: 120px;
}
#medicines-results.is-loading { opacity: 0.5; pointer-events: none; }
.drugs-results-header { margin-bottom: 1.25rem; }
.results-count { font-size: 0.9375rem; font-weight: 600; color: var(--text); }

/* Medicine cards — drug grid on letter click */
.medicine-card {
  display: flex; flex-direction: column; height: 100%;
  padding: 1.25rem;
}
.medicine-card-header { margin-bottom: 0.25rem; }

/* Breadcrumbs */
.breadcrumbs {
  display: flex; align-items: center; gap: 0.5rem; padding: 1rem 0;
  font-size: 0.875rem; color: var(--text-muted); flex-wrap: wrap;
}
.breadcrumb-current { color: var(--text); font-weight: 500; }
.breadcrumb-sep { color: var(--text-muted); }

/* Medicine Detail */
.medicine-banner {
  position: relative; width: 100%; max-height: 360px; overflow: hidden;
}
.medicine-banner-img {
  display: block; width: 100%; height: 100%; max-height: 360px; object-fit: cover;
}
.medicine-banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,23,42,0) 40%, rgba(15,23,42,0.25) 100%);
  pointer-events: none;
}
@media (max-width: 768px) {
  .medicine-banner, .medicine-banner-img { max-height: 220px; }
}
.medicine-header { margin-bottom: 1.5rem; }
.medicine-header-top { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.medicine-title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.medicine-meta-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem;
}
.meta-item { font-size: 0.875rem; }
.medicine-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: flex-start; }
.share-dropdown { position: relative; }
.share-menu {
  position: absolute; top: 100%; right: 0; margin-top: 4px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-hover); min-width: 140px; display: none; z-index: 10;
}
.share-dropdown:hover .share-menu { display: block; }
.share-menu a { display: block; padding: 0.5rem 1rem; color: var(--text); font-size: 0.875rem; }
.share-menu a:hover { background: rgba(37, 99, 235, 0.05); }

.warning-box {
  border-left: 4px solid #ef4444; background: #fef2f2;
  padding: 1.25rem 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem;
}
.medicine-content { display: flex; flex-direction: column; gap: 1rem; }
.medicine-section-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left; padding: 0;
}
.medicine-section-title { font-size: 1.125rem; font-weight: 700; }
.toggle-icon { transition: transform var(--transition); color: var(--text-muted); flex-shrink: 0; }
.medicine-section-toggle[aria-expanded="false"] .toggle-icon { transform: rotate(-90deg); }
.medicine-section-toggle[aria-expanded="false"] + .medicine-section-content { display: none; }
.medicine-section-content { margin-top: 1rem; }
.medicine-section-content h3 { font-size: 1rem; font-weight: 600; margin: 1rem 0 0.5rem; }

/* Prose */
.prose-medical { line-height: 1.75; }
.prose-medical h2, .prose-medical h3 { margin-top: 1.5rem; margin-bottom: 0.75rem; font-family: var(--font-display); }
.prose-medical p { margin-bottom: 1rem; }
.prose-medical ul, .prose-medical ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.prose-medical li { margin-bottom: 0.25rem; }
.prose-medical table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.prose-medical th, .prose-medical td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; text-align: left; }
.prose-medical blockquote { border-left: 4px solid var(--primary); padding-left: 1rem; margin: 1rem 0; color: var(--text-muted); font-style: italic; }

/* Article Detail */
.article-header { margin-bottom: 2rem; }
.article-title { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0.75rem 0; }
.article-meta { display: flex; align-items: center; gap: 0.5rem; color: var(--text-muted); font-size: 0.875rem; flex-wrap: wrap; }
.article-featured-image { margin-bottom: 2rem; border-radius: var(--radius-lg); overflow: hidden; }
.share-btn {
  padding: 0.5rem 1rem; border-radius: 8px; background: rgba(37, 99, 235, 0.08);
  color: var(--primary); font-size: 0.875rem; font-weight: 500; text-align: center;
}

/* Single Article - Simple Full Width */
.single-article { padding: 1.5rem 0 4rem; }
.single-article-header { margin: 1rem 0 2rem; }
.single-article-title {
  font-family: var(--font-display); font-weight: 800; line-height: 1.2;
  font-size: clamp(2rem, 5vw, 3rem); margin: 0.75rem 0 1rem;
}
.single-article-image {
  margin-bottom: 2.5rem; border-radius: var(--radius-lg); overflow: hidden;
}
.single-article-image img { width: 100%; height: auto; object-fit: cover; }
.single-article-content { font-size: 1.0625rem; }
.single-article-content > * { max-width: 60rem; }
.single-article-content > p:first-of-type { font-size: 1.1875rem; color: var(--text); }
.single-article-share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 1rem;
  margin: 2.5rem 0; padding: 1.25rem 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.share-label { font-weight: 600; font-size: 0.9375rem; }
.share-buttons-inline { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.article-categories-filter {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem;
}
.filter-tag { text-decoration: none; }

/* Contact */
.page-content { padding: 2rem 0 4rem; }
.contact-grid { display: grid; gap: 2rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1.5fr 1fr; } }
.form-row { display: grid; gap: 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 500; margin-bottom: 0.5rem; font-size: 0.875rem; }
.map-card { padding: 0; overflow: hidden; }
.map-embed { display: block; width: 100%; height: 280px; border: 0; }
.faq-list details { border-bottom: 1px solid var(--border); padding: 0.75rem 0; }
.faq-list summary { cursor: pointer; font-weight: 600; font-size: 0.9375rem; }
.faq-list p { margin-top: 0.5rem; font-size: 0.875rem; color: var(--text-muted); }

/* Contact Form 7 - RXHints Theme Styles */
.rxhints-cf7-wrap .wpcf7-form { margin: 0; }
.rxhints-cf7-wrap .wpcf7-form p { margin: 0 0 1rem; }
.rxhints-cf7-wrap .wpcf7-form .form-row {
  display: grid; gap: 1rem; margin-bottom: 1rem;
}
@media (min-width: 640px) {
  .rxhints-cf7-wrap .wpcf7-form .form-row { grid-template-columns: 1fr 1fr; }
}
.rxhints-cf7-wrap .form-group { margin-bottom: 1rem; }
.rxhints-cf7-wrap .form-group label {
  display: block; font-weight: 500; margin-bottom: 0.5rem; font-size: 0.875rem; color: var(--text);
}
.rxhints-cf7-wrap .wpcf7-form-control {
  width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--bg-card); color: var(--text);
  font-size: 0.875rem; font-family: inherit; transition: border-color var(--transition);
  box-sizing: border-box;
}
.rxhints-cf7-wrap .wpcf7-form-control:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.rxhints-cf7-wrap textarea.wpcf7-form-control {
  min-height: 150px; resize: vertical;
}
.rxhints-cf7-wrap .wpcf7-submit {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border: none; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff; font-weight: 600; font-size: 0.875rem; cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all var(--transition); font-family: inherit;
}
.rxhints-cf7-wrap .wpcf7-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.rxhints-cf7-wrap .wpcf7-not-valid-tip {
  color: #ef4444; font-size: 0.8125rem; margin-top: 0.35rem; display: block;
}
.rxhints-cf7-wrap .wpcf7-form-control.wpcf7-not-valid {
  border-color: #ef4444;
}
.rxhints-cf7-wrap .wpcf7-response-output {
  margin: 1rem 0 0; padding: 0.875rem 1rem; border-radius: var(--radius);
  font-size: 0.875rem; border: 1px solid var(--border);
}
.rxhints-cf7-wrap .wpcf7 form.sent .wpcf7-response-output {
  border-color: var(--teal); background: rgba(22, 163, 74, 0.08); color: #166534;
}
.rxhints-cf7-wrap .wpcf7 form.failed .wpcf7-response-output,
.rxhints-cf7-wrap .wpcf7 form.invalid .wpcf7-response-output {
  border-color: #ef4444; background: #fef2f2; color: #991b1b;
}
.rxhints-cf7-wrap .wpcf7-spinner { margin-left: 0.5rem; }
.cf7-notice { color: var(--text-muted); font-size: 0.9375rem; }

/* Empty State */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state-icon { color: var(--text-muted); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-muted); }

/* Pagination */
.pagination-wrap { margin-top: 2rem; }
.pagination-wrap .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 0.5rem; margin: 0 2px;
  border-radius: 8px; font-size: 0.875rem; color: var(--text);
  border: 1px solid var(--border); transition: all var(--transition);
}
.pagination-wrap .page-numbers.current, .pagination-wrap .page-numbers:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* Footer */
.site-footer { background: #0f172a; color: #94a3b8; margin-top: 4rem; }
.footer-main { padding: 4rem 0 2rem; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 2rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; } }
.footer-logo .logo-text { color: #fff; }
.footer-desc { margin: 1rem 0; font-size: 0.875rem; line-height: 1.6; }
.footer-title { color: #fff; font-size: 0.9375rem; font-weight: 700; margin-bottom: 1rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { color: #94a3b8; font-size: 0.875rem; transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; flex-wrap: wrap; gap: 0.625rem; margin-top: 1.25rem; }
.footer-social .social-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1); color: #cbd5e1;
  transition: all var(--transition);
}
.footer-social .social-icon svg { width: 18px; height: 18px; }
.footer-social .social-icon:hover {
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff; transform: translateY(-2px);
}
.footer-newsletter p { font-size: 0.875rem; margin-bottom: 0.75rem; }
.footer-email { margin-top: 1rem; font-size: 0.875rem; }
.footer-email a { color: var(--teal-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 0; }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem; font-size: 0.8125rem;
}
.footer-legal { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer-legal a { color: #94a3b8; }
.footer-legal a:hover { color: #fff; }
.footer-disclaimer { font-size: 0.75rem; margin-top: 1rem; opacity: 0.7; line-height: 1.5; }

/* Back to top */
.back-to-top {
  position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 999;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--teal));
  color: #fff; cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition), box-shadow var(--transition);
}
.back-to-top.is-visible {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.back-to-top:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
  transform: translateY(-2px);
}
.back-to-top.is-visible:hover { transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity 0.2s, visibility 0.2s; }
}

/* Toast */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  padding: 0.875rem 1.25rem; border-radius: var(--radius); background: var(--bg-card);
  border: 1px solid var(--border); box-shadow: var(--shadow-hover);
  font-size: 0.875rem; animation: slideIn 0.3s ease;
  max-width: 360px;
}
.toast.success { border-left: 4px solid var(--teal); }
.toast.error { border-left: 4px solid #ef4444; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.category-icon-lg { font-size: 3rem; display: block; margin-bottom: 0.5rem; }

/* Mobile */
@media (max-width: 768px) {
  .site-branding { order: 1; }
  .header-actions { order: 2; margin-left: auto; }
  .header-search { order: 3; flex: 1 1 100%; width: 100%; max-width: 100%; margin-left: 0; }
  .main-nav { order: 4; flex: 1 1 100%; }
  .mobile-menu-toggle { display: flex; }

  /* Animate hamburger into an X when open */
  .mobile-menu-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .mobile-menu-toggle.is-active span:nth-child(2) { opacity: 0; }
  .mobile-menu-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .main-nav { display: none; }
  .main-nav.active { display: block; }
  .nav-menu { flex-direction: column; }
  .nav-menu > li { border-bottom: 1px solid var(--border); }
  .nav-menu > li:last-child { border-bottom: none; }
  .nav-menu > li > a { padding: 0.875rem 0.25rem; justify-content: space-between; }
  .has-mega-menu { display: flex; flex-wrap: wrap; align-items: center; }
  .has-mega-menu .nav-drugs-link {
    flex: 1; padding: 0.875rem 0.25rem; justify-content: flex-start;
  }
  .mega-menu-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: auto;
    border: none; background: transparent; color: var(--text);
    border-radius: var(--radius); cursor: pointer;
  }
  .mega-menu-toggle svg { transition: transform var(--transition); }
  .has-mega-menu.open .mega-menu-toggle svg { transform: rotate(180deg); }

  /* Drugs parent toggle caret (legacy menus) */
  .has-mega-menu > a svg { transition: transform var(--transition); margin-left: auto; }
  .has-mega-menu.open > a svg { transform: rotate(180deg); }

  /* Mega menu collapsed by default on mobile */
  .mega-menu {
    position: static; min-width: auto; box-shadow: none; border: none;
    border-radius: 0; padding: 0; transform: none;
    opacity: 1; visibility: visible;
    max-height: 0; overflow: hidden;
    transition: max-height var(--transition), padding var(--transition);
  }
  .has-mega-menu:hover .mega-menu { /* disable hover-open on touch */
    max-height: 0;
  }
  .has-mega-menu.open .mega-menu {
    max-height: 1000px; padding: 0.25rem 0 0.75rem 0.75rem;
  }
  .mega-menu-grid { grid-template-columns: repeat(2, 1fr); }
  .mega-menu-footer { margin-top: 0.75rem; }

  .alphabet-nav-section {
    top: var(--header-height);
    padding: 0.5rem 0;
  }
  .alphabet-nav-wrap .container { padding: 0 0.5rem; }
  .alpha-letter { width: 40px; height: 40px; font-size: 0.9375rem; }

  /* Compact drugs page hero on mobile — A–Z bar stays visible first */
  .post-type-archive-medicine .page-hero-drugs {
    padding: 1rem 0 1.25rem;
    text-align: left;
  }
  .post-type-archive-medicine .page-hero-drugs .page-hero-title {
    font-size: 1.375rem; margin-bottom: 0.25rem;
  }
  .post-type-archive-medicine .page-hero-drugs .page-hero-subtitle { display: none; }
  .post-type-archive-medicine .page-hero-drugs .page-hero-search {
    margin: 0.75rem 0 0; max-width: none;
  }
  .post-type-archive-medicine .page-hero-drugs .page-hero-search form {
    flex-direction: column;
  }
  .post-type-archive-medicine .drugs-listing-section {
    padding-top: 1.25rem;
  }

  .medicine-header-top { flex-direction: column; }
}

/* Print */
@media print {
  .site-header, .site-footer, .no-print, .alphabet-nav-section { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  .card-medical { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* Accessibility */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-content, .stat-item, .category-card, .medicine-card, .article-card {
  animation: fadeInUp 0.5s ease backwards;
}
