/*ancientfit-frontend/css/ehd.css*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/*MainStyle */
body {
  background: url('../Images/EHD/HistoryCover.jpg') no-repeat center center fixed;
  background-size: cover;
}

/* Container with background */
.container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  padding: 20px;
}

/* Card styles for left and right boxes */
.left, .right {
  flex: 1 1 45%;
  max-width: 600px;
  min-width: 280px;
  padding: 25px;
  color: white;
  border: 3px solid #0C2233;
  border-radius: 12px;
  display: flex;           /* Make flex column to allow scrollable-box to fill height */
  flex-direction: column;
  background: linear-gradient(
    135deg,
    rgba(13, 13, 13, 0.55),
    rgba(44, 44, 46, 0.55),
    rgba(31, 42, 68, 0.55),
    rgba(10, 15, 26, 0.55)
  );
  backdrop-filter: blur(6px);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.5);
}

/* Hover glow effect */
.left:hover, .right:hover {
  border-color: #c41515;
  transition: 0.5s;
  box-shadow: 0 0 40px rgba(255, 1, 1, 0.4);
}

/* Text styles */
.left h1, .right h1 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.left p, .right p {
  font-size: 1rem;
  line-height: 1.6;
  text-align: justify;
  margin: 0 0 1rem 0;
}

/* Scrollable inner content */
.scrollable-box {
  overflow-y: auto;
  padding-right: 12px;
  flex: 1;                  /* Fill parent container's remaining height */
  max-height: 80vh;         /* Adjust as needed for screen */
  scrollbar-width: thin;
  scrollbar-color: #c41515 transparent;
}

/* Custom Scrollbar for WebKit */
.scrollable-box::-webkit-scrollbar {
  width: 8px;
}
.scrollable-box::-webkit-scrollbar-track {
  background: transparent;
}
.scrollable-box::-webkit-scrollbar-thumb {
  background-color: #c41515;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

/* Responsive for tablets and phones */
@media (max-width: 900px) {
  .left, .right {
    flex: 1 1 100%;
    max-width: 100%;
  }

  .scrollable-box {
    max-height: 60vh;
  }
}

@media (max-width: 500px) {
  .left h1, .right h1 {
    font-size: 1.5rem;
  }

  .left p, .right p {
    font-size: 0.95rem;
  }

  .scrollable-box {
    max-height: 50vh;
  }
}

/* === Responsive Scrollable Card Container === */
.card-scroll-container {
  max-width: 1000px;
  padding: 1.5rem;
  margin: 0 auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  box-sizing: border-box;
  max-height: 600px;      
}

/* === Grid Layout === */
.card-grid {
  background-image: url(../Images/EHD/EHD2ndArticleCover0.jpg);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  width: 100%;
  overflow-y: auto;
  max-height: 600px; /* or your preferred height */
}

.card-grid {
  scrollbar-width: thin; /* For Firefox */
  scrollbar-color: #ff1a1a rgba(0, 0, 0, 0.4); /* thumb + track color */
}

/* === Chrome, Edge, and Safari === */
.card-grid::-webkit-scrollbar {
  width: 10px; /* scrollbar width */
}

.card-grid::-webkit-scrollbar-track {
  background: linear-gradient(180deg, #220000, #000000); /* dark base track */
  border-radius: 10px;
}

.card-grid::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #ff0000, #990000); /* glossy red thumb */
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-grid::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #ff3333, #cc0000);
  box-shadow: 0 0 15px rgba(255, 50, 50, 0.9);
}
/* === Section Title === */
.section-title {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  text-align: center;
  padding: 1rem;
}

.section-title h2 {
  font-size: 2rem;
  font-weight: 700;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 90%;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* === Card Styling === */
.card {
  position: relative;
  margin: 10px;
  padding: 1.5rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05); /* transparent glass */
  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.4),
    inset 0 1px 3px rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  overflow: hidden;
  box-sizing: border-box;
}

