/* ================================================
   ToolVault — Converter landing premium (master UI)
   Pairs with: landing/*.php + main.css variables
   ================================================ */

.premium-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 2.25rem 1.25rem 4rem;
}

/* ---------- Hero ---------- */
.premium-hero {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2rem 1rem 2.25rem;
  border-radius: var(--radius-xl, 20px);
  background: linear-gradient(
    165deg,
    var(--primary-glass, rgba(108, 99, 255, 0.08)) 0%,
    var(--bg-light, #f8fafc) 45%,
    var(--bg, #fff) 100%
  );
  border: 1px solid var(--border-light, #edf2f7);
  box-shadow: var(--shadow-md, 0 4px 6px rgba(0, 0, 0, 0.07));
  position: relative;
  overflow: hidden;
}

.premium-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 55%;
  height: 140%;
  background: radial-gradient(
    circle,
    var(--primary-transparent, rgba(108, 99, 255, 0.12)) 0%,
    transparent 68%
  );
  pointer-events: none;
  animation: premiumGlow 14s ease-in-out infinite alternate;
}

@keyframes premiumGlow {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }
  100% {
    transform: translate(-12px, 8px) scale(1.08);
    opacity: 0.85;
  }
}

.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-dark, #564fcc);
  background: var(--bg, #fff);
  border: 1px solid var(--primary-lighter, #c8c4ff);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08));
  margin-bottom: 1.15rem;
  position: relative;
  z-index: 1;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--success, #48bb78), #38a169);
  box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.35);
  animation: badgeDotPulse 2s ease-in-out infinite;
}

@keyframes badgeDotPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

.premium-title {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 800;
  color: var(--text, #1a202c);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 0.85rem;
  position: relative;
  z-index: 1;
}

.premium-subtitle {
  font-size: 1.05rem;
  color: var(--text-light, #4a5568);
  line-height: 1.65;
  max-width: 640px;
  margin: 0 auto 1.75rem;
  position: relative;
  z-index: 1;
}

.premium-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem 1rem;
  position: relative;
  z-index: 1;
}

.premium-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light, #4a5568);
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #fff;
}

.stat-icon.icon-shield {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 4px 14px var(--primary-transparent, rgba(108, 99, 255, 0.35));
}

.stat-icon.icon-zap {
  background: linear-gradient(135deg, #ed8936, #dd6b20);
  box-shadow: 0 4px 14px rgba(237, 137, 54, 0.35);
}

.stat-icon.icon-infinity {
  background: linear-gradient(135deg, #4299e1, #3182ce);
  box-shadow: 0 4px 14px rgba(66, 153, 225, 0.35);
}

/* ---------- Drop zone ---------- */
.premium-drop-zone-wrapper {
  margin-bottom: 2rem;
}

.premium-drop-zone,
#drop-area.premium-drop-zone {
  position: relative;
  text-align: center;
  padding: 2.75rem 1.75rem;
  border-radius: var(--radius-xl, 20px);
  border: 2.5px dashed var(--primary-lighter, #c8c4ff);
  background: var(--primary-glass, rgba(108, 99, 255, 0.06));
  cursor: pointer;
  transition: transform 0.28s ease, box-shadow 0.28s ease,
    border-color 0.28s ease, background 0.28s ease;
}

.premium-drop-zone:hover,
#drop-area.premium-drop-zone:hover {
  border-color: var(--primary);
  background: var(--primary-transparent, rgba(108, 99, 255, 0.12));
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--primary-transparent, rgba(108, 99, 255, 0.22));
}

.premium-drop-zone.dragover,
#drop-area.premium-drop-zone.dragover,
#drop-area.drag-over.premium-drop-zone {
  border-color: var(--primary-dark);
  background: var(--primary-transparent, rgba(108, 99, 255, 0.18));
  transform: scale(1.01);
  box-shadow: 0 14px 44px var(--primary-transparent, rgba(108, 99, 255, 0.35));
}

.drop-icon-container {
  width: 76px;
  height: 76px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark));
  box-shadow: 0 10px 30px var(--primary-transparent, rgba(108, 99, 255, 0.45));
  animation: dropIconFloat 3.2s ease-in-out infinite;
}

