.video-embed-wrapper {
  max-width: 800px;
  margin: 20px auto;
  border: 1px solid #ddd;
  padding: 15px;
  background: #f9f9f9;
}

/* Embed Code Container Style */

.embed-code {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin: 2rem auto 0;
  max-width: 960px;
  width: 100%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  font-family: "Inter", "Segoe UI", sans-serif;
  color: #1f2937; /* gray-800 */
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Heading */
.embed-code h4 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: #111827; /* gray-900 */
}

/* Responsive Textarea */
.embed-code textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: monospace;
  font-size: 0.9rem;
  border: 1px solid #d1d5db; /* gray-300 */
  border-radius: 8px;
  resize: none;
  background-color: #f9fafb; /* light gray */
  color: #374151; /* gray-700 */
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  min-height: 100px;
}

/* Focus effect */
.embed-code textarea:focus {
  outline: none;
  border-color: #3b82f6; /* blue-500 */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3); /* subtle focus ring */
}

/* Footer message */
.embed-code p {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280; /* gray-500 */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .embed-code {
    padding: 1.25rem 1rem;
  }

  .embed-code h4 {
    font-size: 1rem;
  }

  .embed-code textarea {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .embed-code {
    padding: 1rem;
  }

  .embed-code h4 {
    font-size: 0.95rem;
  }

  .embed-code p {
    font-size: 0.8rem;
  }
}

/* Gallery and Player page */

/* Video Gallery Grid Layout */
.s3-video-gallery-container {
  width: 80vw;
  margin: 0 auto;
  padding: 20px;
}

.s3-video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 equal columns */
  gap: 20px; /* Space between items */
  justify-content: center;
  gap: 30px;
  width: 100%;
  margin: 0 auto;
}

.s3-video-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.s3-video-card:hover {
  transform: translateY(-5px);
}

.s3-video-thumbnail {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: #f5f5f5;
  background-size: contain; /* ✅ Keep entire image visible */
  background-repeat: no-repeat; /* Prevent tiling */
  background-position: center;
}

.s3-video-thumbnail img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.s3-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
}

.s3-play-icon::after {
  content: "";
  position: absolute;
  left: 55%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-width: 10px 0 10px 15px;
  border-style: solid;
  border-color: transparent transparent transparent #fff;
}

.s3-video-title {
  margin: 0;
  padding: 15px;
  font-size: 16px;
  text-align: center;
  color: #333;
}

@media (max-width: 900px) {
  .s3-video-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablets */
  }
}

@media (max-width: 600px) {
  .s3-video-grid {
    grid-template-columns: 1fr; /* 1 column on phones */
  }
}

/* video player page content CSS */

/* Parent Page Wrapper */

.s3-video-player-page-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 1rem;
  background-color: #f3f4f6; /* Light gray background */
  min-height: 100vh;
  width: 100%;
  box-sizing: border-box;
}

/* Video Player Content Block */
.s3-video-player-container {
  background-color: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  max-width: 960px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-sizing: border-box;
}

/* Video wrapper for aspect ratio */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  border-radius: 12px;
  overflow: hidden;
  background-color: #000;
}

/* Video element */
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* Title styling */
.video-title {
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  color: #111827; /* Tailwind gray-900 */
  margin: 0;
}

/* Back link styling */
.back-to-gallery {
  text-align: center;
  display: inline-block;
  color: #3b82f6; /* Tailwind blue-500 */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.back-to-gallery:hover {
  color: #1d4ed8; /* Tailwind blue-700 */
  text-decoration: underline;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .s3-video-player-container {
    padding: 1.5rem;
  }

  .video-title {
    font-size: 1.25rem;
  }

  .s3-video-player-page-container {
    padding: 2rem 1rem;
  }
}

/* LOAD MORE CSS */

.load-more-btn {
  display: block;
  margin: 30px auto;
  padding: 12px 24px;
  background: #2271b1;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.load-more-btn:hover {
  background: #135e96;
}

.load-more-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

.error-message {
  color: #dc3232;
  text-align: center;
  margin: 20px 0;
  padding: 10px;
  background: #f8d7da;
  border-radius: 4px;
}

