/* Ultra Responsive CSS - EverestPrime (All Devices Optimized) */

:root {
  --primary: #007bff;
  --primary-dark: #0056b3;
  --accent: gold;
  --bg: #0f172a;
  --card-bg: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --radius: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: clamp(14px, 1vw, 16px);
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
}

/* Container */
.pdf-tools {
  width: 100%;
  max-width: 1300px;
  margin: auto;
  padding: clamp(200px, 12vw, 200px) clamp(12px, 4vw, 20px) 50px;
}

/* Hero */
.pdf-hero {
  text-align: center;
  margin-bottom: clamp(30px, 6vw, 50px);
}

.pdf-hero h1 {
  font-size: clamp(1.5rem, 6vw, 3rem);
  background: linear-gradient(90deg, gold, orange);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pdf-hero p {
  font-size: clamp(0.85rem, 2.5vw, 1.1rem);
  color: #cbd5f5;
  max-width: 700px;
  margin: 10px auto 0;
}

/* Search */
.search-container {
  width: 100%;
  max-width: 550px;
  margin: clamp(20px, 5vw, 40px) auto;
  position: relative;
  padding: 0 clamp(10px, 3vw, 15px);
}

.search-container input {
  width: 100%;
  padding: clamp(10px, 2.5vw, 14px) 45px clamp(10px, 2.5vw, 14px) 16px;
  border-radius: 50px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.08);
  color: white;
  backdrop-filter: blur(10px);
  font-size: clamp(0.85rem, 2vw, 1rem);
}

.search-container input:focus {
  border-color: var(--accent);
}

.search-container i {
  position: absolute;
  right: 25px;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(0.8rem, 2vw, 1rem);
}

/* Grid - Fully Fluid */
.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(clamp(220px, 45vw, 280px), 1fr));
  gap: clamp(15px, 3vw, 25px);
  padding: 0 clamp(10px, 3vw, 15px);
}

/* Card */
.popular-card {
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  padding: clamp(16px, 3vw, 24px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.popular-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: gold;
}

.badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  font-size: clamp(0.65rem, 2vw, 0.75rem);
  border-radius: 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.popular-card h3 {
  font-size: clamp(1rem, 3vw, 1.3rem);
  margin: 12px 0 6px;
}

.popular-card p {
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  color: #cbd5f5;
  margin-bottom: 15px;
  flex-grow: 1;
}

/* Button */
.visit-btn {
  padding: clamp(8px, 2vw, 12px) clamp(14px, 3vw, 20px);
  border-radius: 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  text-decoration: none;
  color: white;
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  text-align: center;
  width: fit-content;
}

.popular-card:hover .visit-btn {
  background: gold;
  color: black;
}

/* Mobile UX Improvements */
@media (max-width: 600px) {
  .visit-btn {
    width: 100%;
  }

  .popular-card {
    border-radius: 10px;
  }
}

/* Ultra Small Devices */
@media (max-width: 320px) {
  .pdf-tools {
    padding-top: 70px;
  }

  .pdf-hero h1 {
    font-size: 1.3rem;
  }
}

/* Animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px);} 
  to { opacity: 1; transform: translateY(0);} 
}

.popular-card {
  animation: fadeInUp 0.5s ease both;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: gold;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: orange;
}
