/* ============================================
   DREAM TOUCH SALON — blog.css
   Page-specific styles for blog.html
   ============================================ */

/* ---- BLOG HERO (40vh desktop, auto mobile) ---- */
.blog-hero {
  height: 40vh;
  min-height: 260px;
}

@media (max-width: 767px) {
  .blog-hero {
    height: auto;
    min-height: 220px;
    padding-block: var(--space-xl);
  }
}

/* ---- BLOG SECTION ---- */
.blog-section {
  background-color: var(--color-bg);
  padding-block: var(--space-section);
}



/* ---- BLOG GRID ---- */
/* Three-column on large, two on mid, single on mobile */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: stretch;
  margin-bottom: var(--space-md);
}

@media (min-width: 640px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .blog-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---- BLOG CARD ---- */
.blog-card {
  display: flex;
  flex-direction: column;
  position: relative;
  /* needed for the category badge */
}

/* 16:10 featured image wrapper */
.blog-card__image-wrap {
  position: relative;
  overflow: hidden;
  /* 16:10 → padding-top trick */
  aspect-ratio: 16 / 10;
  flex-shrink: 0;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 450ms ease-out;
}

/* Zoom on card hover */
.blog-card:hover .blog-card__image {
  transform: scale(1.04);
}

/* Block global img:hover double-transform */
.blog-card__image:hover {
  transform: none;
}

/* Category badge overlaid on image (decorative, aria-hidden) */
.blog-card__category-badge {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  font-family: 'Josefin Sans', Arial, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  background-color: rgba(122, 74, 74, 0.88);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* ---- CARD BODY ---- */
.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-sm);
}

/* Meta row: category tag + date */
.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-bottom: var(--space-xs);
}

/* Accessible category tag (text, not decorative) */
.blog-card__tag {
  font-family: 'Josefin Sans', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-accent);
  background-color: var(--color-surface);
  padding: 2px var(--space-xs);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.blog-card__date {
  font-family: 'Josefin Sans', Arial, sans-serif;
  font-size: 0.8125rem;
  color: var(--color-accent-deco);
  margin-left: auto;
  /* pushes date to the right */
}

/* Post title */
.blog-card__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 600;
  color: var(--color-heading);
  line-height: 1.25;
  margin-bottom: var(--space-xs);
}

/* Two-line excerpt — clamp to avoid runaway text */
.blog-card__excerpt {
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.65;
  flex: 1;
  /* fills remaining height, pushing CTA down */
  margin-bottom: var(--space-sm);
  max-width: none;
  /* Visually clamp to ~2 lines, with graceful overflow */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Read More CTA */
.blog-card__cta {
  align-self: flex-start;
  margin-top: auto;
}

/* ---- HIDDEN CARD STATE (JS filter) ---- */
.blog-card[data-hidden] {
  display: none;
}

/* ---- EMPTY STATE ---- */
.blog-empty {
  text-align: center;
  color: var(--color-accent-deco);
  font-size: 0.9375rem;
  padding-block: var(--space-md);
  max-width: none;
}

.blog-empty a {
  color: var(--color-accent);
}

/* ---- COMING SOON NOTE ---- */
.blog-coming-soon {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-surface);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-md);
  max-width: 640px;
  margin-inline: auto;
}

.blog-coming-soon__text {
  font-size: 0.9375rem;
  color: var(--color-text);
  text-align: center;
  max-width: none;
  line-height: 1.65;
}

.blog-coming-soon__link {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.blog-coming-soon__link:hover {
  border-color: var(--color-accent);
  opacity: 1;
}

/* ---- CTA BANNER ACTIONS ---- */
.blog-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

/* White border on primary CTA — same pattern as services CTA */
.cta-banner .btn-primary {
  border-color: #fff;
}

/* Video Play Badge */
.blog-card__video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(122, 74, 74, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform var(--transition), background-color var(--transition);
  z-index: 10;
  pointer-events: none;
}

.blog-card:hover .blog-card__video-badge {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: rgba(122, 74, 74, 1);
}

/* ---- INSTAGRAM EMBED SKELETON LOADER ---- */
.instagram-embed-wrapper {
  position: relative;
  width: 100%;
  background: #ffffff;
  overflow: hidden;
  box-sizing: border-box;
}

.instagram-embed-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.instagram-embed-wrapper.iframe-loaded iframe {
  opacity: 1;
}

.instagram-embed-wrapper.iframe-loaded .instagram-skeleton {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
}

.instagram-skeleton {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 20px;
  background: #ffffff;
  z-index: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  opacity: 1;
}

.instagram-skeleton-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.instagram-skeleton-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f4eeeb 25%, #e8ddd8 50%, #f4eeeb 75%);
  background-size: 200% 100%;
  animation: blog-shimmer 1.5s infinite linear;
}

.instagram-skeleton-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.instagram-skeleton-line {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #f4eeeb 25%, #e8ddd8 50%, #f4eeeb 75%);
  background-size: 200% 100%;
  animation: blog-shimmer 1.5s infinite linear;
  width: 100%;
}

.instagram-skeleton-line.short {
  width: 60%;
}

.instagram-skeleton-line.x-short {
  width: 35%;
}

.instagram-skeleton-media {
  flex-grow: 1;
  background: linear-gradient(90deg, #FAF0EC 25%, #F2E0D8 50%, #FAF0EC 75%);
  background-size: 200% 100%;
  animation: blog-shimmer 1.5s infinite linear;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(122, 74, 74, 0.05);
}

.instagram-skeleton-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--color-accent, #7A4A4A);
}

.insta-pulse {
  animation: insta-pulse 2s infinite ease-in-out;
}

.loading-text {
  font-size: 0.875rem;
  font-family: 'Josefin Sans', sans-serif;
  color: var(--color-accent, #7A4A4A);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.instagram-skeleton-footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@keyframes blog-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes insta-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
    color: var(--color-accent, #7A4A4A);
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
    color: #d62976; /* Vibrant pink brand accent */
  }
}