/* ========================================
   VSRX Pharmacy — Mobile-First Stylesheet
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #0369A1;
  --color-primary-light: #0EA5E9;
  --color-primary-dark: #075985;
  --color-primary-bg: #F0F9FF;
  --color-accent: #F97316;
  --color-accent-dark: #EA580C;
  --color-green: #16A34A;
  --color-green-bg: #DCFCE7;
  --color-star: #FBBF24;
  --color-text: #1E293B;
  --color-text-light: #475569;
  --color-text-lighter: #64748B;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAFC;
  --color-border: #E2E8F0;
  --color-border-light: #F1F5F9;
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --shadow-xl: 0 16px 48px rgba(0,0,0,0.12);
  --container-max: 1200px;
  --header-height: 72px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--color-primary-dark);
}

ul, ol {
  list-style: none;
}

address {
  font-style: normal;
}

/* --- Accessibility --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--color-primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

:focus-visible {
  outline: 3px solid var(--color-primary-light);
  outline-offset: 2px;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-full {
  width: 100%;
}

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text);
}

.logo-mark {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -0.5px;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text-light);
}

/* Nav toggle (mobile) */
.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
}

.hamburger::before { transform: translateY(-7px); }
.hamburger::after  { transform: translateY(7px); }

.nav-toggle[aria-expanded="true"] .hamburger {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
  transform: rotate(-45deg);
}

.nav-list {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  flex-direction: column;
  padding: 32px 20px;
  gap: 8px;
  overflow-y: auto;
}

.nav-list.is-open {
  display: flex;
}

.nav-list a {
  display: block;
  padding: 14px 16px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.nav-list a:hover {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.header-phone {
  display: none;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

/* ========== HERO ========== */
.hero {
  position: relative;
  padding: 64px 0 56px;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 40%, #F0F9FF 70%, #fff 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(14,165,233,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(14,165,233,0.06) 0%, transparent 40%),
    radial-gradient(circle at 60% 60%, rgba(14,165,233,0.04) 0%, transparent 60%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.hero-content {
  max-width: 620px;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  background: rgba(255,255,255,0.85);
  border: 1px solid var(--color-green-bg);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-green);
  letter-spacing: 0.2px;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.12;
  color: var(--color-text);
  letter-spacing: -0.75px;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.05rem;
}

/* Hero trust row */
.hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-light);
}

/* Hero visual — card stack */
.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-card-stack {
  position: relative;
  width: 100%;
  max-width: 420px;
  min-height: 320px;
}

.hero-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(226,232,240,0.8);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

.hero-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-xl);
}

.hero-card + .hero-card {
  margin-top: 14px;
}

.hero-card-icon {
  flex-shrink: 0;
}

.hero-card-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-card-text strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}

.hero-card-text span {
  font-size: 0.825rem;
  color: var(--color-text-lighter);
}

/* Decorative cross behind cards */
.hero-cross {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
}

/* ========== WHY VSRX ========== */
.why-vsrx {
  padding: 72px 0;
  background: var(--color-bg);
}

.why-vsrx h2,
.services h2,
.faq h2,
.testimonials h2,
.contact h2 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 12px;
  color: var(--color-text);
}

.section-sub {
  text-align: center;
  color: var(--color-text-light);
  max-width: 640px;
  margin: 0 auto 48px;
  font-size: 1.05rem;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.feature-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.feature-icon {
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.feature-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ========== SPLIT SECTIONS (Facilities / Residents) ========== */
.for-facilities {
  padding: 72px 0;
  background: var(--color-bg-alt);
}

.for-residents {
  padding: 72px 0;
  background: var(--color-bg);
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.split-section {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.split-content h2 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.split-content > p {
  color: var(--color-text-light);
  margin-bottom: 24px;
  font-size: 1.05rem;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.5;
}

.check-list li svg {
  flex-shrink: 0;
}

.split-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-placeholder {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 4 / 3;
  background: var(--color-primary-bg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-lighter);
  font-size: 0.875rem;
  border: 2px dashed var(--color-border);
}

/* ========== SERVICES ========== */
.services {
  padding: 72px 0;
  background: var(--color-bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.service-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: box-shadow 0.2s;
}

.service-item:hover {
  box-shadow: var(--shadow-md);
}

.service-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--color-text);
}

.service-item p {
  font-size: 0.925rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

/* ========== FAQ ========== */
.faq {
  padding: 72px 0;
  background: var(--color-bg);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  padding: 20px 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: color 0.2s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-primary);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: '\2212';
}

.faq-item summary:hover {
  color: var(--color-primary);
}

.faq-answer {
  padding: 0 0 20px;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ========== TESTIMONIALS ========== */
.testimonials {
  padding: 72px 0;
  background: var(--color-bg-alt);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.testimonial-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
}

.testimonial-card .stars {
  display: flex;
  gap: 2px;
  margin-bottom: 16px;
}

.testimonial-card p {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.7;
  margin-bottom: 16px;
  font-style: italic;
}

.testimonial-card cite {
  font-size: 0.875rem;
  color: var(--color-text-lighter);
  font-style: normal;
  font-weight: 500;
}

.trust-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
}

.badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-light);
}

/* ========== CONTACT ========== */
.contact {
  padding: 72px 0;
  background: var(--color-bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-top: 48px;
}

.contact-block {
  margin-bottom: 28px;
}

.contact-block h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--color-text);
}

