/* ============================================= */
/*  NAME DIRECTORY – 2025 COMPACT MAGNIFIER     */
/*  Adapted for diákszótár structure            */
/* ============================================= */

/* Root variables (add to :root if not present) */
:root {
  --color-one: rgba(255, 255, 255, 0.1);
  --color-two: #00d4ff;
  --color-three: rgba(255, 255, 255, 0.4);
  --color-four: #ff3e9d;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  --transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  --radius: 20px;
}

/* Main Container – Responsive Columns */
.name_directory_column_clear { clear: both; }
.name_directory_column {
  padding: 0 1rem;
  margin-bottom: 2rem;
  column-gap: 2rem;
  orphans: 3; widows: 3; /* Prevent bad breaks */
}

.name_directory_column.name_directory_nr2 { columns: 2; }
.name_directory_column.name_directory_nr3 { columns: 3; }
.name_directory_column.name_directory_nr4 { columns: 4; }

/* Letter Headers – Glowing Gradient */
.name_directory_character_header {
  font-size: 3rem;
  font-weight: 800;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--color-two), var(--color-four));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 3rem 0 1.5rem;
  text-align: center;
  position: relative;
  letter-spacing: -0.05em;
}

.name_directory_character_header::before {
  content: attr(data-letter);
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 6rem;
  opacity: 0.08;
  z-index: -1;
  font-weight: 900;
}

/* Name Items – Glass Cards (targets <strong> names) */
.name_directory_column strong {
  display: block;
  background: var(--color-one);
  padding: 1rem 1.5rem;
  margin-bottom: 0.5rem; /* Tight spacing for compact feel */
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-three);
  color: var(--color-two);
  font-weight: 700;
  font-size: 1.1rem;
  position: relative;
  overflow: hidden;
  break-inside: avoid; /* Prevent column breaks mid-card */
  transition: var(--transition);
  cursor: pointer; /* Hint interactivity */
}

.name_directory_column strong::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s;
}

.name_directory_column strong:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 32px rgba(0, 212, 255, 0.3);
  border-color: var(--color-four);
}

.name_directory_column strong:hover::before {
  left: 100%;
}

/* Descriptions – Hidden by Default + Magnifier Reveal (targets sibling <p>) */
.name_directory_column p {
  margin: 0.5rem 0 1rem 0 !important; /* Override any theme margins */
  padding: 1rem 1.5rem;
  background: rgba(0, 212, 255, 0.12);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-two);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
  color: #e0f7ff;
  line-height: 1.6;
  box-shadow: inset 0 2px 8px rgba(0, 212, 255, 0.1);

  /* HIDDEN BY DEFAULT: Collapsed + invisible */
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(-10px) scaleY(0.9);
  transition: var(--transition);

  /* Scroll-timeline for reveal (modern browsers) */
  animation-timeline: scroll(self block);
  animation-name: magnifierReveal;
  animation-range: entry 30% cover 60%; /* Reveal when 30-60% in view */
  animation-fill-mode: both;
}

.name_directory_column strong:hover + p,
.name_directory_column strong:focus + p {
  /* Fallback: Reveal on hover/focus for non-scroll browsers */
  opacity: 1;
  max-height: 200px; /* Adjust based on content */
  transform: translateY(0) scaleY(1);
}

/* Keyframe for smooth magnifier pop-in (scale + fade + slide) */
@keyframes magnifierReveal {
  0% {
    opacity: 0;
    max-height: 0;
    transform: translateY(-15px) scaleY(0.8);
  }
  40% {
    opacity: 0.8;
    max-height: 100px;
    transform: translateY(-2px) scaleY(1.05); /* Slight overshoot for bounce */
  }
  100% {
    opacity: 1;
    max-height: 300px; /* Max for long descriptions */
    transform: translateY(0) scaleY(1);
  }
}

/* Reverse on scroll out */
@keyframes magnifierReveal {
  /* For exit, reverse naturally via timeline */
}

/* Form Results (if used) */
.name_directory_form_result {
  margin: 2rem auto;
  max-width: 600px;
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  animation: slideIn 0.5s ease;
}

.name_directory_form_result.form-result-success {
  background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(255,255,255,0.1));
  border: 1px solid var(--color-two);
  color: var(--color-two);
}

.name_directory_form_result.form-result-error {
  background: linear-gradient(135deg, rgba(255,62,157,0.2), rgba(255,255,255,0.1));
  border: 1px solid var(--color-four);
  color: var(--color-four);
}

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

