/*
 * Superhero Landing Plugin Sections - Modern Slick Design
 * Enhanced with premium styling, smooth animations, and beautiful aesthetics
 */

/* === Global Styles & CSS Variables === */
:root {
  --primary-color: #e53935; /* brand red */
  --secondary-color: #b71c1c; /* darker red */
  --accent-color: #ffb300;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
  --gradient-secondary: linear-gradient(135deg, #ff6b6b 0%, #e53935 100%);
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 12px 40px rgba(0, 0, 0, 0.15);
  --shadow-strong: 0 20px 60px rgba(0, 0, 0, 0.2);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* === Sticky Header Styles === */
.superhero-sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent; /* remove translucent bar */
  backdrop-filter: none; /* no blur behind header */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  /* Show header by default, hide on scroll up */
  transform: translateY(0);
  opacity: 1;
}

.superhero-sticky-header.hidden {
  transform: translateY(-110%);
  opacity: 0;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header-content {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-soft);
  margin: 1rem 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.header-logo {
  flex-shrink: 0;
  position: relative;
}

/* Logo Image - Properly Sized */
/* Stronger specificity so builders (Elementor/Gutenberg) can't override image size */
.superhero-sticky-header .header-logo .logo-image {
  height: 52px !important;
  max-height: 52px !important;
  width: auto !important;
  max-width: 220px;
  object-fit: contain;
  transition: var(--transition);
  display: block;
}

.logo-image:hover {
  transform: scale(1.05);
}

/* Remove all custom comic logo styles */
.comic-logo,
.comic-logo-burst,
.comic-logo-text,
.comic-logo-super,
.comic-logo-shb,
.comic-logo-burger {
  display: none;
}

.header-navigation {
  display: flex;
  gap: 2rem;
  align-items: center;
}

/* menu links base color aligned to brand */
.nav-link {
  color: #7a0d0d;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: var(--transition);
  z-index: -1;
}

.nav-link:hover::before {
  left: 0;
}

.nav-link:hover {
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* === Enhanced Product Carousel Styles === */
.superhero-product-carousel {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border: none;
  padding: 2rem;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 1rem;
}

.product-card {
  flex: 0 0 auto;
  width: 320px;
  background: var(--white);
  /* Match header/review rounded corners */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: none;
  transition: var(--transition);
  position: relative;
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  /* Allow content to define height while keeping a comfortable floor */
  min-height: 520px;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0;
  background: transparent;
  z-index: 2;
}

.product-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-medium);
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

.product-image {
  width: 100%;
  height: 220px;
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
  border: none;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

/* Product image overlay to brand reds */
.product-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(229, 57, 53, 0.75), rgba(183, 28, 28, 0.75));
  z-index: 1;
}

.product-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  position: relative;
  z-index: 2;
}

.product-info {
  padding: 1.5rem;
  background: var(--white);
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  border: none;
}

/* product name gradient already uses vars; keep */
.product-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark-color);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.3;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-description {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0 0 1rem 0;
  line-height: 1.6;
  font-weight: 400;
  flex: 1;
}

/* Dietary tags use brand colors */
.dietary-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: auto;
}