/* === Hover Effect === */
.card:hover {
  transform: translateY(-5px);
  transition: 0.5s;
  box-shadow: 0 0 40px rgba(255, 1, 1, 0.4);
}

/* === Optional subtle shimmer effect === */
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.05),
    rgba(255, 255, 255, 0.15),
    rgba(255, 255, 255, 0.05)
  );
  transform: skewX(-25deg);
  transition: left 0.6s ease-in-out;
  z-index: 1;
  mix-blend-mode: screen;
}
.card:hover::after {
  left: 140%;
}

/* === Card Text === */
.card .card-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}
.card .card-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.4;
}



/* Modal Overlay (Glass Dark) */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.hidden {
  display: none;
}

/* Modal Content */
.modal-content {
  background: rgba(30, 30, 30, 0.85);
  backdrop-filter: blur(12px);
  padding: 25px;
  max-width: 90%;
  width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 14px;
  position: relative;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
  color: #e0e0e0;
  font-family: 'Segoe UI', sans-serif;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Scrollbar Styling */
.modal-content::-webkit-scrollbar {
  width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}
.modal-content::-webkit-scrollbar-track {
  background: transparent;
}

/* Image Styling */
.modal-content img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 15px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
}

/* Text Headers */
.modal-content h2,
.modal-content h3,
.modal-content h4 {
  color: #ffffff;
  margin-bottom: 12px;
  font-weight: 600;
}

.modal-content h4 {
  text-align: start;
  color: #cccccc;
}

/* Paragraphs and Lists */
.modal-content p,
.modal-content ul {
  text-align: justify;
  font-size: 0.96rem;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #d0d0d0;
}

.modal-content ul {
  padding-left: 20px;
}

.modal-content li {
  padding: 5px 0;
}

/* Links */
.modal-content a {
  display: block;
  margin-bottom: 15px;
  color: #66ccff;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}

.modal-content a:hover {
  color: #ffffff;
  transform: scale(1.02);
  text-decoration: underline;
}

/* Close Button */
.close-button {
  position: absolute;
  top: 12px;
  right: 15px;
  font-size: 22px;
  font-weight: bold;
  color: #ff4b4b;
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 0, 0, 0.2);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  line-height: 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

.close-button:hover {
  background: rgba(255, 0, 0, 0.3);
  transform: scale(1.1);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}


.action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: center;
  position: relative;
  margin-top: 20px;
}

.share-popup {
  position: absolute;
  top: -70px; /* adjust as needed */
  background-color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  gap: 10px;
  z-index: 1000;
}


.action-buttons button {
  background: rgba(30, 30, 30, 0.9);
  color: #e2e2e2;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 12px 24px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 255, 100, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Like button */
.like-btn::before {
  font-size: 18px;
}

.like-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.like-btn.liked {
  background-color: #07081b;
  color: #B6B09F;
}

/* Share button */
.action-buttons button:nth-child(2)::before {
  content: '🔗';
  font-size: 18px;
}

/* Hover effect */
.action-buttons button:hover {
  background-color: #1a2e4b; /* slightly lighter olive-black */
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(3, 7, 70, 0.267);
}

.share-popup img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  transition: transform 0.2s ease;
}
.share-popup.hidden {
  display: none;
}

.share-popup img:hover {
  transform: scale(1.2);
  border-color: #444;
  background-color: #f1f1f1;
}

/*Inside popup Window Scroll to Top*/
  .scroll-top-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 55px;
  height: 55px;
  background: linear-gradient(145deg, #1e1e1e, #111);
  color: #f0f0f0;
  border: 1px solid rgba(100, 100, 100, 0.2);
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
  transition: all 0.3s ease;
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.02),
    0 4px 15px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Hover Effect: subtle lighting */
.scroll-top-button:hover {
  background: linear-gradient(145deg, #2a2a2a, #141414);
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.03),
    0 6px 20px rgba(0, 0, 0, 0.7);
  transform: scale(1.05);
}

