/* ====================================================
   SHEERPME WIKI - MAIN INDEX PAGE STYLES
   Landing page for SheerME Wiki
   ==================================================== */

/* Base reset and body styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #2c3e50;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  padding: 1.5rem 2rem 1rem;
  color: white;
}

.header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.header p {
  font-size: 1rem;
  opacity: 0.95;
  font-weight: 300;
}

/* Main container */
.main-container {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 2rem;
}

/* Categories grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 0;
}

.category-card {
  background: white;
  border-radius: 16px;
  padding: 1.5rem 1.5rem;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.category-card:hover::before {
  transform: scaleX(1);
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.category-card h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1e293b;
}

.category-card p {
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.category-badge {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--badge-bg);
  color: var(--badge-color);
}

/* Category-specific colors */
.pro-card {
  --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --badge-bg: #ede9fe;
  --badge-color: #6d28d9;
}

.b2b-card {
  --gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --badge-bg: #d1fae5;
  --badge-color: #047857;
}

.b2c-card {
  --gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --badge-bg: #dbeafe;
  --badge-color: #1d4ed8;
}

.crm-card {
  --gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --badge-bg: #fef3c7;
  --badge-color: #b45309;
}

.admin-card {
  --gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --badge-bg: #fef3c7;
  --badge-color: #b45309;
}

/* Footer */
.footer {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: white;
  text-align: center;
  padding: 1.25rem;
  margin-top: 1rem;
}

.footer a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  margin: 0 1rem;
}

.footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Welcome Popup */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; }
}

.popup-content {
  background: white;
  border-radius: 24px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2.5rem 2rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: scale(0.9);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes popIn {
  to { transform: scale(1); }
}

.popup-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: #f1f5f9;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: #64748b;
}

.popup-close:hover {
  background: #e2e8f0;
  color: #1e293b;
  transform: rotate(90deg);
}

.popup-header {
  text-align: center;
  margin-bottom: 2rem;
}

.popup-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2.5rem;
  box-shadow: 0 8px 24px rgba(118, 75, 162, 0.3);
}

.popup-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.popup-subtitle {
  font-size: 1rem;
  color: #64748b;
  font-weight: 500;
}

.popup-body {
  margin-bottom: 2rem;
}

.popup-section {
  margin-bottom: 1.5rem;
}

.popup-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #764ba2;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.popup-text {
  color: #475569;
  line-height: 1.7;
  font-size: 0.95rem;
}

.popup-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.popup-btn {
  padding: 1rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.popup-btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 16px rgba(118, 75, 162, 0.3);
}

.popup-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(118, 75, 162, 0.4);
}

.popup-btn-secondary {
  background: #f1f5f9;
  color: #64748b;
}

.popup-btn-secondary:hover {
  background: #e2e8f0;
  color: #1e293b;
}

/* =====================================
   RESPONSIVE DESIGN
   ===================================== */

