/* =======================================
   Instagram Reels Feed (Mobile Portrait)
   ======================================= */

#reels-feed {
  padding: 20px;
  background: #f8fff8; /* soft pastel green */
  border-radius: 12px;
  margin: 20px auto;
  max-width: 1000px;
  font-family: system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

/* Each video block */
.video-block {
  position: relative;
  width: 100%;
  max-width: 420px;
height: auto;
max-height: 90vh; /* never exceed the visible viewport height */
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* Video element */
.video-block video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 12px;
}

/* Mute/Unmute Button */
.sound-toggle {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 5;
}
.sound-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Caption text and link */
.video-block p {
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  color: #eaeaea;
  margin-top: 0.4rem;
  text-align: center;
}
.video-block a {
  color: #aad;
  text-decoration: none;
}
.video-block a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 880px) {
  #reels-feed {
    padding: 0.5rem;
  }
  .video-block {
    max-width: 100%;
    border-radius: 10px;
  }
}


/* Reels Heading */
#reels-feed h2 {
  text-align: center;
  color: #2a4d2f;
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

/* Reels Container */
.video-block {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border: 4px solid #f0f6f0;
  margin-bottom: 2rem;
  padding: 1rem;
  text-align: center;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

/* Video Element */
#reels-feed video {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  background: #000;
  display: block;
  margin: 0 auto 0.5rem;
}

/* Video Thumbnail Poster (Fallback) */
.video-thumb {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  background: #ccc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Hide fallback if native video loads */
.video-thumb.hidden {
  display: none;
}

/* Caption Text */
.video-block p {
  font-weight: 500;
  margin: 0.5em 0;
  color: #333;
}

/* Instagram Link */
.video-block a {
  display: block;
  margin-bottom: 1em;
  color: #663399;
  text-decoration: none;
  font-size: 0.95rem;
}

.video-block a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 880px) {
  #reels-feed {
    padding: 12px;
  }
  .video-block {
    max-width: 100%;
  }
}
/* Nested video container inside Reels section */
#reels-feed .video-feed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}
/* Reels Feed Container */
#reels-feed {
  padding: 20px;
  max-width: 800px;
  margin: 0 auto;
}

/* Each video block */
.video-block {
  margin-bottom: 2em;
  text-align: center;
}

/* Video styling */
.video-block video {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 90vh; /* never exceed the visible viewport height */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background: #000; /* Helps prevent black screen fallback on iOS */
  display: block;
  margin: 0 auto;
  object-fit: cover;
}

/* Captions and Links */
.video-block p {
  font-weight: 500;
  margin: 0.5em 0;
}

.video-block a {
  display: block;
  margin-bottom: 1em;
  color: #663399;
  text-decoration: none;
}
#videoFeed {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  padding: 1rem 0;
}

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;      /* fits mobile screens comfortably */
  height: auto;
  max-height: 90vh; /* never exceed the visible viewport height */
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.video-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sound-toggle {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
}

.sound-toggle:hover {
  background: rgba(255,255,255,0.3);
}

.caption {
  text-align: center;
  font-family: 'EB Garamond', serif;
  font-size: 0.95rem;
  color: #eaeaea;
  margin-top: 0.4rem;
}
.caption a {
  color: #aad;
  text-decoration: none;
}
.caption a:hover {
  text-decoration: underline;
}