/* Hide when not needed */
.scroll-top-button.hidden {
  display: none;
}
/* END of POP UP scroll TO TOP */

  /* The BlackList */
  .blacklist-section {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    color: #f0f0f0;
    background: linear-gradient(145deg, #1a1a1a, #0e0e0e);
    border-radius: 16px;
    border: 1px solid rgba(80, 80, 80, 0.3);
    box-shadow:
      inset 0 0 10px rgba(255, 255, 255, 0.02),
      0 0 30px rgba(0, 0, 0, 0.6),
      0 8px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
  }

.blacklist-section:Hover {
  transition: 0.5s;
  box-shadow: 0 0 40px rgba(255, 1, 1, 0.4);
}  


.blacklist-title {
  text-align: center;
  margin-bottom: 20px;  
}
.blacklist-title h2 {
  justify-content: center;
  align-items: center;
  margin: 0;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

    .blacklist-section h2 {
      color: red;
      padding: 10px;
    }
    .blacklist-item strong {
        padding-left: 20px;
        padding-right: 20px;
        color: #D39D55;
    }
    .blacklist-item ul {
        padding-left: 45px;
        padding-right: 45px;
        text-align: justify;
    }
    .blacklist-item {
      margin-bottom: 15px;
    }
    .close-btn {
      display: inline-block;
    }

/* Make blacklist section scrollable */
.blacklist-section {
  max-height: 500px; /* adjust this value based on your layout */
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c41515 black;
}

/* Custom scrollbar (Webkit Browsers) */
.blacklist-section::-webkit-scrollbar {
  width: 8px;
}
.blacklist-section::-webkit-scrollbar-track {
  background: #111;
}
.blacklist-section::-webkit-scrollbar-thumb {
  background-color: #D39D55;
  border-radius: 10px;
}

/* Copy Link Button */
.copy-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin: 10px 0 20px 0;
  background: linear-gradient(145deg, #2b2b2b, #1a1a1a);
  color: #D39D55;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    inset 0 0 5px rgba(255, 255, 255, 0.06),
    0 0 15px rgba(0, 0, 0, 0.4);
}

.copy-link-btn:hover {
  background: linear-gradient(145deg, #3b3b3b, #2a2a2a);
  transform: translateY(-2px);
  box-shadow:
    0 0 18px rgba(255, 0, 0, 0.35),
    inset 0 0 10px rgba(255, 255, 255, 0.05);
}

/* Glow effect when copied */
.copy-link-btn.copied {
  color: #ffe2a8;
  border-color: #D39D55;
  box-shadow:
    0 0 25px rgba(211, 157, 85, 0.6),
    0 0 10px rgba(211, 157, 85, 0.5);
  transform: scale(1.05);
}

.copy-toast {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(211,157,85,0.95);
  color: black;
  padding: 8px 18px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.9rem;
  text-shadow: 0 0 4px #fff, 0 0 8px #D39D55;
  box-shadow: 0 0 12px rgba(211,157,85,0.7), 0 0 25px rgba(211,157,85,0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 10;
  overflow: hidden;
}

.copy-toast .glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(211,157,85,0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  pointer-events: none;
  animation: glowPulse 1.5s ease-out forwards;
}

@keyframes glowPulse {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
  50% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0; }
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-35px);
}

.hidden {
  display: none;
}

/* Make blacklist section relative so toast stays inside it */
.blacklist-section {
  position: relative;
}

.highlight-pulse {
  animation: pulseGold 1.5s ease-out;
}

@keyframes pulseGold {
  0% {
    box-shadow: 0 0 0px rgba(211,157,85, 0.0);
  }
  40% {
    box-shadow: 0 0 30px rgba(211,157,85, 0.4);
  }
  100% {
    box-shadow: 0 0 0px rgba(211,157,85, 0.0);
  }
}

    
