/*
Theme Name: Prime Choice Hospice
Theme URI: https://www.primechoicehospice.net/
Author: Prime Choice Hospice & Palliative Care
Author URI: https://www.primechoicehospice.net/
Description: Official WordPress theme for Prime Choice Hospice & Palliative Care — Houston, TX. Features compassionate design, blog integration, and full SEO schema markup.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Proprietary
Text Domain: primechoice
*/

/* =====================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
====================================================== */
:root {
  --prime-teal: #1A5F7A;
  --prime-coral: #E05353;
  --prime-navy: #12263A;
  --prime-softBg: #F7F9FA;
  --prime-cream: #FDFBF7;
  --prime-gold: #3BCFE0;
  --prime-goldHover: #C39262;
  --prime-lavender: #F1EFF5;
  --prime-purpleDark: #DA283E;
  --prime-purpleMuted: #45D4E2;
  --prime-charcoal: #252129;

  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-hand: 'Caveat', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background-color: var(--prime-cream);
  color: var(--prime-charcoal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

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

a { color: inherit; text-decoration: none; }

/* =====================================================
   TYPOGRAPHY
====================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  line-height: 1.2;
  color: var(--prime-purpleDark);
}

/* =====================================================
   UTILITIES
====================================================== */
.container {
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1rem;
}

@media (min-width: 640px) { .container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .container { padding-inline: 2rem; } }

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* =====================================================
   HEADER
====================================================== */
.site-header {
  width: 100%;
  background-color: rgba(253, 251, 247, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--prime-lavender);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.site-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(37,33,41,0.8);
}

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

.site-nav a:hover,
.site-nav button:hover { color: var(--prime-purpleMuted); }

/* Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > button {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  color: rgba(37,33,41,0.8);
  font-weight: 600;
  font-size: 0.875rem;
}
.nav-dropdown-icon {
  width: 1rem; height: 1rem;
  color: rgba(37,33,41,0.5);
  transition: transform 0.2s;
}
.nav-dropdown:hover .nav-dropdown-icon { transform: rotate(180deg); color: var(--prime-purpleMuted); }
.nav-dropdown:hover > button { color: var(--prime-purpleMuted); }

.dropdown-menu {
  position: absolute;
  left: 0; top: 100%;
  width: 256px;
  background: #fff;
  border: 1px solid var(--prime-lavender);
  border-radius: 0.75rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 50;
  padding: 0.5rem 0;
  margin-top: 0.25rem;
}
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; }
.dropdown-menu a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(37,33,41,0.9);
  transition: background 0.15s, color 0.15s;
}
.dropdown-menu a:hover { background: var(--prime-softBg); color: var(--prime-teal); }

/* Header actions */
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-phone {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--prime-purpleMuted);
  display: none;
}
@media (min-width: 640px) { .header-phone { display: block; } }
.header-phone:hover { text-decoration: underline; }

.btn-consultation {
  display: none;
  padding: 0.625rem 1.25rem;
  background: var(--prime-gold);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  transition: background 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
@media (min-width: 640px) { .btn-consultation { display: inline-flex; align-items: center; } }
.btn-consultation:hover { background: var(--prime-goldHover); }

/* Mobile menu toggle */
.mobile-menu-btn {
  display: flex;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--prime-charcoal);
}
@media (min-width: 768px) { .mobile-menu-btn { display: none; } }
.mobile-menu-btn svg { width: 1.5rem; height: 1.5rem; }
.mobile-menu-btn:hover { color: var(--prime-purpleMuted); }

/* Mobile menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0; width: 100%;
  background: var(--prime-cream);
  border-bottom: 1px solid var(--prime-lavender);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  z-index: 40;
}
.mobile-menu.open { display: block; }

.mobile-menu-inner {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-weight: 600;
  color: rgba(37,33,41,0.9);
}
.mobile-menu-inner a { display: block; transition: color 0.15s; }
.mobile-menu-inner a:hover { color: var(--prime-purpleMuted); }

.mobile-services-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  width: 100%;
  color: inherit;
  font-weight: 600;
}
.mobile-services-submenu {
  display: none;
  padding-left: 1rem;
  margin-top: 0.5rem;
  border-left: 2px solid var(--prime-lavender);
  margin-left: 0.5rem;
}
.mobile-services-submenu.open { display: flex; flex-direction: column; gap: 0.75rem; }
.mobile-services-submenu a { font-size: 0.875rem; font-weight: 500; }
.mobile-services-submenu a:hover { color: var(--prime-teal); }

.mobile-cta-group {
  padding-top: 1.5rem;
  margin-top: 1rem;
  border-top: 1px solid var(--prime-lavender);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mobile-cta-phone {
  text-align: center;
  font-weight: 600;
  color: var(--prime-purpleMuted);
}
.mobile-cta-phone:hover { text-decoration: underline; }
.mobile-cta-btn {
  display: block;
  text-align: center;
  padding: 0.75rem 1.25rem;
  background: var(--prime-gold);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  transition: background 0.2s;
}
.mobile-cta-btn:hover { background: var(--prime-goldHover); }

/* =====================================================
   FOOTER
====================================================== */
.site-footer {
  background-color: #022b6b;
  color: rgba(241,239,245,0.8);
  padding-top: 4rem;
  padding-bottom: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
}

.footer-logo img { height: 40px; width: auto; object-fit: contain; }
.footer-tagline {
  font-size: 0.75rem;
  color: rgba(241,239,245,0.6);
  line-height: 1.6;
  margin-top: 1rem;
}

.footer-col h5 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--prime-gold);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.footer-col ul li a {
  font-size: 0.75rem;
  color: rgba(241,239,245,0.8);
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: #fff; }

.footer-contact p {
  font-size: 0.75rem;
  color: rgba(241,239,245,0.7);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}
.footer-contact .contact-line {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}
.footer-contact a:hover { text-decoration: underline; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.6875rem;
  color: rgba(241,239,245,0.5);
}
@media (min-width: 640px) { .footer-bottom { flex-direction: row; } }
.footer-bottom-links { display: flex; gap: 1rem; }
.footer-bottom-links a:hover { color: #fff; transition: color 0.15s; }

/* =====================================================
   BLOG POSTS SECTION (Latest Articles)
====================================================== */
.latest-posts-section {
  padding-bottom: 6rem;
}
.latest-posts-section .container { }

.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .posts-grid { grid-template-columns: repeat(3, 1fr); }
}

.post-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--prime-lavender);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}
.post-card:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.post-card-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
  flex-shrink: 0;
}
.post-card-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.post-card:hover .post-card-image img { transform: scale(1.05); }

