/* ============================================
   Sunrise Senior Care ADHC - Main Stylesheet
   ============================================ */

/* --- CSS Variables --- */
:root {
  --brand-primary: #113464;
  --brand-secondary: #2a630a;
  --brand-accent: #fede00;
  --brand-warm: #eca614;
  --brand-dark: #0a1f3d;
  --brand-light: #fdf8ef;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --header-height: 120px;
  --header-height-scrolled: 70px;
  --transition-base: 0.3s ease;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* --- Base Styles --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  color: var(--gray-800);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--brand-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

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

/* --- Header & Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--transition-base);
}

.site-header.scrolled .main-nav {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: var(--shadow-lg);
}

.site-header.scrolled .top-bar {
  transform: translateY(-100%);
  height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  opacity: 0;
}

.top-bar {
  transition: all var(--transition-base);
}

.main-nav {
  transition: all var(--transition-base);
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--brand-warm);
  transition: width var(--transition-base);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--brand-warm);
}

/* --- Buttons --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: linear-gradient(135deg, var(--brand-warm), #d4940f);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(236, 166, 20, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 166, 20, 0.5);
  background: linear-gradient(135deg, #d4940f, var(--brand-warm));
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--brand-primary);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--brand-accent);
  color: var(--brand-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-accent:hover {
  background: #e6cc00;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 222, 0, 0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: transparent;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--white);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--white);
  color: var(--brand-primary);
  transform: translateY(-2px);
}

/* --- Section Utilities --- */
.section-padding {
  padding: 5rem 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.section-heading p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  padding: 0.25rem 1rem;
  background: rgba(17, 52, 100, 0.08);
  color: var(--brand-primary);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 2rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

/* --- Service Cards --- */
.service-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 2rem;
  transition: all var(--transition-base);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-warm), var(--brand-accent));
  transform: scaleX(0);
  transition: transform var(--transition-base);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card .icon-wrapper {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.service-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--gray-600);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* --- Service Section Images --- */
.service-img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  max-height: 400px;
  object-fit: cover;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
}

/* --- Image Placeholder (fallback) --- */
.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.75rem;
  border-radius: 1rem;
  min-height: 280px;
  font-family: var(--font-heading);
  font-weight: 500;
  color: var(--white);
}

.image-placeholder i {
  font-size: 2.5rem;
  opacity: 0.7;
}

.image-placeholder span {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* --- Form Inputs --- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
  font-family: var(--font-heading);
}

.form-group label .required {
  color: #ef4444;
  margin-left: 0.125rem;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray-800);
  transition: all var(--transition-base);
  background: var(--white);
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(17, 52, 100, 0.1);
}

.form-input.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
  color: #ef4444;
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  display: none;
}

.field-error.visible {
  display: block;
}

textarea.form-input {
  resize: vertical;
  min-height: 120px;
}

select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.25rem;
  padding-right: 2.5rem;
}

/* --- FAQ Accordion --- */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: all var(--transition-base);
  background: var(--white);
}

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

.faq-item.active {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--gray-800);
  text-align: left;
  transition: color var(--transition-base);
}

.faq-question:hover {
  color: var(--brand-primary);
}

.faq-question .icon {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(17, 52, 100, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
  font-size: 0.875rem;
  color: var(--brand-primary);
}

.faq-item.active .faq-question .icon {
  background: var(--brand-primary);
  color: var(--white);
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray-600);
  line-height: 1.7;
  font-size: 0.9375rem;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  backdrop-filter: blur(4px);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--white);
  border-radius: 1rem;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-base);
  box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.375rem;
}

