/* the image-gallery */
.image-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.image-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 200px;
  background: #f9f9f9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 6px rgba(0,0,0,0.1);
}

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

.preview-thumb {
  width: 100%;
  height: auto;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s;
}

.preview-thumb:hover {
  transform: scale(1.05);
}

.image-footer {
  padding: 10px;
  font-size: 14px;
  background: #fff;
  text-align: center;
  width: 100%;
  border-top: 1px solid #eee;
  font-weight: bold;
}

.image-gallery img {
  width: 250px;
  height: 200px;
  object-fit: cover;
  cursor: pointer;
  border-radius: 8px;
  transition: transform 0.2s;
}

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

/* Modal preview */
.preview-modal {
 position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75); /* semi-transparent */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
   overflow: hidden;
}

/* Show Modal */
.preview-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.preview-img {
    max-width: 90%;
  max-height: 90%;
  animation: zoomFadeIn 0.4s ease forwards;
   /* margin-bottom: auto; push buttons down */
  /* max-width: 90%;
  max-height: 80%; */
  /* border-radius: 10px; */
   /* animation: zoomFade 0.4s ease forwards; */
}

/* Modal overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  padding-top: 100px;
  font-family: Arial, sans-serif;
}

/* Modal inner */
.modal-content {
  background: #fff;
  margin: auto;
  padding: 30px 25px;
  width: 90%;
  max-width: 420px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  text-align: center;
  position: relative;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-20px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Close button */
.close {
  position: absolute;
  top: 15px; right: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}
.close:hover {
  color: #000;
}

/* Title / subtitle */
.modal-title {
  font-size: 20px;
  margin-bottom: 10px;
  font-weight: 700;
}
.modal-subtitle {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
}

/* Input + button */
.form-inline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.form-control {
  flex: 1;
  padding: 12px 15px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
  outline: none;
}
.form-control:focus {
  border-color: #007bff;
  box-shadow: 0 0 4px rgba(0,123,255,0.3);
}

.click-btn {
  background: #007bff;
  color: #fff;
  border: none;
  padding: 12px 18px;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}
.click-btn:hover {
  background: #0056b3;
}

/* Feedback messages */
.info {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
}
.info.success { color: #28a745; }
.info.error { color: #dc3545; }
.info.notice { color: #007bff; }


/* Put this in your CSS */
.info {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
}

.info.success {
  color: #28a745; /* Bootstrap green */
}

.info.error {
  color: #dc3545; /* Bootstrap red */
}

.info.notice {
  color: #007bff; /* Bootstrap blue */
}

/* Reuse modal styles */
.xmodal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}
.xmodal-content {
  background: white;
  margin: 12% auto;
  padding: 20px;
  border-radius: 10px;
  width: 400px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  animation: xfadeIn 0.3s ease-in-out;
}



.closeX {
  float: right;
  font-size: 20px;
  cursor: pointer;
}
.alert-box {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
.alert-box span { font-weight: bold; }

@keyframes xfadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Zoom + Fade In */
@keyframes zoomFadeIn {
  from {
    transform: scale(0.7);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Optional Zoom Out */
@keyframes zoomFadeOut {
  from {
    transform: scale(1);
    opacity: 1;
  }
  to {
    transform: scale(0.7);
    opacity: 0;
  }
}

.preview-modal .close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 30px;
  color: white;
  cursor: pointer;
}

.hidden {
  display: none;
}


/* .fav-btn {
  font-size: 28px;
  margin: 0 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.fav-btn:hover {
  transform: scale(1.2);
}

.active-fav {
  border: 2px solid #000;
  border-radius: 50%;
  padding: 4px;
  background: #f0f0f0;
} */

/* Default favourite button */

/* Favorite container pinned at bottom-center */
.favorite-bar {
  position: absolute;
  bottom: 20px;   /* distance from bottom of modal */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 12px;
}

.fav-btn {
  font-size: 28px;
  margin: 0 10px;
  cursor: pointer;
  transition: transform 0.2s ease;
  border-radius: 50%;
  padding: 4px;
}

/* Hover effect */
.fav-btn:hover {
  transform: scale(1.2);
}

/* Highlight states */
.fav-btn.active-fav[data-color="green"] {
  border: 2px solid #28a745;   /* green */
  background: #e6f9ec;
}

.fav-btn.active-fav[data-color="blue"] {
  border: 2px solid #007bff;   /* blue */
  background: #e6f0ff;
}

.fav-btn.active-fav[data-color="red"] {
  border: 2px solid #dc3545;   /* red */
  background: #ffe6e9;
}

.fav-label {
  /* margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #444; */
   position: absolute;
  top: 20px;   /* distance from bottom of modal */
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  font-size: 14px;
  color: #444;
  font-weight: 600;
}

/* .fav-label {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
} */

.fav-label.green { color: #28a745; }  /* green */
.fav-label.blue  { color: #007bff; }  /* blue */
.fav-label.red   { color: #dc3545; }  /* red */

@keyframes pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.fav-btn.pulse {
  animation: pulse 0.4s ease;
}

/* Responsive tweaks */
@media (max-width: 600px) {
  .favorite-btn {
    font-size: 22px;
  }
  .favorite-container {
    gap: 8px;
    bottom: 15px;
  }
}

@media (max-width: 480px ){
  .xmodal-content {
  width: 320px;
}
}


.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.6);
  border: none;
  color: white;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  z-index: 1000;
  border-radius: 4px;
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.nav-btn:hover {
  background: rgba(0,0,0,0.8);
}




/* End */





.box{ 
    display:flex;
    flex-direction:row;
     flex-wrap:wrap;
     margin: 5% 0;
  }
  .hype-label {
    position: absolute;
    top: 8px;
    left: 8px;
    /* background-color: red; */
    /* background-color: rgb(17, 89, 17); */
    background-color: rgb(17, 89, 17);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    /* z-index: 2; */
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0,0,0,0.5);
  }
  .card-video {
            width: 305px;
            display: flex;
            flex-direction: column;
            margin:0.5rem;
        }

        .card-pic a {
            /* display: block;          Make the link a block element */
            width: 100%;             /* Ensure it fills the parent */
            height: 100%;            /* Match the container height */
            position: relative;      /* Required for absolute child icons */
            overflow: hidden;        /* Prevents weird clipping */
          }
          
        .card-pic img {
            object-fit: cover;
            width: 100%;
            height: 100%;
            max-width: 305px;
            max-height: 170px;
            /* border: 2px solid lime; */
        }


        .card-info-logo {
            position: absolute;
            right: 5px;
            top: -28px;
        }

        .card-info-logo img {
            width: 55px;
            border-radius: 50%;
            border: 4px solid #5e4b55;
        }

        .card-info {
            position: relative;
            background-color: #292828;
            height: 90px;
            padding: 7px 10px 10px 10px;
            display: flex;
            flex-direction: column;
        }

        .card-info-top {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .card-info .card-info-category {
            color: #546e7a;
            font-size: 14px;
        }

        .card-info .card-info-title {
            color: #546e7a;
            font-size: 14px;
            padding-bottom: 5px;
        }

        .card-info-bottom {
            border-top: solid 1px #44393e;
            padding-top: 7px;
            display: flex;
            align-items: center;
            line-height: 1;
            justify-content: space-between;
        }

        .card-info .card-info-bottom .views {
            color: #546e7a;
            font-size: 12px;

        }

        .card-info .card-info-bottom .date {
            color: #546e7a;
            font-size: 12px;
        }
        
        .card-pic:hover .clip-icon{
            display:block;
        }

        .card-pic {
            /* border: 2px dashed red; */
            display: flex;
            flex-wrap: wrap;
            margin: 0;
            padding: 0;
            list-style: none;
            position:relative;
        }
        .clip-icon a {
          position: relative
        }
        .clip-icon {
            position: absolute;
            bottom:10px;
            left:5px;
            width:30px;
            height:30px;
            background-color:white;
            display:none;
        }

        .clip-icon:hover {
            /* background-color: red; */
            background-color: rgb(200, 204, 204);
            
        }
        .clip-icon span {
            position: absolute;
            top: 20%; left: 20%;
            /* color: red; */
        }