.post-card-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--prime-lavender), rgba(69,212,226,0.2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--prime-purpleMuted);
}
.post-card-image-placeholder svg { width: 3rem; height: 3rem; opacity: 0.4; }

.post-card-body { padding: 1.5rem; flex: 1; }
.post-card-category {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--prime-gold);
  display: block;
  margin-bottom: 0.5rem;
}
.post-card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--prime-purpleDark);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  transition: color 0.15s;
}
.post-card:hover .post-card-title { color: var(--prime-purpleMuted); }
.post-card-excerpt {
  font-size: 0.75rem;
  color: rgba(37,33,41,0.7);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading / error states */
.posts-loading, .posts-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: rgba(37,33,41,0.5);
}
.posts-spinner {
  width: 2.5rem; height: 2.5rem;
  border: 3px solid var(--prime-lavender);
  border-top-color: var(--prime-purpleMuted);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   MAIN CONTENT AREA
====================================================== */
.site-main { min-height: 60vh; }

/* Single post / page */
.entry-content {
  max-width: 760px;
  margin-inline: auto;
  padding: 4rem 1.5rem;
  line-height: 1.8;
  font-size: 1rem;
  color: var(--prime-charcoal);
}
.entry-content h1,
.entry-content h2,
.entry-content h3 { margin-top: 2rem; margin-bottom: 0.75rem; }
.entry-content p { margin-bottom: 1.25rem; }
.entry-content ul, .entry-content ol { margin-left: 1.5rem; margin-bottom: 1.25rem; }
.entry-content a { color: var(--prime-purpleMuted); text-decoration: underline; }

/* Blog index */
.blog-page-wrap { padding: 4rem 0; }
.blog-page-wrap .container { }
.blog-page-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--prime-purpleDark);
  margin-bottom: 0.5rem;
}
.blog-page-subtitle {
  font-size: 1rem;
  color: rgba(37,33,41,0.6);
  margin-bottom: 3rem;
}

.blog-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 640px) { .blog-posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-posts-grid { grid-template-columns: repeat(3, 1fr); } }

/* Pagination */
.blog-pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 4rem;
}
.blog-pagination a,
.blog-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid var(--prime-lavender);
  transition: background 0.15s, color 0.15s;
}
.blog-pagination a:hover { background: var(--prime-purpleMuted); color: #fff; border-color: var(--prime-purpleMuted); }
.blog-pagination .current { background: var(--prime-purpleDark); color: #fff; border-color: var(--prime-purpleDark); }

/* =====================================================
   ACCORDION (re-used across pages)
====================================================== */
.accordion-toggle { background: none; border: none; font: inherit; cursor: pointer; }
.accordion-content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.chevron { transition: transform 0.2s; }
.chevron.open { transform: rotate(180deg); }

/* =====================================================
   RESPONSIVE VIDEO
====================================================== */
@media (max-width: 767px) {
  div#video-wrapper { height: 370px; width: 100%; }
}

/* =====================================================
   SKIP LINK (ACCESSIBILITY)
====================================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--prime-purpleDark);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* =====================================================
   WIDGETS / SIDEBAR (if used)
====================================================== */
.widget { margin-bottom: 2rem; }
.widget-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--prime-gold);
  margin-bottom: 1rem;
}