@keyframes dropIconFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.drop-title {
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--text, #2d3748);
  margin-bottom: 0.45rem;
}

.drop-subtitle {
  font-size: 0.92rem;
  color: var(--text-lighter, #718096);
  margin-bottom: 1.35rem;
  line-height: 1.45;
}

/* Buttons */
.premium-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.78rem 1.85rem;
  border-radius: var(--radius-full, 9999px);
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.premium-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 6px 22px var(--primary-transparent, rgba(108, 99, 255, 0.4));
}

.premium-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px var(--primary-transparent, rgba(108, 99, 255, 0.5));
}

.premium-btn-outline {
  background: var(--bg, #fff);
  color: var(--primary-dark);
  border: 2px solid var(--primary-lighter);
}

.premium-btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-transparent);
}

/* ---------- Format row ---------- */
.premium-format-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem 1rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-lg, 14px);
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
  margin-bottom: 1.75rem;
}

.format-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-light, #4a5568);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.format-label i {
  color: var(--primary);
}

.format-output {
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  background: var(--primary-transparent, rgba(108, 99, 255, 0.12));
  color: var(--primary-dark);
  border: 1px solid var(--primary-lighter);
}

.format-arrow {
  color: var(--primary);
  font-size: 1.1rem;
  opacity: 0.85;
}

.premium-select-wrap {
  min-width: 200px;
}

.premium-select {
  width: 100%;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md, 10px);
  border: 1.5px solid var(--primary-lighter);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text, #2d3748);
  background: var(--bg, #fff);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.premium-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glass);
}

/* ---------- Results ---------- */
.premium-results {
  min-height: 0;
}

.premium-results .alert {
  border-radius: var(--radius-md, 12px);
}