.contact-phone {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

.small {
  font-size: 0.85rem;
  color: var(--color-text-lighter);
  margin-top: 4px;
}

.hours-table {
  width: 100%;
  font-size: 0.925rem;
  border-collapse: collapse;
}

.hours-table td {
  padding: 6px 0;
  color: var(--color-text-light);
}

.hours-table td:last-child {
  text-align: right;
  font-weight: 500;
}

.hours-table tr:last-child td {
  padding-top: 12px;
  color: var(--color-primary);
  text-align: left !important;
}

.map-wrapper {
  margin-top: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

/* Contact Form */
.contact-form-wrapper {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  border: 1px solid var(--color-border);
}

.contact-form-wrapper h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.contact-form-wrapper > p {
  color: var(--color-text-light);
  margin-bottom: 24px;
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text);
}

.form-group label span {
  color: var(--color-accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary-light);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  outline: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ========== FOOTER ========== */
.site-footer {
  background: var(--color-text);
  color: #CBD5E1;
  padding: 56px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 40px;
}

.site-footer .logo-mark {
  color: #fff;
}

.site-footer .logo-text {
  color: #94A3B8;
}

.site-footer address {
  margin-top: 16px;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #94A3B8;
}

.site-footer address a {
  color: #CBD5E1;
}

.footer-grid h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  margin-bottom: 16px;
}

.footer-links ul li,
.footer-services-area ul li,
.footer-legal ul li {
  margin-bottom: 8px;
}

.footer-links a,
.footer-legal a {
  color: #94A3B8;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover,
.footer-legal a:hover {
  color: #fff;
}

.footer-services-area li {
  color: #94A3B8;
  font-size: 0.9rem;
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 20px;
}

.social-links a {
  color: #94A3B8;
  transition: color 0.2s;
}

.social-links a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding: 20px 0;
  text-align: center;
  font-size: 0.825rem;
  color: #64748B;
}

/* ========== MOBILE STICKY CTA ========== */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--color-border);
  z-index: 999;
  display: flex;
}

.btn-sticky {
  flex: 1;
  padding: 16px;
  font-size: 1.05rem;
  border-radius: var(--radius-sm);
}

/* ========== TABLET (640px+) ========== */
@media (min-width: 640px) {
  .container {
    padding: 0 32px;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========== DESKTOP (1024px+) ========== */
@media (min-width: 1024px) {
  .container {
    padding: 0 48px;
  }

  /* Header desktop */
  .nav-toggle {
    display: none;
  }

  .nav-list {
    display: flex !important;
    position: static;
    flex-direction: row;
    padding: 0;
    gap: 4px;
    background: transparent;
  }

  .nav-list a {
    font-size: 0.925rem;
    padding: 8px 14px;
  }

  .header-phone {
    display: flex;
  }

  /* Hero desktop */
  .hero {
    padding: 96px 0 88px;
    min-height: 600px;
  }

  .hero-inner {
    flex-direction: row;
    align-items: center;
    gap: 64px;
  }

  .hero-content {
    flex: 1.1;
  }

  .hero-visual {
    flex: 0.9;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero-card-stack {
    min-height: 360px;
  }

  /* Features */
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Split sections */
  .split-section {
    flex-direction: row;
    align-items: center;
    gap: 64px;
  }

  .split-section .split-content {
    flex: 1;
  }

  .split-section .split-visual {
    flex: 1;
  }

  .split-reverse {
    flex-direction: row-reverse;
  }

  /* Section paddings */
  .why-vsrx,
  .for-facilities,
  .for-residents,
  .services,
  .faq,
  .testimonials,
  .contact {
    padding: 96px 0;
  }

  .why-vsrx h2,
  .services h2,
  .faq h2,
  .testimonials h2,
  .contact h2 {
    font-size: 2.25rem;
  }

  .split-content h2 {
    font-size: 2.25rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Testimonials */
  .testimonial-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }

  .contact-form-wrapper {
    padding: 40px 32px;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }

  /* Hide mobile sticky on desktop */
  .mobile-sticky-cta {
    display: none;
  }

  /* Add bottom padding only on mobile for sticky CTA */
  body {
    padding-bottom: 0;
  }
}

/* On mobile, add padding for sticky CTA */
@media (max-width: 1023px) {
  body {
    padding-bottom: 80px;
  }

  .site-footer {
    padding-bottom: 80px;
  }
}

/* ========== LARGE DESKTOP (1280px+) ========== */
@media (min-width: 1280px) {
  .hero h1 {
    font-size: 3.75rem;
  }

  .hero {
    padding: 104px 0 96px;
    min-height: 660px;
  }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ========== PRINT ========== */
@media print {
  .site-header,
  .mobile-sticky-cta,
  .nav-toggle {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}