/* Small mobile - 320px to 480px */
@media (max-width: 480px) {
  .header {
    padding: 2rem 1rem 1.5rem;
  }

  .header h1 {
    font-size: 1.5rem;
  }

  .header p {
    font-size: 0.9rem;
  }

  .main-container {
    padding: 1rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .category-card {
    padding: 2rem 1.25rem;
  }

  .category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .category-card h2 {
    font-size: 1.4rem;
  }

  .category-card p {
    font-size: 0.9rem;
  }

  .footer {
    padding: 1.5rem 1rem;
    font-size: 0.85rem;
  }

  .footer a {
    display: block;
    margin: 0.5rem 0;
  }

  .popup-content {
    padding: 1.25rem 1rem;
    max-height: 75vh;
    margin: 1rem;
    overflow-y: auto;
  }

  .popup-icon {
    width: 50px;
    height: 50px;
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .popup-header {
    margin-bottom: 1.25rem;
  }

  .popup-title {
    font-size: 1.3rem;
  }

  .popup-description {
    font-size: 0.9rem;
  }

  .popup-body {
    margin-bottom: 1.25rem;
  }

  .popup-section {
    margin-bottom: 1rem;
  }

  .popup-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .popup-btn {
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Large mobile - 481px to 767px */
@media (min-width: 481px) and (max-width: 767px) {
  .header {
    padding: 2.5rem 1.5rem 1.75rem;
  }

  .header h1 {
    font-size: 2rem;
  }

  .header p {
    font-size: 1rem;
  }

  .main-container {
    padding: 1.5rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-card {
    padding: 2.5rem 1.75rem;
  }

  .category-icon {
    font-size: 3.5rem;
  }

  .category-card h2 {
    font-size: 1.6rem;
  }

  .popup-content {
    padding: 1.5rem 1.25rem;
    max-height: 80vh;
  }

  .popup-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }

  .popup-title {
    font-size: 1.5rem;
  }

  .popup-actions {
    flex-direction: column;
  }

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

/* Mobile devices - up to 768px */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2rem;
  }

  .header p {
    font-size: 1rem;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .category-card {
    padding: 2rem 1.5rem;
  }

  .category-icon {
    font-size: 3rem;
  }

  .category-card h2 {
    font-size: 1.5rem;
  }
}

/* Tablets - 768px to 1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  .header h1 {
    font-size: 2.5rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .category-card {
    padding: 2.5rem 1.75rem;
  }

  .popup-content {
    padding: 2rem 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .popup-title {
    font-size: 1.5rem;
  }

  .popup-actions {
    flex-direction: column;
  }

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

/* Small laptops (11-13 inches) - 769px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
  .header {
    padding: 1.25rem 2rem 0.75rem;
  }

  .header h1 {
    font-size: 2rem;
  }

  .header p {
    font-size: 0.95rem;
  }

  .main-container {
    padding: 0.75rem 1.5rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.85rem;
  }

  .category-card {
    padding: 1.25rem 1.25rem;
  }

  .category-icon {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
  }

  .category-card h2 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
  }

  .category-card p {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .category-badge {
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
  }

  .footer {
    padding: 1rem;
    margin-top: 0.75rem;
  }

  .popup-content {
    max-width: 550px;
    padding: 2rem 1.75rem;
  }

  .popup-icon {
    width: 65px;
    height: 65px;
    font-size: 2.1rem;
  }

  .popup-title {
    font-size: 1.6rem;
  }

  .popup-btn {
    padding: 0.9rem 1.6rem;
    font-size: 0.95rem;
  }
}

/* Small laptops (MacBook Air, 13" laptops) - 1024px to 1366px */
@media (min-width: 1024px) and (max-width: 1366px) {
  .header {
    padding: 1.5rem 2rem 1rem;
  }

  .header h1 {
    font-size: 2.25rem;
  }

  .main-container {
    max-width: 1200px;
    padding: 1rem 1.75rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
  }

  .category-card {
    padding: 1.5rem 1.5rem;
  }

  .category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.65rem;
  }

  .category-card h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }

  .category-card p {
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
  }

  .category-badge {
    font-size: 0.8rem;
  }

  .footer {
    padding: 1.25rem;
    margin-top: 1rem;
  }
}

/* Medium laptops (13-14 inches) - 1025px to 1366px */
@media (min-width: 1025px) and (max-width: 1366px) {
  .header {
    padding: 1.5rem 2rem 1rem;
  }

  .header h1 {
    font-size: 2.25rem;
  }

  .header p {
    font-size: 1rem;
  }

  .main-container {
    padding: 1rem 1.75rem;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1rem;
  }

  .category-card {
    padding: 1.5rem 1.5rem;
  }

  .category-icon {
    font-size: 2.5rem;
    margin-bottom: 0.65rem;
  }

  .category-card h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
  }

  .category-card p {
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
  }

  .category-badge {
    font-size: 0.8rem;
  }

  .footer {
    padding: 1.25rem;
    margin-top: 1rem;
  }

  .popup-content {
    max-width: 600px;
    padding: 2.25rem 1.85rem;
  }

  .popup-icon {
    width: 75px;
    height: 75px;
    font-size: 2.35rem;
  }

  .popup-title {
    font-size: 1.85rem;
  }

  .popup-btn {
    padding: 0.95rem 1.85rem;
    font-size: 0.975rem;
  }
}

/* Standard laptops - 1367px to 1599px */
@media (min-width: 1367px) and (max-width: 1599px) {
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
}

/* Larger laptops (15-16 inches) - 1367px to 1600px */
@media (min-width: 1367px) and (max-width: 1600px) {
  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.85rem;
  }

  .category-card {
    padding: 2.75rem 1.85rem;
  }

  .popup-content {
    max-width: 650px;
    padding: 2.5rem 2rem;
  }
}

/* 3-column layout for larger screens (3 cards per row, 2 rows for 5 cards) */
@media (min-width: 900px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .category-card {
    padding: 2rem 1.75rem;
  }
}

/* Optimize for medium-large screens (tablets landscape and small laptops) */
@media (min-width: 900px) and (max-width: 1199px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .category-card {
    padding: 1.75rem 1.5rem;
  }

  .category-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
  }

  .category-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .category-card p {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
  }

  .category-badge {
    font-size: 0.78rem;
    padding: 0.38rem 0.8rem;
  }
}

/* Optimize for 11" MacBook and similar screens (1024-1440px) */
@media (min-width: 1024px) and (max-width: 1440px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }

  .category-card {
    padding: 1.85rem 1.65rem;
  }

  .category-icon {
    font-size: 2.35rem;
    margin-bottom: 0.8rem;
  }

  .category-card h2 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
  }

  .category-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
  }

  .category-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.85rem;
  }
}
