/**
 * Modern V2 Theme
 * Clean, professional healthcare aesthetic inspired by Village Rise Pharmacy.
 * Structured sections, clean typography, trustworthy feel.
 * Uses CSS custom properties for brand colors (--color-primary, --color-secondary, --color-accent)
 */

/* ============================================
   TRANSITIONS & ANIMATIONS
   ============================================ */
.theme * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.theme img,
.theme video {
  transition: transform 0.4s ease, box-shadow 0.3s ease;
}

/* Force cover on all fill images - target Next.js data-nimg attribute */
.theme img[data-nimg] {
  object-fit: cover !important;
}

/* Scale images slightly to hide AI-generated white/rounded corners baked into image files */
.theme .grid-card-image img {
  transform: scale(1.08);
}

.theme .grid-card-image {
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 0;
  height: 14rem;
}

.theme .grid-card-content {
  padding: 1.5rem;
}

/* ============================================
   NAVIGATION / HEADER
   ============================================ */
.theme .site-nav {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06) !important;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.theme .site-nav:hover {
  background: #ffffff !important;
}

/* Fixed nav - always out of document flow when transparent header is enabled */
.theme .site-nav.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 40;
}

/* Transparent nav state - applied when nav is at top of page over hero */
.theme .site-nav.nav-transparent {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 70%, transparent 100%) !important;
  border-bottom: none !important;
  box-shadow: none !important;
}

.theme .site-nav.nav-transparent .nav-logo-text {
  color: #ffffff;
}

.theme .site-nav.nav-transparent .nav-link {
  color: rgba(255, 255, 255, 0.9);
}

.theme .site-nav.nav-transparent .nav-link:hover {
  color: #ffffff;
}

.theme .site-nav.nav-transparent .nav-dropdown-toggle {
  color: rgba(255, 255, 255, 0.9);
}

.theme .site-nav.nav-transparent .nav-mobile-toggle {
  color: #ffffff;
}

/* Scroll logo visibility */
.theme .nav-logo-image.logo-default {
  display: block;
}

.theme .nav-logo-image.logo-scroll {
  display: none;
}

.theme .site-nav.nav-transparent .nav-logo-image.logo-default {
  display: none;
}

.theme .site-nav.nav-transparent .nav-logo-image.logo-scroll {
  display: block;
}

.theme nav a {
  position: relative;
  font-weight: 500;
}

.theme nav a:not([class*="bg-"])::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
}

.theme nav a:not([class*="bg-"]):hover::after {
  width: 80%;
}

.theme .site-nav.nav-transparent nav a:not([class*="bg-"])::after {
  background: #ffffff;
}

/* Nav Dropdown */
.theme .nav-dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
  border-radius: 6px !important;
  padding: 0.5rem !important;
}

.theme .nav-dropdown-menu a {
  color: #2F3B40 !important;
  border-radius: 4px;
  margin-bottom: 2px;
}

.theme .nav-dropdown-menu a:hover {
  background: rgba(var(--color-primary-rgb), 0.08) !important;
  color: var(--color-primary) !important;
}

/* Nav CTA Button */
.theme nav a[class*="bg-"],
.theme .nav-cta {
  background: var(--color-primary) !important;
  border-radius: 6px !important;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  font-size: 0.8125rem;
  padding: 0.45rem 0.95rem;
}

.theme nav a[class*="bg-"]:hover,
.theme .nav-cta:hover {
  transform: none;
  filter: brightness(0.9);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.25);
}


/* ============================================
   HERO SECTIONS
   ============================================ */
.theme .hero-section {
  background: #1a1a2e !important;
  position: relative;
  overflow: hidden;
  padding: 120px 0;
  display: flex;
  align-items: center;
  min-height: 600px;
}

/* Show full-page background image */
.theme .hero-bg-image {
  display: block !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover !important;
  background-position: center !important;
  z-index: 0;
}

/* Dark overlay on top of the background image */
.theme .hero-overlay {
  background: rgba(0, 0, 0, 0.5) !important;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}

