/* Resources Page Styles - TronMenders */

/* Loading Skeleton Animation */
.loading-skeleton {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.05) 25%, 
    rgba(255,255,255,0.1) 50%, 
    rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Resource Card Styles */
.resource-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(75, 85, 99, 0.3);
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.8), rgba(17, 24, 39, 0.9));
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s;
}

.resource-card:hover::before {
  left: 100%;
}

.resource-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(34, 197, 94, 0.3);
  border-color: rgba(34, 197, 94, 0.6);
}

/* Resource Icon Styles */
.resource-icon {
  background: linear-gradient(135deg, var(--icon-from), var(--icon-to));
  border: 2px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.resource-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  transform: scale(0);
  transition: transform 0.3s ease;
}

.resource-card:hover .resource-icon::after {
  transform: scale(1);
}

/* Resource Title Styles */
.resource-title {
  color: #ffffff !important;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.resource-card:hover .resource-title {
  background: linear-gradient(135deg, #ffffff, #e5e7eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Ensure title text is always visible */
@supports not (background-clip: text) {
  .resource-card:hover .resource-title {
    color: #ffffff !important;
    background: none !important;
  }
}

/* Resource Meta Styles */
.resource-meta {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.resource-card:hover .resource-meta {
  opacity: 1;
}

/* Category Badge Styles */
.category-badge {
  background: linear-gradient(135deg, var(--badge-from), var(--badge-to));
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.category-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.resource-card:hover .category-badge::before {
  opacity: 1;
}

/* Stats Item Styles */
.stats-item {
  transition: all 0.3s ease;
}

.stats-item:hover {
  transform: scale(1.1);
  color: #22c55e !important;
}

/* Action Button Styles */
.action-button {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--btn-from), var(--btn-to));
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
  transition: all 0.4s ease;
  transform: translate(-50%, -50%);
  border-radius: 50%;
}

.action-button:hover::before {
  width: 300px;
  height: 300px;
}

.action-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* Tag Item Styles */
.tag-item {
  background: rgba(75, 85, 99, 0.4);
  border: 1px solid rgba(156, 163, 175, 0.2);
  color: #d1d5db !important;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.tag-item:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e !important;
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(34, 197, 94, 0.1);
}

/* Category Filter Active State */
.category-filter.active {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(16, 185, 129, 0.2));
  border-color: rgba(34, 197, 94, 0.6);
  color: #22c55e;
}

/* Force text visibility */
body {
  color: #ffffff !important;
}

h1, h2, h3, h4, h5, h6 {
  color: #ffffff !important;
}

p, span, div {
  color: inherit;
}

.text-white {
  color: #ffffff !important;
}

.text-gray-400 {
  color: #9ca3af !important;
}

.text-gray-300 {
  color: #d1d5db !important;
}

.text-gray-500 {
  color: #6b7280 !important;
}

.text-green-400 {
  color: #4ade80 !important;
}

.text-transparent {
  color: transparent !important;
}

.bg-clip-text {
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

/* Fix gradient text visibility */
.bg-gradient-to-r {
  background-image: linear-gradient(to right, var(--tw-gradient-stops)) !important;
}

.from-white {
  --tw-gradient-from: #ffffff !important;
  --tw-gradient-to: rgba(255, 255, 255, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.via-gray-200 {
  --tw-gradient-to: rgba(229, 231, 235, 0) !important;
  --tw-gradient-stops: var(--tw-gradient-from), #e5e7eb, var(--tw-gradient-to) !important;
}

.to-gray-400 {
  --tw-gradient-to: #9ca3af !important;
}

/* Fallback for gradient text */
h1.bg-gradient-to-r {
  background: linear-gradient(to right, #ffffff, #e5e7eb, #9ca3af) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}

/* Emergency fallback - if gradient fails, show white text */
@supports not (background-clip: text) {
  h1.bg-gradient-to-r {
    color: #ffffff !important;
    background: none !important;
  }
}

/* Force visibility for hero title as last resort */
h1:contains('Trading Resources Hub') {
  color: #ffffff !important;
  background: none !important;
}

/* Direct targeting for hero section */
.hero-section h1,
section h1,
main h1 {
  color: #ffffff !important;
  background: linear-gradient(to right, #ffffff, #e5e7eb, #9ca3af) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

/* If all else fails, force white text */
main section h1 {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5) !important;
}

/* Hero Section Styles - matching student_dashboard.html */
.hero-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom right,
    #111827,    /* gray-900 */
    #1f2937,    /* gray-800 */
    #000000);   /* black */
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 16px;
  margin: 0 24px;
  box-shadow: 
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 4px 25px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(34, 197, 94, 0.4) 20%, 
    rgba(59, 130, 246, 0.4) 50%, 
    rgba(34, 197, 94, 0.4) 80%, 
    transparent 100%);
  border-radius: 16px 16px 0 0;
  z-index: 3;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M0,0 L1440,0 Q1420,30 1400,60 Q1380,90 1360,120 Q1340,150 1320,180 Q1300,210 1280,240 Q1260,270 1240,300 Q1220,330 1200,360 Q1180,330 1160,300 Q1140,270 1120,240 Q1100,210 1080,180 Q1060,150 1040,120 Q1020,90 1000,60 Q980,30 960,0 L0,0 Z' fill='url(%23waveGradient)' opacity='0.05'/%3e%3cpath d='M0,400 Q360,350 720,375 Q1080,400 1440,350 L1440,400 L0,400 Z' fill='url(%23waveGradient2)' opacity='0.08'/%3e%3cdefs%3e%3clinearGradient id='waveGradient' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3e%3cstop offset='0%25' style='stop-color:%2322c55e;stop-opacity:0.15' /%3e%3cstop offset='100%25' style='stop-color:%233b82f6;stop-opacity:0.15' /%3e%3c/linearGradient%3e%3clinearGradient id='waveGradient2' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3e%3cstop offset='0%25' style='stop-color:%233b82f6;stop-opacity:0.1' /%3e%3cstop offset='100%25' style='stop-color:%2322c55e;stop-opacity:0.1' /%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e") no-repeat;
  background-size: cover;
  pointer-events: none;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(34, 197, 94, 0.05),  /* green-500/5 */
    rgba(59, 130, 246, 0.05)); /* blue-500/5 */
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 10;
  padding: 32px 32px;
}

.professional-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 9999px;
  padding: 8px 16px;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.gradient-text {
  background: linear-gradient(135deg, #22c55e 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-card-enhanced {
  background: rgba(31, 41, 55, 0.6);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.metric-card-enhanced:hover {
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
}

.metric-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.metric-label {
  color: #9ca3af;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .resource-card {
    min-height: 320px;
  }
  
  .resource-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  .resource-icon {
    width: 48px;
    height: 48px;
  }
  
  .tag-item {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }
  
  .hero-content {
    padding: 24px 24px;
  }
  
  .hero-section {
    margin: 0 16px;
  }
}

/* --- Navigation & Mobile Menu Styles (from support.css) --- */
#mobile-menu {
  transition: all 0.3s ease-in-out;
}

#mobile-menu.show {
  display: block !important;
}

.show {
  display: block !important;
}

@media (max-width: 767px) {
  #mobile-menu:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: 100% !important;
    background-color: rgba(31, 41, 55, 0.95) !important;
    border-top: 1px solid rgba(34, 197, 94, 0.2) !important;
    padding: 16px !important;
    z-index: 1000 !important;
  }
  #mobile-menu a {
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    color: #d1d5db !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    transition: all 0.2s !important;
    background-color: transparent !important;
  }
  #mobile-menu a:hover {
    background-color: rgba(34, 197, 94, 0.1) !important;
    color: white !important;
  }
  #mobile-menu i {
    width: 20px !important;
    height: 20px !important;
    margin-right: 12px !important;
    color: inherit !important;
    font-size: 20px !important;
  }
  #mobile-menu span,
  #mobile-menu .text-white,
  #mobile-menu .text-gray-300 {
    color: #d1d5db !important;
    font-size: 16px !important;
    font-weight: 500 !important;
  }
  #mobile-menu-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: rgba(31, 41, 55, 0.8) !important;
    border: 1px solid rgba(34, 197, 94, 0.3) !important;
    border-radius: 8px !important;
    padding: 8px !important;
    color: white !important;
    width: 40px !important;
    height: 40px !important;
  }
  #mobile-menu-button i {
    width: 24px !important;
    height: 24px !important;
    color: white !important;
    font-size: 24px !important;
  }
  #mobile-menu * {
    color: #d1d5db !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  #mobile-menu a * {
    color: inherit !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  #mobile-menu-button {
    background-color: #374151 !important;
    border: 2px solid #10b981 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5) !important;
  }
  #mobile-menu {
    background-color: rgba(31, 41, 55, 0.98) !important;
    border: 2px solid rgba(34, 197, 94, 0.5) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5) !important;
  }
  #mobile-menu a span,
  #mobile-menu a div,
  #mobile-menu a {
    color: #e5e7eb !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8) !important;
  }
  #mobile-menu i {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
  }
  .hero-content {
    padding: 24px 24px;
  }
  .hero-section {
    margin: 0 16px;
  }
}
@media (min-width: 768px) {
  .hidden.md\:flex {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }
  .hidden.md\:flex a {
    padding: 8px 16px;
    border-radius: 8px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s;
  }
  .hidden.md\:flex a:hover {
    background: rgba(16, 185, 129, 0.1);
    color: white;
  }
  #mobile-menu-button {
    display: none !important;
  }
}