.modal-close {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: none;
  background: var(--gray-100);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: all var(--transition-base);
  font-size: 1.125rem;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

.modal-body {
  padding: 1.5rem;
}

/* --- Scroll Animations --- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 {
  transition-delay: 0.1s;
}
.animate-on-scroll.delay-2 {
  transition-delay: 0.2s;
}
.animate-on-scroll.delay-3 {
  transition-delay: 0.3s;
}
.animate-on-scroll.delay-4 {
  transition-delay: 0.4s;
}
.animate-on-scroll.delay-5 {
  transition-delay: 0.5s;
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--brand-primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: 50;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--brand-warm);
  transform: translateY(-2px);
}

/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: var(--white);
  z-index: 9998;
  transition: right 0.4s ease;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.mobile-menu-overlay.open {
  opacity: 1;
  visibility: visible;
}

.mobile-menu .nav-link {
  display: block;
  padding: 1rem 1.5rem;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-100);
  transition: all var(--transition-base);
}

.mobile-menu .nav-link:hover,
.mobile-menu .nav-link.active {
  color: var(--brand-warm);
  background: rgba(236, 166, 20, 0.05);
  padding-left: 2rem;
}

/* --- Hero Sections --- */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-primary) 50%, #1a4a8a 100%);
}

/* --- Testimonial Cards --- */
.testimonial-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid var(--gray-200);
  position: relative;
}

.testimonial-card .stars {
  color: var(--brand-warm);
  margin-bottom: 1rem;
}

.testimonial-card blockquote {
  color: var(--gray-600);
  font-style: italic;
  line-height: 1.7;
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.testimonial-card .author {
  font-weight: 700;
  color: var(--brand-primary);
  font-family: var(--font-heading);
}

.testimonial-card .role {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* --- Step Cards --- */
.step-card {
  text-align: center;
  padding: 2rem;
}

.step-number {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-warm), var(--brand-accent));
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  box-shadow: 0 4px 14px rgba(236, 166, 20, 0.3);
}

/* --- Trust Badges --- */
.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.trust-badge i {
  font-size: 1.5rem;
  color: var(--brand-accent);
}

.trust-badge span {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--white);
}

/* --- Value Cards --- */
.value-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--white);
  border-radius: 1rem;
  border: 1px solid var(--gray-200);
  transition: all var(--transition-base);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

/* --- Schedule Timeline --- */
.schedule-item {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.schedule-item:last-child {
  border-bottom: none;
}

.schedule-time {
  flex-shrink: 0;
  width: 110px;
  font-weight: 700;
  color: var(--brand-primary);
  font-family: var(--font-heading);
  font-size: 0.9375rem;
}

/* --- Position Cards (Careers) --- */
.position-card {
  background: var(--white);
  border-radius: 1rem;
  padding: 1.75rem;
  border: 1px solid var(--gray-200);
  transition: all var(--transition-base);
}

.position-card:hover {
  border-color: var(--brand-primary);
  box-shadow: var(--shadow-md);
}

.position-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.position-card .badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

/* --- Quick Contact Cards --- */
.contact-card {
  text-align: center;
  padding: 2rem;
  background: var(--white);
  border-radius: 1rem;
  border: 1px solid var(--gray-200);
  transition: all var(--transition-base);
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.contact-card .icon-circle {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.25rem;
}

/* --- Form Success Message --- */
.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success.visible {
  display: block;
}

.form-success i {
  font-size: 3rem;
  color: var(--brand-secondary);
  margin-bottom: 1rem;
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1024px) {
  .section-heading h2 {
    font-size: 2rem;
  }

  .section-padding {
    padding: 4rem 0;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  .section-heading h2 {
    font-size: 1.75rem;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .btn-primary,
  .btn-secondary,
  .btn-accent,
  .btn-ghost {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
  }
}

@media (max-width: 480px) {
  .section-heading h2 {
    font-size: 1.5rem;
  }

  .section-padding {
    padding: 2.5rem 0;
  }

  .service-card {
    padding: 1.5rem;
  }

  .modal-content {
    margin: 0.5rem;
    border-radius: 0.75rem;
  }
}

/* --- Print Styles --- */
@media print {
  .site-header,
  .mobile-menu,
  .mobile-menu-overlay,
  .back-to-top,
  .modal-overlay,
  .btn-primary,
  .btn-secondary {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  .section-padding {
    padding: 1rem 0;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  .service-card:hover,
  .value-card:hover,
  .contact-card:hover,
  .btn-primary:hover,
  .btn-secondary:hover {
    transform: none;
  }
}