/* White text for dark hero background */
.theme .hero-title {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.theme .hero-description {
  color: rgba(255, 255, 255, 0.9) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

.theme .hero-section::before {
  display: none;
}

.theme .hero-container {
  display: block;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
  width: 100%;
}

.theme .hero-content {
  text-align: left;
  max-width: 600px;
}

.theme .hero-title {
  font-size: 3.5rem;
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 1.25rem;
  -webkit-text-fill-color: unset;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.theme .hero-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Hide the split hero image - background image is used instead */
.theme .hero-image {
  display: none !important;
}

.theme .hero-buttons {
  display: flex;
  gap: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .theme .hero-section {
    padding: 60px 0 40px;
    min-height: auto;
  }

  .theme .hero-content {
    text-align: center;
    max-width: 100%;
  }

  .theme .hero-title {
    font-size: 2rem;
  }

  .theme .hero-description {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
  }

  .theme .hero-buttons {
    justify-content: center;
  }

  .theme .hero-cta.primary,
  .theme .hero-cta.secondary {
    padding: 12px 24px;
    font-size: 0.8125rem;
  }
}

/* Hero CTA Buttons */
.theme .hero-cta.primary {
  background: var(--color-primary) !important;
  background-size: unset !important;
  border-radius: 6px !important;
  box-shadow: none;
  border: none !important;
  animation: none;
  padding: 17px 35px;
  color: white;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
}

.theme .hero-cta.primary:hover {
  transform: none;
  filter: brightness(0.9);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.3);
}

.theme .hero-cta.secondary {
  background: transparent !important;
  border: 2px solid rgba(255, 255, 255, 0.6) !important;
  border-radius: 6px !important;
  color: #ffffff !important;
  font-weight: 500 !important;
  padding: 17px 35px;
  text-decoration: none;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
}

.theme .hero-cta.secondary:hover {
  background: rgba(255, 255, 255, 0.15) !important;
  border-color: #ffffff !important;
  color: white !important;
}

/* ============================================
   GRID SECTION
   ============================================ */
.theme .grid-section {
  background: #ffffff;
  padding: 5rem 0;
}

.theme .grid-container {
  max-width: 1200px;
}

.theme .grid-items.grid-gap-none { gap: 0 !important; }
.theme .grid-items.grid-gap-small { gap: 0.75rem !important; }
.theme .grid-items.grid-gap-medium { gap: 2rem !important; }
.theme .grid-items.grid-gap-large { gap: 3rem !important; }

/* Flush cards - connected look */
.theme .grid-items.grid-gap-none .grid-card {
  border-radius: 0;
}

.theme .grid-items.grid-gap-none .grid-card:first-child {
  border-radius: 6px 0 0 6px;
}

.theme .grid-items.grid-gap-none .grid-card:last-child {
  border-radius: 0 6px 6px 0;
}

.theme .grid-items.grid-gap-none .grid-card:only-child {
  border-radius: 6px;
}

@media (max-width: 767px) {
  .theme .grid-items.grid-gap-none .grid-card {
    border-radius: 0;
  }

  .theme .grid-items.grid-gap-none .grid-card:first-child {
    border-radius: 6px 6px 0 0;
  }

  .theme .grid-items.grid-gap-none .grid-card:last-child {
    border-radius: 0 0 6px 6px;
  }

  .theme .grid-items.grid-gap-none .grid-card:only-child {
    border-radius: 6px;
  }
}

.theme .grid-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
}

.theme .grid-description {
  color: #5a6370;
  font-size: 1.05rem;
}

/* ============================================
   ALTERNATING SECTION BACKGROUNDS
   ============================================ */
.theme .paragraph-image-section:nth-of-type(odd) {
  background: rgba(var(--color-primary-rgb), 0.03);
}

.theme .paragraph-image-section:nth-of-type(even) {
  background: #ffffff;
}

.theme .paragraph-image-section {
  padding: 5rem 0;
}

.theme .paragraph-image-container {
  max-width: 1200px;
}

.theme .paragraph-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 1rem;
}

.theme .paragraph-text {
  color: #5a6370;
  font-size: 1.05rem;
  line-height: 1.8;
}

.theme .grid-card {
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  padding: 0;
}

.theme .grid-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.theme .grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.theme .grid-card:hover::before {
  opacity: 1;
}

.theme .grid-card-icon {
  background: var(--color-primary);
  border-radius: 6px;
  box-shadow: none;
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.25rem;
  margin: 1.5rem 1.5rem 1.25rem;
}

.theme .grid-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 0.75rem;
}

.theme .grid-card-description {
  color: #5a6370;
  line-height: 1.7;
  font-size: 0.95rem;
}

.theme .grid-card-button {
  background: var(--color-primary);
  border-radius: 6px;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  margin-top: 0.5rem;
}

.theme .grid-card-button:hover {
  transform: none;
  filter: brightness(0.9);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.25);
}

/* Cards without images need padding on the card itself */
.theme .grid-card.layout-horizontal {
  padding: 1.5rem;
}

/* Per-card background */
.theme .grid-card.has-card-bg {
  color: white;
  border-color: transparent;
  padding: 1.5rem;
}

.theme .grid-card.has-card-bg .grid-card-title {
  color: white;
}

.theme .grid-card.has-card-bg .grid-card-description {
  color: rgba(255, 255, 255, 0.85);
}

.theme .grid-card.has-card-bg .grid-card-icon {
  background: rgba(255, 255, 255, 0.2);
}

.theme .grid-card.has-card-bg::before {
  display: none;
}

/* Overlap hero */
.theme .grid-section.grid-overlap-hero {
  position: relative;
  z-index: 5;
  padding-top: 0;
  background: transparent;
}