/* ---------- Divider ---------- */
.premium-divider {
  border: none;
  border-top: 1px solid var(--border, #e2e8f0);
  margin: 2.25rem 0 1.75rem;
}

/* ---------- Related ---------- */
.premium-related-title {
  font-family: var(--font-heading, 'Poppins', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text, #1a202c);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.premium-related-title i {
  color: var(--primary);
}

.premium-related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

@media (min-width: 640px) {
  .premium-related-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.premium-related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.45rem;
  padding: 0.85rem 0.65rem;
  border-radius: var(--radius-lg, 14px);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--bg-light, #f8fafc);
  border: 1px solid var(--border-light, #edf2f7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background 0.2s ease, color 0.2s ease;
}

.premium-related-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary-lighter);
  background: var(--primary-transparent);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
  color: var(--primary-darker, #3d38a3);
}

.related-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
}

/* ---------- Dark theme ---------- */
[data-theme='dark'] .premium-hero {
  background: linear-gradient(
    165deg,
    rgba(123, 115, 255, 0.12) 0%,
    var(--bg-light, #2d3748) 50%,
    var(--bg, #1a202c) 100%
  );
  border-color: var(--border, #4a5568);
}

[data-theme='dark'] .premium-title,
[data-theme='dark'] .premium-related-title {
  color: var(--text, #f7fafc);
}

[data-theme='dark'] .premium-subtitle,
[data-theme='dark'] .drop-subtitle {
  color: var(--text-light, #cbd5e0);
}

[data-theme='dark'] .drop-title {
  color: var(--text, #f7fafc);
}

[data-theme='dark'] .premium-stat {
  background: var(--card-bg, #2d3748);
  border-color: var(--border, #4a5568);
  color: var(--text-light, #e2e8f0);
}

[data-theme='dark'] .premium-badge {
  background: var(--card-bg, #2d3748);
  color: var(--primary-light, #9d94ff);
  border-color: var(--border, #4a5568);
}

[data-theme='dark'] .premium-drop-zone,
[data-theme='dark'] #drop-area.premium-drop-zone {
  background: rgba(123, 115, 255, 0.08);
  border-color: var(--border, #4a5568);
}

[data-theme='dark'] .premium-format-row {
  background: var(--card-bg, #2d3748);
  border-color: var(--border, #4a5568);
}

[data-theme='dark'] .premium-select {
  background: var(--bg-dark, #1e2734);
  color: var(--text, #f7fafc);
  border-color: var(--border, #4a5568);
}

[data-theme='dark'] .premium-related-card {
  background: var(--card-bg, #2d3748);
  border-color: var(--border, #4a5568);
  color: var(--primary-light, #a29bfe);
}

[data-theme='dark'] .premium-divider {
  border-top-color: var(--border, #4a5568);
}

/* ============================================
   MOBILE RESPONSIVE FIXES
   ============================================ */

@media (max-width: 768px) {
  .premium-container {
    padding: 20px 14px 40px;
    max-width: 100%;
    overflow-x: hidden;
  }

  .premium-hero {
    padding: 0;
  }

  .premium-title {
    font-size: 1.6rem;
    word-break: break-word;
  }

  .premium-subtitle {
    font-size: 0.95rem;
    padding: 0 4px;
  }

  .premium-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .premium-stat {
    font-size: 0.8rem;
  }

  .premium-drop-zone {
    padding: 28px 16px;
  }

  .drop-icon-container {
    width: 64px;
    height: 64px;
  }

  .drop-icon-container i {
    font-size: 1.8rem;
  }

  .premium-format-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 14px;
  }

  .format-arrow {
    display: none;
  }

  .premium-select-wrap {
    min-width: unset;
    width: 100%;
  }

  .premium-select {
    width: 100%;
  }

  .format-output {
    text-align: center;
  }

  .premium-related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .premium-related-card {
    padding: 12px;
    font-size: 0.82rem;
  }

  .related-card-icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .conversion-success-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .success-download-btn {
    width: 100%;
    justify-content: center;
  }

  .premium-btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .premium-title {
    font-size: 1.4rem;
  }

  .premium-related-grid {
    grid-template-columns: 1fr;
  }

  .premium-badge {
    font-size: 0.72rem;
    padding: 4px 12px;
  }

  .drop-icon-container {
    width: 56px;
    height: 56px;
  }

  .drop-icon-container i {
    font-size: 1.5rem;
  }
}

/* ---- Breadcrumb ---- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem 0;
  gap: 4px;
  align-items: center;
  font-size: 0.85rem;
}

.breadcrumb-item {
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 4px;
}

.breadcrumb-item a {
  color: var(--primary, #4f46e5);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumb-item a:hover {
  color: var(--accent, #7c3aed);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: '/';
  color: var(--text-muted, #94a3b8);
  margin-right: 4px;
}

.breadcrumb-item.active {
  color: var(--text, #1e293b);
  font-weight: 500;
}

/* ---- Tool SEO section (How to, Features, FAQ) ---- */
.container.mt-5.mb-4 {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem 2rem;
}

.container.mt-5.mb-4 h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin: 2rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

/* FAQ questions only — do not target .tool-card h3 (featured tools grid) */
.container.mt-5.mb-4 [itemtype="https://schema.org/FAQPage"] h3,
.container.mt-5.mb-4 article[itemprop="mainEntity"] h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary, #4f46e5);
  margin: 1.25rem 0 0.4rem;
}

.container.mt-5.mb-4 .tool-seo-intro p,
.container.mt-5.mb-4 article[itemprop="mainEntity"] p {
  font-size: 0.95rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.container.mt-5.mb-4 ul,
.container.mt-5.mb-4 ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.container.mt-5.mb-4 li {
  font-size: 0.92rem;
  color: var(--text-secondary, #64748b);
  line-height: 1.7;
  margin-bottom: 0.3rem;
}

/* FAQ items on tool pages */
.faq-section,
[itemtype*="FAQPage"] {
  margin-top: 1.5rem;
}

[itemprop="name"] strong,
.faq-question {
  color: var(--text, #1e293b);
  font-weight: 600;
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.3rem;
}

[itemprop="text"],
.faq-answer {
  color: var(--text-secondary, #64748b);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Homepage-style featured tools: widen grid to match main site (SEO column stays 860px). */
.container.mt-5.mb-4 .converter-featured-tools {
  width: min(1200px, calc(100vw - 2rem));
  max-width: min(1200px, calc(100vw - 2rem));
  margin-left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  padding-bottom: 0.5rem;
}

.container.mt-5.mb-4 .converter-featured-tools .tool-grid {
  margin-bottom: 1.25rem;
}