.dietary-tag {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.75rem;
  background: linear-gradient(135deg, #fdeaea, #fbd5d5);
  border-radius: 20px;
  color: #7a0d0d;
  border: 1px solid #f5b5b5;
}

.dietary-separator { color: #ef9a9a; font-weight: 600; }

/* === Enhanced Navigation Buttons === */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
  z-index: 10;
  backdrop-filter: blur(10px);
}

.carousel-nav:hover {
  background: #ffffff;
  box-shadow: var(--shadow-strong);
  transform: translateY(-50%) scale(1.1);
  color: #000000;
}

.carousel-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.carousel-nav svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
  transition: var(--transition);
  display: block;
}
.carousel-nav svg path { stroke: #000 !important; fill: none; }

.carousel-nav:hover svg {
  stroke-width: 3;
}

.carousel-nav-left {
  left: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-nav-right {
  right: 0.5rem;
}

.carousel-nav-left.visible {
  opacity: 1;
  pointer-events: auto;
}

/* === Enhanced Responsive Design === */
@media (max-width: 1200px) {
  .superhero-product-carousel {
    max-width: 1000px;
    padding: 2rem 0;
  }
  
  .carousel-container {
    padding: 1.5rem;
  }
  
  .product-card {
    width: 300px;
    height: 460px;
  }
  
  .header-container {
    padding: 0 1.5rem;
  }
  
  .header-content {
    padding: 0.75rem 1.5rem;
  }
  
  .logo-image { height: 44px; }
}

@media (max-width: 768px) {
  .superhero-product-carousel {
    padding: 1.5rem 0;
  }
  
  .carousel-container {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .carousel-track {
    gap: 1.5rem;
    padding: 0 0.5rem;
  }
  
  .product-card {
    width: 280px;
    height: 440px;
  }
  
  .product-info {
    padding: 1rem;
  }
  
  .product-name {
    font-size: 1.1rem;
  }
  
  .product-description {
    font-size: 0.9rem;
  }
  
  .carousel-nav {
    width: 48px;
    height: 48px;
  }
  
  .carousel-nav-left {
    left: 1rem;
  }
  
  .carousel-nav-right {
    right: 1rem;
  }
  
  .header-container {
    padding: 0 1rem;
  }
  
  .header-content {
    padding: 0.5rem 1rem;
    border-radius: 15px;
  }
  
  .logo-image { height: 36px; }
  
  .header-navigation {
    gap: 1rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem;
  }
}

@media (max-width: 480px) {
  .product-card {
    width: 260px;
    height: 420px;
  }
  
  .product-image {
    height: 200px;
  }
  
  .product-info {
    padding: 0.75rem;
  }
  
  .product-name {
    font-size: 1rem;
  }
  
  .product-description {
    font-size: 0.85rem;
  }
  
  .carousel-nav {
    width: 44px;
    height: 44px;
  }
  
  .carousel-nav svg {
    width: 20px;
    height: 20px;
  }
  
  .header-content { flex-direction: row; gap: 0.5rem; padding: 0.75rem 1rem; border-radius: 15px; }
  
  .logo-image { height: 32px; }
  
  .header-navigation {
    gap: 0.5rem;
  }
  
  .nav-link {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }
}

/* === Enhanced Page Layout === */
.page-container {
  padding: 8rem 2rem 2rem; /* push content below sticky header */
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
}

.page-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.page-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--white);
  font-size: 3rem;
  font-weight: 900;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-title {
  color: var(--white);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* === Loading Animation === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.superhero-product-carousel {
  animation: fadeInUp 0.8s ease-out;
}

/* === Hover Effects === */
.product-card:hover .product-name {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-card:hover .dietary-tag {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  border-color: transparent;
}

/* === Testimonial Masonry Section === */
.superhero-testimonials {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.testimonials-title {
  color: var(--white);
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem;
  text-align: center;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.testimonials-masonry {
  column-count: 4;
  column-gap: 1rem;
}

.testimonial-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.5rem;
  background: var(--white);
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  break-inside: avoid;
}

/* Compact layout when no image is present */
.testimonial-card:not(:has(.testimonial-image)) .testimonial-content {
  padding-top: 1rem;
}

.testimonial-image {
  width: 100%;
  /* Let real image define height; when there is no image, no space is reserved */
  height: auto;
  overflow: hidden;
}

.testimonial-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.testimonial-content {
  padding: 1.25rem 1.25rem 1rem;
}

.testimonial-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 0.5rem;
  color: var(--primary-color); /* brand red stars */
}
.testimonial-rating .star { width: 18px; height: 18px; display: inline-block; color: currentColor; }
.testimonial-rating .star.empty { color: #e5e7eb; }

.testimonial-text {
  font-size: 0.8rem;
  color: #334155;
  line-height: 1.6;
  margin: 0 0 0.6rem;
}

.testimonial-name {
  font-weight: 700;
  color: #1f2937;
  font-size: 0.8rem;
  margin: 0 0 0.2rem;
}

.testimonial-date {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* Testimonials responsive */
@media (max-width: 1200px) {
  .testimonials-masonry { column-count: 3; }
}
@media (max-width: 900px) {
  .testimonials-masonry { column-count: 2; }
}
@media (max-width: 560px) {
  .testimonials-masonry { column-count: 1; }
}

.testimonials-nav {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.95);
  color: #475569;
  box-shadow: var(--shadow-medium);
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.testimonials-nav-left { left: 0.25rem; }
.testimonials-nav-right { right: 0.25rem; }

/* Phone: 2-column stacked masonry instead of slider */
@media (max-width: 640px) {
  .superhero-testimonials { position: relative; }
  .testimonials-masonry { column-count: 2; column-gap: 1rem; display: block; }
  .testimonial-card { width: 100%; break-inside: avoid; margin: 0 0 1rem; }
}

/* Mobile-only behavior for product carousel: native scroll-snap one-card view */
@media (max-width: 640px) {
  .superhero-product-carousel .carousel-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: auto; /* allow vertical scroll too */
    scrollbar-width: none;
    padding: 1rem 5%;
    position: relative;
  }
  .superhero-product-carousel .carousel-nav { display: none !important; }
  .superhero-product-carousel .carousel-container { overscroll-behavior-x: contain; }
  .superhero-product-carousel .carousel-container::-webkit-scrollbar { display: none; }
  .superhero-product-carousel .carousel-track {
    gap: 1rem;
    transform: none !important;
    transition: none !important;
  }
  .superhero-product-carousel .product-card {
    flex: 0 0 90%;
    scroll-snap-align: center;
  }
  .superhero-product-carousel .product-card.is-center { opacity: 1; transform: translateY(0) scale(1); }
  .superhero-product-carousel .product-card:not(.is-center) { opacity: 0.5; transform: scale(0.97); }
}

/* Desktop/tablet: true masonry using CSS columns (variable card heights) */
.testimonials-masonry { column-count: 4; column-gap: 1.5rem; }
@media (max-width: 1200px) { .testimonials-masonry { column-count: 3; } }
@media (max-width: 900px)  { .testimonials-masonry { column-count: 2; } }

/* === One-time bottom-up entrance animation utility === */
.animation-bottom-up {
  opacity: 0;
  transform: translateY(24px);
  will-change: transform, opacity;
}
.animation-bottom-up.abu-visible {
  animation: abu-fade-up 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes abu-fade-up {
  0% { opacity: 0; transform: translateY(24px); }
  100% { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .animation-bottom-up { opacity: 1; transform: none; }
  .animation-bottom-up.abu-visible { animation: none; }
}