/* Loading animation */
.loading .s3-video-grid::after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin: 20px auto;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Loading states */
.loading-spinner {
  text-align: center;
  padding: 30px;
  color: #666;
}

.s3-video-grid {
  transition: opacity 0.3s ease;
}

.s3-video-grid.loading {
  opacity: 0.6;
  pointer-events: none;
}

.load-more-btn {
  transition: all 0.3s ease;
}

.load-more-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.loading-spinner {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
  position: relative;
}

.loading-spinner:before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: #2271b1;
  animation: spin 1s ease-in-out infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.s3-video-notice {
  padding: 20px;
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  text-align: center;
  margin: 20px 0;
  color: #666;
}

/* Search Form Styles */
.s3-video-search-form {
  display: flex;
  gap: 10px;
  margin: 0 auto 30px;
  max-width: 600px;
  width: 100%;
}

.s3-video-search-form input[type="text"] {
  flex: 1;
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 30px;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.s3-video-search-form input[type="text"]:focus {
  border-color: #2271b1;
  outline: none;
  box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
}

.s3-video-search-form button {
  padding: 12px 25px;
  background-color: #2271b1;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.s3-video-search-form button:hover {
  background-color: #135e96;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 600px) {
  .s3-video-search-form {
    flex-direction: column;
    gap: 8px;
  }

  .s3-video-search-form button {
    width: 100%;
  }
}

.s3-video-grid {
  position: relative;
  min-height: 300px;
}
.s3-video-grid.loading:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  /* Loading spinner styles */
}

/* Loading state */
.s3-video-grid.loading {
  position: relative;
  min-height: 300px;
}

.s3-video-grid.loading:after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(0, 0, 0, 0.1);
  border-top-color: #2271b1;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error and notice styles */
.s3-video-notice {
  padding: 20px;
  background: #f8f9fa;
  border-radius: 4px;
  text-align: center;
  margin: 20px 0;
  color: #666;
}

.s3-clear-search {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
  background-color: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #374151;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.s3-clear-search:hover {
  background-color: #e5e7eb;
  border-color: #9ca3af;
  color: #111827;
}

.s3-clear-search:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.s3-clear-search .clear-icon {
  font-size: 1rem;
  line-height: 1;
}

.s3-clear-search .clear-text {
  font-size: 0.875rem;
}

/* Video JS CSS */

/* Maintain a 16:9 aspect ratio */

.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding-top: 56.25%; /* 16:9 aspect ratio */
}

.video-wrapper .video-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}

/* Optional: Bigger play button */
.video-js .vjs-big-play-button {
  font-size: 3em;
  width: 80px;
  height: 80px;
  line-height: 80px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  border: none;
}

/* Guru Login form CSS */

.guru-login-form {
  max-width: 400px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.03);
}

.guru-login-form h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: #111827;
}

.guru-login-form p {
  margin-top: 1rem;
  color: #374151;
}

.guru-login-form a {
  color: #3b82f6;
  text-decoration: none;
}

.guru-login-form a:hover {
  text-decoration: underline;
}

/* WordPress login form elements */
.guru-login-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.guru-login-form input[type="text"],
.guru-login-form input[type="password"] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.guru-login-form input[type="text"]:focus,
.guru-login-form input[type="password"]:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
  outline: none;
}

.guru-login-form input[type="submit"] {
  width: 100%;
  padding: 0.75rem;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.guru-login-form input[type="submit"]:hover {
  background-color: #2563eb;
}

.guru-login-form .forgot-password {
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

.guru-login-form .forgot-password a {
  font-size: 0.9rem;
  color: #3b82f6;
  text-decoration: none;
}

.guru-login-form .forgot-password a:hover {
  text-decoration: underline;
}

/* Player page login link styling */
.player-page-login-link {
  text-align: center;
  display: inline-block;
  color: #3b82f6; /* Tailwind blue-500 */
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.player-page-login-link:hover {
  color: #1d4ed8; /* Tailwind blue-700 */
  text-decoration: underline;
}