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

/* Body styles removed - will inherit from form.css */

/* Testimonial Section */
.testimonial-section {
  width: 100%;
  background: linear-gradient(to right, #eae4de 0%, #f2f5eb 50%, #eefad1 100%);
  padding: 0;
  padding-top: 0;
  padding-bottom: 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  display: block !important;
  visibility: visible !important;
  position: relative;
  z-index: 1;
  margin-top: -0.75rem;
  margin-bottom: 0;
}

/* Mobile specific margin for testimonials */
@media (max-width: 767px) {
  .testimonial-section.mobile-sections {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
  }
  
  .testimonial-section.mobile-sections .video-grid {
    margin-top: 0.25rem;
    min-height: 150px;
  }
}

@media (max-width: 480px) {
  .testimonial-section.mobile-sections {
    margin-top: 0.125rem;
    padding-top: 0.125rem;
    padding-bottom: 0.125rem;
  }
  
  .testimonial-section.mobile-sections .video-grid {
    margin-top: 0.125rem;
    min-height: 120px;
  }
}

@media (min-width: 768px) {
  .testimonial-section {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
    padding-left: 2rem;
    padding-right: 2rem;
    margin-top: 0;
  }
}

@media (min-width: 1024px) {
  .testimonial-section {
    padding-top: 0.75rem;
    padding-bottom: 1.5rem;
    padding-left: 4rem;
    padding-right: 4rem;
  }
}

.testimonial-container {
  max-width: 80rem;
  margin: 0 auto;
}

/* Headline Section - Hidden */
.headline-section {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.headline-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 1rem;
  line-height: 1.2;
}

@media (min-width: 768px) {
  .headline-title {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .headline-title {
    font-size: 3rem;
  }
}

.desktop-break {
  display: none;
}

@media (min-width: 768px) {
  .desktop-break {
    display: block;
  }
}

/* Highlight Text Effect */
.highlight-text {
  position: relative;
  display: inline-block;
}

.highlight-content {
  position: relative;
  z-index: 10;
}

.highlight-bg {
  position: absolute;
  bottom: 0.25rem;
  left: 0;
  right: 0;
  height: 0.75rem;
  background-color: #a8d5e2;
  opacity: 0.5;
  z-index: 0;
}

/* Sub-headline */
.sub-headline {
  font-size: 1rem;
  color: #000000;
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .sub-headline {
    font-size: 1.125rem;
  }
}

@media (min-width: 1024px) {
  .sub-headline {
    font-size: 1.25rem;
  }
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 80rem;
  margin: 0 auto;
  margin-top: 1.5rem;
  min-height: 200px;
}

@media (max-width: 767px) {
  .video-grid {
    gap: 1rem;
    margin-top: 0.25rem;
    min-height: 150px;
  }
}

@media (max-width: 480px) {
  .video-grid {
    gap: 0.75rem;
    margin-top: 0.125rem;
    min-height: 120px;
  }
}

.video-grid:empty::before {
  content: "Loading videos...";
  display: block;
  text-align: center;
  color: #666;
  padding: 2rem;
}

@media (min-width: 768px) {
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

/* Video Card */
.video-card {
  width: 100%;
  cursor: pointer;
}

.video-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

.video-card:hover .video-card-inner {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Video Thumbnail Container */
.video-thumbnail-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.video-thumbnail-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumbnail-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-card:hover .video-thumbnail-video {
  opacity: 1;
}

/* Video Card Overlay */
.video-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    transparent 30%,
    transparent 70%,
    rgba(0, 0, 0, 0.5) 100%
  );
}

/* Top Left - REC Indicator */
.video-card-top-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rec-indicator {
  background-color: #dc2626;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* Top Right - Play Button & Branding */
.video-card-top-right {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.play-button-container {
  /* Circular off‑white play button, closer to design reference */
  width: 3.2rem;
  height: 3.2rem;
  background-color: #fdf8f2;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.16);
}

.video-card:hover .play-button-container {
  transform: scale(1.1);
}

.play-icon {
  width: 32.6px;
  height: 32.6px;
  color: #444444;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
  margin-left: 0.08rem; /* slight nudge so triangle feels optically centered */
}

.branding-text {
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: right;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Bottom - Name and Weight Loss */
.video-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
}

.video-card-name {
  color: white;
  font-size: 1.125rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
  .video-card-name {
    font-size: 1.25rem;
  }
}

.video-card-weight {
  text-align: right;
}

.weight-label {
  color: white;
  font-size: 0.75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 0.125rem;
}

@media (min-width: 768px) {
  .weight-label {
    font-size: 0.875rem;
  }
}

.weight-value {
  color: #22c55e;
  font-size: 1.5rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

@media (min-width: 768px) {
  .weight-value {
    font-size: 1.875rem;
  }
}

/* Video Dialog Modal */
.video-dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease;
}

.video-dialog-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.video-dialog-container {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .video-dialog-container {
    max-width: fit-content;
    height: auto;
  }
}

.video-dialog-content {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .video-dialog-content {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
  }
}

.video-dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 2rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  transition: all 0.2s ease;
  line-height: 1;
}

.video-dialog-close:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

/* Dialog Video Container */
.dialog-video-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .dialog-video-container {
    width: auto;
    height: auto;
  }
}

.dialog-video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background-color: #000000;
}

@media (min-width: 768px) {
  .dialog-video {
    width: auto;
    height: auto;
    max-width: 90vw;
    max-height: 90vh;
  }
}

/* Dialog Video Controls */
.dialog-video-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 1001;
}

.dialog-control-btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.dialog-control-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.control-icon {
  width: 1.5rem;
  height: 1.5rem;
  color: currentColor;
  fill: currentColor;
}

/* Hidden utility class */
.hidden {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .testimonial-section {
    padding: 0 0.75rem 0.25rem;
  }

  .headline-title {
    font-size: 1.5rem;
  }

  .sub-headline {
    font-size: 0.9375rem;
  }

  .video-grid {
    gap: 1rem;
  }

  .video-card-name {
    font-size: 1rem;
  }

  .weight-value {
    font-size: 1.25rem;
  }
}

/* Accessibility */
.video-card:focus-visible,
.video-dialog-close:focus-visible,
.dialog-control-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
