/* ParentCareGuide.com - Custom Styles */

/* ================================================
   IMAGE STYLES - Hero, Article, and Section Images
   ================================================ */

/* Hero Image Container */
.hero-image-section {
  position: relative;
  overflow: hidden;
}

.hero-image-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    rgba(15, 23, 42, 0.4) 0%,
    rgba(15, 23, 42, 0.6) 100%);
  z-index: 1;
}

.hero-image-section > * {
  position: relative;
  z-index: 2;
}

.hero-image-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Article Header Image */
.article-hero-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .article-hero-image {
    height: 400px;
  }
}

@media (min-width: 1024px) {
  .article-hero-image {
    height: 480px;
  }
}

/* Section Feature Image */
.section-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 0.75rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

@media (min-width: 768px) {
  .section-image {
    height: 320px;
  }
}

/* Inline Content Image */
.content-image {
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.content-image-caption {
  font-size: 0.875rem;
  color: #64748b;
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Small Inline Images - Float alongside text */
.inline-image-right {
  float: right;
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 0.25rem 0 1rem 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.inline-image-left {
  float: left;
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 0.25rem 1.5rem 1rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .inline-image-right,
  .inline-image-left {
    width: 280px;
    height: 200px;
  }
}

@media (max-width: 640px) {
  .inline-image-right,
  .inline-image-left {
    float: none;
    width: 100%;
    height: 180px;
    margin: 1rem 0;
  }
}

/* Clear float helper */
.clear-float {
  clear: both;
}

/* Card with Image */
.card-with-image {
  overflow: hidden;
}

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

@media (min-width: 768px) {
  .card-image {
    height: 200px;
  }
}

/* Circular Portrait */
.portrait-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Side-by-Side Image and Text */
.image-text-row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .image-text-row {
    flex-direction: row;
  }

  .image-text-row.reverse {
    flex-direction: row-reverse;
  }
}

.image-text-row .row-image {
  width: 100%;
  max-width: 400px;
  height: 280px;
  object-fit: cover;
  border-radius: 0.75rem;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .image-text-row .row-image {
    width: 45%;
    max-width: none;
  }
}

.image-text-row .row-content {
  flex: 1;
}

/* Image with Warm Overlay for Hero Sections */
.warm-overlay {
  position: relative;
}

.warm-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(13, 148, 136, 0.15) 0%,
    rgba(59, 130, 246, 0.1) 100%);
  pointer-events: none;
  border-radius: inherit;
}

/* Pillar Card Images */
.pillar-card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 0.5rem 0.5rem 0 0;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
  width: calc(100% + 3rem);
}

/* Testimonial/Quote Image */
.quote-portrait {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #0d9488;
}

/* Lazy Loading Placeholder */
.image-placeholder {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  animation: imagePulse 2s ease-in-out infinite;
}

@keyframes imagePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Image Focus Point - for images that should focus on faces */
.focus-top {
  object-position: center top;
}

.focus-center {
  object-position: center center;
}

.focus-bottom {
  object-position: center bottom;
}

/* Base Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #334155;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

/* Article Content Styles */
.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.article-content ul, .article-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content blockquote {
  border-left: 4px solid #0d9488;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #475569;
}

/* Callout Boxes */
.callout {
  padding: 1.25rem 1.5rem;
  border-radius: 0.5rem;
  margin: 1.5rem 0;
}

.callout-info {
  background-color: #f0f9ff;
  border-left: 4px solid #0ea5e9;
}

.callout-warning {
  background-color: #fffbeb;
  border-left: 4px solid #f59e0b;
}

.callout-success {
  background-color: #f0fdf4;
  border-left: 4px solid #22c55e;
}

.callout-important {
  background-color: #fef2f2;
  border-left: 4px solid #ef4444;
}

/* Table of Contents */
.toc {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
}

.toc-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #0f172a;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-list a {
  color: #0d9488;
  text-decoration: none;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: #0f766e;
  text-decoration: underline;
}

/* Sticky TOC for Desktop */
@media (min-width: 1024px) {
  .toc-sticky {
    position: sticky;
    top: 2rem;
  }
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid #e2e8f0;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 1.25rem 0;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
}

.faq-question:hover {
  color: #0d9488;
}

.faq-answer {
  padding-bottom: 1.25rem;
  display: none;
}

.faq-answer.active {
  display: block;
}

.faq-icon {
  transition: transform 0.2s;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Cards */
.card {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s, transform 0.2s;
}

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

/* Pillar Cards */
.pillar-card {
  display: block;
  padding: 1.5rem;
  text-decoration: none;
}

.pillar-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
}

/* Article Cards */
.article-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
}

.article-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 0.5rem;
  text-decoration: none;
}

.article-card-title:hover {
  color: #0d9488;
}

.article-card-excerpt {
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #64748b;
}

.breadcrumbs a {
  color: #0d9488;
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #cbd5e1;
}

/* Author Box */
.author-box {
  display: flex;
  gap: 1rem;
  padding: 1.5rem;
  background-color: #f8fafc;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.author-avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background-color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* Mobile Menu */
.mobile-menu {
  display: none;
}

.mobile-menu.active {
  display: block;
}

/* Hamburger Button */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #0f172a;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Skip Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #0d9488;
  color: white;
  padding: 0.5rem 1rem;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  top: 0;
}

/* Print Styles */
@media print {
  header, footer, .toc, .related-posts, .ad-placeholder {
    display: none !important;
  }

  .article-content {
    max-width: 100%;
  }
}

/* Comparison Tables */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.comparison-table th,
.comparison-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.comparison-table th {
  background-color: #f8fafc;
  font-weight: 600;
  color: #0f172a;
}

.comparison-table tr:hover {
  background-color: #f8fafc;
}

/* Checklist Styles */
.checklist {
  list-style: none;
  padding: 0;
}

.checklist li {
  position: relative;
  padding-left: 2rem;
  margin-bottom: 0.75rem;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid #0d9488;
  border-radius: 0.25rem;
}

/* Utilities */
.text-balance {
  text-wrap: balance;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

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

  html {
    scroll-behavior: auto;
  }
}