/* Hide any legacy read-more (if plugin adds it) */
.name_directory_readmore_trigger,
.name_directory_readmore_state { display: none !important; }
.name_directory_column p.revealed {
  opacity: 1 !important;
  max-height: 300px !important;
  transform: translateY(0) scaleY(1) !important;
}


.name_directory_random_name{
	margin-bottom: 5px; /* Increased spacing between messages */
    padding: 9px; /* Increased padding for a better look */
    position: relative;
    width: auto;
	font-size: 19px;
	text-align: center;
	color: var(--color-one)!important;
}
.name_directory_random_name:hover{
	box-shadow: inset 0 0 12px 4px rgba(0, 0, 0, 0.1);
	box-shadow: rgba(17, 12, 46, 0.15) 0px 21px 100px 0px;
}

/* Szotarak  CSS */

/* Random vocabulary item – toned-down glassmorphism, subtle hover lift */
.name_directory_random_name {
  margin-bottom: 16px;
  padding: 20px 32px;
  position: relative;
  width: auto;
  font-size: 21px;
  text-align: center;
  color: var(--color-one) !important;
  background: rgba(1, 58, 99, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: all var(--transition-slow);
  animation: floatIn 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
}

.name_directory_random_name:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  border-color: rgba(2, 152, 255, 0.2);
  background: rgba(1, 58, 99, 0.5);
}

/* Removed the rotating glow pseudo-element completely */

@keyframes floatIn {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Title – clean with subtle underline */
.name_directory_title {
  font-size: 15px;
  justify-content: center;
  display: flex;
  font-weight: 800;
  color: var(--color-one);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 20px;
  position: relative;
}

.name_directory_title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-four);
  transition: all var(--transition);
  transform: translateX(-50%);
}

.name_directory_title:hover::after {
  width: 60px;
}

/* Active state – subtle highlight, no pulsing glow */
.name_directory_active {
  background: var(--color-four);
  border-radius: 14px;
  padding: 8px 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Index links – clean pill with light wave effect */
.name_directory_index a {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.name_directory_index a:hover {
  background: var(--color-four);
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.name_directory_index a::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.name_directory_index a:hover::before {
  left: 100%;
  transition: left 0.6s ease;
}

/* Menu items – smooth and elegant */
.szoszedet_menu {
  margin-top: 70px !important;
}

.szoszedet_menu ul li {
  border-radius: 14px;
  overflow: hidden;
  transition: all var(--transition);
}

.szoszedet_menu ul li:hover {
  background: var(--color-four);
  transform: translateX(10px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Dictionary card – sophisticated elevation, subtle overlay on hover */
.timeline-post_szotar {
  background: var(--color-dark);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-slow);
  animation: cardReveal 1s ease-out;
  position: relative;
}

.timeline-post_szotar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(135deg, rgba(2, 73, 124, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.timeline-post_szotar:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.timeline-post_szotar:hover::before {
  opacity: 1;
}

.timeline-post_szotar h2 {
  padding: 20px 28px;
  background: linear-gradient(90deg, var(--color-four), var(--color-two));
  margin: 0;
  transition: background var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.timeline-post_szotar h2::after {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-25deg);
}

.timeline-post_szotar:hover h2::after {
  animation: shine 1.4s ease-in-out;
}

.timeline-post_szotar h2 a {
  text-decoration: none !important;
  color: var(--color-one);
  font-weight: 700;
  font-size: 1.65rem;
  letter-spacing: 0.8px;
}

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shine {
  0% { left: -150%; }
  100% { left: 150%; }
}

.szoszedet_menu a {
  color: var(--color-three) !important;
  transition: all var(--transition);
}

.szoszedet_menu a:hover {
  color: var(--color-one) !important;
}
/* Navigation menu styling – matching the premium, toned-down aesthetic */
.wp-block-navigation {
  margin: 20px 0 40px !important;
  padding: 0 20px;
}

.wp-block-navigation__container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wp-block-navigation-item {
  transition: all var(--transition);
}

.wp-block-navigation-item a {
  display: flex;
  align-items: center;
  padding: 12px 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--color-two) !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.wp-block-navigation-item a:hover {
  background: var(--color-four);
  color: var(--color-one) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Subtle shine wave effect on hover – same as index links */
.wp-block-navigation-item a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: none;
}

.wp-block-navigation-item a:hover::before {
  left: 100%;
  transition: left 0.6s ease;
}

/* Current/active menu item – highlighted like .name_directory_active */
.wp-block-navigation-item.current-menu-item a {
  background: var(--color-four);
  color: var(--color-one) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Optional: slight emphasis on active item hover (keeps style but adds lift) */
.wp-block-navigation-item.current-menu-item a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}