/*
Theme Name: TrioMRR Theme
Theme URI: https://www.triomrr.com
Author: TrioMRR
Author URI: https://www.triomrr.com
Description: A clean, custom theme for TrioMRR — consultant pharmacist software for long-term care. No page builder dependencies.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: Private
License URI: https://www.triomrr.com
Text Domain: triomrr
*/

/* ==========================================================================
   CSS RESET & VARIABLES
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy-900: #0c1117;
  --navy-800: #131b24;
  --navy-700: #1c2736;
  --navy-600: #263348;
  --slate-500: #5e6b7a;
  --slate-400: #8594a6;
  --slate-300: #b8c4d0;
  --slate-200: #dce3ea;
  --slate-100: #eef2f5;
  --slate-50: #f6f8fa;
  --white: #ffffff;
  --accent-600: #c8910a;
  --accent-500: #d9a21e;
  --accent-400: #e8b840;
  --accent-300: #f0cc6a;
  --teal-500: #1a8a7d;
  --teal-400: #2cb8a6;
  --teal-300: #5cd4c4;
  --amber-400: #e8b840;
  --font-display: 'Manrope', Helvetica, Arial, Lucida, sans-serif;
  --font-body: 'Manrope', Helvetica, Arial, Lucida, sans-serif;
  --section-pad: clamp(4rem, 8vw, 7rem);
  --content-max: 1140px;
  --content-narrow: 720px;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-body);
  color: var(--navy-900);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.container--narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-500);
  margin-bottom: 1rem;
  display: inline-block;
}

.eyebrow--light { color: var(--teal-300); }

.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-heading--lg { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.section-heading--md { font-size: clamp(1.65rem, 3.5vw, 2.5rem); }
.section-heading--sm { font-size: clamp(1.35rem, 2.5vw, 1.85rem); }

.body-text {
  font-size: 1.05rem;
  color: var(--slate-500);
  line-height: 1.7;
  max-width: 600px;
}

.body-text--light { color: var(--slate-300); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent-500);
  color: var(--navy-900);
}
.btn--primary:hover {
  background: var(--accent-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(217,162,30,0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--navy-900);
  border: 1.5px solid var(--slate-300);
}
.btn--secondary:hover {
  border-color: var(--navy-900);
  background: var(--slate-50);
}

.btn--secondary-light {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.3);
}
.btn--secondary-light:hover {
  border-color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.08);
}

.btn--ghost {
  background: transparent;
  color: var(--accent-500);
  padding: 0;
  font-weight: 600;
}
.btn--ghost:hover { color: var(--accent-600); }
.btn--ghost svg { transition: transform 0.2s; }
.btn--ghost:hover svg { transform: translateX(3px); }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow 0.3s;
}

.site-header--scrolled {
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-link img {
  height: 32px;
  width: auto;
  filter: brightness(0.25) contrast(1.2);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--slate-500);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--navy-900); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-actions .btn { padding: 0.6rem 1.25rem; font-size: 0.875rem; }

.portal-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--slate-500);
  transition: color 0.2s;
}
.portal-link:hover { color: var(--navy-900); }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy-900);
  margin: 5px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  .nav-links { display: none; }
  .nav-actions .portal-link { display: none; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--slate-200);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  padding: 2.5rem 0;
  background: var(--navy-900);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-logo img { height: 24px; filter: brightness(0) invert(1); }

.footer-copy {
  font-size: 0.8rem;
  color: var(--slate-400);
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--slate-400);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--white); }

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  transition: background 0.2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.12); }
.footer-social svg {
  width: 16px;
  height: 16px;
  fill: var(--slate-400);
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-left { flex-direction: column; }
}

/* ==========================================================================
   CONTENT PAGE STYLES (for terms, privacy, blog, etc.)
   ========================================================================== */
.page-content {
  padding-top: calc(72px + var(--section-pad));
  padding-bottom: var(--section-pad);
}

.page-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--navy-900);
  margin-bottom: 1.5rem;
}

.page-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--navy-900);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.page-content h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy-900);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.page-content p {
  font-size: 1.05rem;
  color: var(--slate-500);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: var(--slate-500);
}

.page-content li {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 0.4rem;
}

.page-content a {
  color: var(--teal-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.page-content a:hover { color: var(--accent-500); }

.page-content blockquote {
  border-left: 3px solid var(--accent-500);
  padding-left: 1.25rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--slate-500);
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.page-content th,
.page-content td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.95rem;
}

.page-content th {
  font-weight: 600;
  color: var(--navy-900);
  background: var(--slate-50);
}

.page-content td {
  color: var(--slate-500);
}

.page-content img {
  border-radius: 8px;
  margin: 1.5rem 0;
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--slate-200);
  margin: 2rem 0;
}

/* Last updated / meta info */
.page-meta {
  font-size: 0.85rem;
  color: var(--slate-400);
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--slate-200);
}

/* ==========================================================================
   BLOG STYLES
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.blog-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.5rem;
}

.blog-card-body h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy-900);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.blog-card-body h2 a:hover { color: var(--teal-500); }

.blog-card-date {
  font-size: 0.8rem;
  color: var(--slate-400);
  margin-bottom: 0.5rem;
}

.blog-card-excerpt {
  font-size: 0.9rem;
  color: var(--slate-500);
  line-height: 1.6;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-children .animate-in:nth-child(1) { transition-delay: 0ms; }
.stagger-children .animate-in:nth-child(2) { transition-delay: 80ms; }
.stagger-children .animate-in:nth-child(3) { transition-delay: 160ms; }
.stagger-children .animate-in:nth-child(4) { transition-delay: 240ms; }
.stagger-children .animate-in:nth-child(5) { transition-delay: 320ms; }
.stagger-children .animate-in:nth-child(6) { transition-delay: 400ms; }

/* ==========================================================================
   WORDPRESS ADMIN BAR COMPATIBILITY
   ========================================================================== */
.admin-bar .site-header {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}
