/* NetworkingWala.in - Custom Styles */
html, body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4);
  }
  50% {
    box-shadow: 0 0 20px 10px rgba(14, 165, 233, 0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease-out forwards;
}

.animate-slideIn {
  animation: slideIn 0.5s ease-out forwards;
}

.animate-pulse-glow {
  animation: pulse-glow 2s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Cards */
.product-card {
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

.product-card .compare-btn {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .compare-btn {
  opacity: 1;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #0ea5e9, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass Effect */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  box-shadow: 0 10px 30px -10px rgba(14, 165, 233, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  background: white;
  border: 1px solid #e5e7eb;
  color: #374151;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.btn-accent {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-accent:hover {
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

/* Form Inputs */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-input.error {
  border-color: #ef4444;
}

/* Category Icons */
.category-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  border-radius: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #0284c7;
  transition: all 0.3s ease;
}

.category-card:hover .category-icon {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
  transform: scale(1.1);
}

/* Specification Table */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

.spec-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
}

.spec-table tr:hover td {
  background: #f8fafc;
}

/* Compare Highlight */
.compare-highlight {
  background: linear-gradient(135deg, #dcfce7, #bbf7d0) !important;
}

.compare-lowlight {
  background: linear-gradient(135deg, #fee2e2, #fecaca) !important;
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

/* Community Post Card */
.post-card {
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.post-card:hover {
  border-left-color: #0ea5e9;
  transform: translateX(5px);
}

/* Scroll Animations */
.scroll-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Comparison Tray */
.compare-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -10px 40px -10px rgba(0, 0, 0, 0.1);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 40;
}

.compare-tray.active {
  transform: translateY(0);
}

/* Hero Pattern */
.hero-pattern {
  background-image:
    radial-gradient(
      circle at 25% 25%,
      rgba(14, 165, 233, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 75%,
      rgba(139, 92, 246, 0.1) 0%,
      transparent 50%
    );
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
  a,
  button,
  .btn-primary,
  .btn-secondary,
  .btn-accent,
  select,
  input[type="submit"] {
    min-height: 44px;
    min-width: 44px;
  }

  /* Disable hover transforms on touch devices */
  .product-card:hover {
    transform: none;
  }

  .post-card:hover {
    transform: none;
  }

  .btn-primary:hover,
  .btn-accent:hover {
    transform: none;
  }
}

/* Responsive Table Wrapper */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: -ms-autohiding-scrollbar;
}

.table-responsive::-webkit-scrollbar {
  height: 4px;
}

/* Mobile (up to 640px) */
@media (max-width: 640px) {
  .category-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    border-radius: 0.875rem;
  }

  /* Full-width buttons on mobile */
  .btn-primary,
  .btn-secondary,
  .btn-accent {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Responsive typography */
  h1 {
    font-size: 1.75rem !important;
  }
  h2 {
    font-size: 1.5rem !important;
  }
  h3 {
    font-size: 1.25rem !important;
  }

  /* Spec table on mobile */
  .spec-table th,
  .spec-table td {
    padding: 0.625rem 0.5rem;
    font-size: 0.8125rem;
  }

  /* Compare tray - full width on mobile */
  .compare-tray {
    padding: 0.75rem;
  }

  .compare-tray .flex {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Hero adjustments */
  .hero-pattern {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}

/* Mobile Menu - Hamburger button always visible on mobile/tablet */
@media (max-width: 1023px) {
  /* Ensure nav doesn't clip the mobile hamburger button */
  nav {
    overflow: visible !important;
  }
  
  /* Make hamburger button more prominent */
  #mobile-menu-icon {
    font-size: 1.5rem;
  }
  
  /* Mobile menu safe area padding */
  #mobile-menu {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}

/* Tablet (641px to 1023px) */
@media (min-width: 641px) and (max-width: 1023px) {
  .category-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    border-radius: 1rem;
  }

  /* Spec table readable on tablet */
  .spec-table th,
  .spec-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
  }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
  .category-icon {
    width: 80px;
    height: 80px;
    font-size: 2rem;
    border-radius: 1.5rem;
  }
}

/* Print styles */
@media print {
  nav,
  footer,
  .compare-tray,
  .btn-primary,
  .btn-secondary {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Selection */
::selection {
  background: rgba(14, 165, 233, 0.2);
  color: #0369a1;
}

/* Safe area insets for modern mobile devices (notch, rounded corners) */
@supports (padding: env(safe-area-inset-bottom)) {
  .compare-tray {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }
  footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Prevent images from overflowing containers */
img {
  max-width: 100%;
  height: auto;
}

/* Ensure long text in tables doesn't overflow on mobile */
@media (max-width: 640px) {
  .spec-table td {
    word-break: break-word;
  }
}