.theme .grid-section.grid-overlap-hero .grid-card {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.theme .grid-section.grid-overlap-small { margin-top: -2rem; }
.theme .grid-section.grid-overlap-medium { margin-top: -3rem; }
.theme .grid-section.grid-overlap-large { margin-top: -5rem; }

@media (min-width: 768px) {
  .theme .grid-section.grid-overlap-small { margin-top: -3rem; }
  .theme .grid-section.grid-overlap-medium { margin-top: -5rem; }
  .theme .grid-section.grid-overlap-large { margin-top: -8rem; }
}

/* ============================================
   PARAGRAPH + IMAGE SECTION
   ============================================ */
.theme .paragraph-image {
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.theme .paragraph-image:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.theme .paragraph-button {
  background: var(--color-primary);
  border-radius: 6px;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.75rem 2rem;
}

.theme .paragraph-button:hover {
  transform: none;
  filter: brightness(0.9);
  box-shadow: 0 2px 8px rgba(var(--color-primary-rgb), 0.25);
}

/* ============================================
   STATS / COUNTER SECTION
   ============================================ */
.theme .stats-section {
  background: var(--color-primary) !important;
  padding: 3.5rem 0;
  position: relative;
  color: white;
}

.theme .stats-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.theme .stats-header {
  text-align: center;
  margin-bottom: 2rem;
}

.theme .stats-title {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
}

.theme .stats-description {
  color: rgba(255, 255, 255, 0.85);
}

.theme .stats-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  text-align: center;
}

@media (min-width: 768px) {
  .theme .stats-items {
    grid-template-columns: repeat(4, 1fr);
  }
}

.theme .stats-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 1rem 0;
  position: relative;
}

.theme .stats-item::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.theme .stats-item:last-child::after {
  display: none;
}

.theme .stats-item-icon {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.theme .stats-item-value {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.theme .stats-item-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .theme .stats-item::after {
    display: none;
  }
}

/* ============================================
   LOGOS SECTION
   ============================================ */
.theme .logos-section {
  padding: 3rem 0;
  background: #f8f9fa;
}

.theme .logos-container {
  max-width: 1200px;
}

.theme .logo-image {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
}

.theme .logo-item:hover .logo-image {
  filter: grayscale(0%);
  opacity: 1;
}

/* ============================================
   FAQ SECTION
   ============================================ */
.theme .faq-section {
  padding: 5rem 0;
  background: #ffffff;
}

.theme .faq-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a2e;
}

.theme .faq-description {
  color: #5a6370;
}

.theme .faq-item {
  border-radius: 6px;
}

.theme .faq-question {
  border-radius: 6px;
}

/* ============================================
   SLIDER SECTION
   ============================================ */
.theme .slider-cta.primary {
  background: var(--color-primary) !important;
  border-radius: 6px !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 17px 35px;
}

.theme .slider-cta.primary:hover {
  transform: none;
  filter: brightness(0.9);
}

.theme .slider-cta.secondary {
  border-radius: 6px !important;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ============================================
   CUSTOM HTML SECTION
   ============================================ */
.theme .custom-html-section {
  padding: 4rem 0;
}

.theme .custom-html-container {
  max-width: 1200px;
}

.theme .custom-html-title {
  color: var(--color-primary);
  -webkit-text-fill-color: unset;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

/* ============================================
   FOOTER
   ============================================ */
.theme .site-footer {
  background: #0F172A;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}

.theme .site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
}

.theme .footer-container {
  max-width: 1200px;
  padding: 3.5rem 1rem;
}

.theme .footer-heading {
  position: relative;
  display: inline-block;
  color: white !important;
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.theme .footer-heading::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-primary);
  border-radius: 2px;
}

.theme .footer-content,
.theme .footer-address,
.theme .footer-contact {
  color: rgba(255, 255, 255, 0.8) !important;
}

.theme .footer-subheading {
  color: white !important;
  font-weight: 500;
}

.theme .footer-link {
  color: rgba(255, 255, 255, 0.7) !important;
}

.theme .footer-link:hover {
  color: white !important;
  transform: translateX(3px);
}

.theme .footer-copyright {
  color: rgba(255, 255, 255, 0.6) !important;
}

.theme .footer-button {
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.theme .footer-button:hover {
  background: var(--color-primary);
  border-color: transparent;
  color: white;
}

.theme .footer-compliance-box {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}

/* ============================================
   TEMPLATE COMPONENTS
   ============================================ */
.theme .template-hero-cta {
  background: var(--color-primary);
  border-radius: 6px;
  box-shadow: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.theme .template-benefit-card {
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #e5e7eb;
}

.theme .template-benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Secondary nav CTA: keep text white so it stays visible against the
   solid primary background that .theme .nav-cta forces (otherwise base
   CSS gives it green text on a green background once the nav is solid). */
.theme .nav-cta.nav-cta-secondary,
.theme .site-nav.nav-transparent .nav-cta.nav-cta-secondary {
  color: #ffffff !important;
  border-color: transparent !important;
}
.theme .nav-cta.nav-cta-secondary:hover,
.theme .site-nav.nav-transparent .nav-cta.nav-cta-secondary:hover {
  color: #ffffff !important;
  background: var(--color-primary) !important;
  filter: brightness(0.9);
  border-color: transparent !important;
}
