/* ============================================
   RESOURCE DETAIL PAGE STYLES
   Purpose: Detailed view of single resource
   Mobile-first approach
   ============================================ */

/* ============================================
   HERO SECTION
   ============================================ */

.resource-detail-hero {
  padding: 40px 20px;
  background: linear-gradient(135deg, #343434 0%, #7BA5E8 100%);
  color: var(--text-on-primary);
}

@media (min-width: 768px) {
  .resource-detail-hero {
    padding: 60px 40px;
  }
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-on-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
  transition: all var(--transition-fast);
}

@media (min-width: 768px) {
  .back-link {
    font-size: 16px;
    margin-bottom: 32px;
  }
}

.back-link:hover {
  transform: translateX(-4px);
}

.hero-badge-container {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .hero-badge-container {
    gap: 16px;
    margin-bottom: 20px;
  }
}

.hero-category-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-on-primary);
  background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 768px) {
  .hero-category-badge {
    padding: 10px 20px;
    font-size: 14px;
  }
}

.hero-category-badge.medical {
  background: rgba(255, 255, 255, 0.25);
}

.hero-category-badge.financial {
  background: rgba(255, 255, 255, 0.25);
}

.hero-category-badge.emotional {
  background: rgba(255, 255, 255, 0.25);
}

.hero-category-badge.practical {
  background: rgba(255, 255, 255, 0.25);
}

.hero-category-badge.education {
  background: rgba(255, 255, 255, 0.25);
}

.hero-category-badge.travel {
  background: rgba(255, 255, 255, 0.25);
}

.verified-badge {
  padding: 6px 14px;
  background: var(--success-green);
  color: var(--text-on-primary);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .verified-badge {
    padding: 8px 16px;
    font-size: 13px;
  }
}

.resource-detail-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
  color: var(--text-on-primary);
}

@media (min-width: 768px) {
  .resource-detail-title {
    font-size: 48px;
    margin-bottom: 20px;
  }
}

.resource-location {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .resource-location {
    gap: 16px;
  }
}

.location-tag {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-on-primary);
  border-radius: var(--radius-medium);
  font-size: 14px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .location-tag {
    padding: 10px 20px;
    font-size: 16px;
  }
}

/* ============================================
   MAIN CONTENT SECTION
   ============================================ */

.resource-detail-content {
  padding: 60px 20px;
  background: var(--bg-cream);
}

@media (min-width: 768px) {
  .resource-detail-content {
    padding: 80px 40px;
  }
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr 350px;
    gap: 60px;
  }
}

/* ============================================
   MAIN COLUMN
   ============================================ */

.main-column {
  /* Mobile: full width */
}

@media (min-width: 768px) {
  .main-column {
    /* Desktop: takes remaining space */
  }
}

.resource-description-section {
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .resource-description-section {
    margin-bottom: 50px;
  }
}

.resource-description-section h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .resource-description-section h2 {
    font-size: 28px;
    margin-bottom: 24px;
  }
}

.formatted-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-medium);
}

@media (min-width: 768px) {
  .formatted-description {
    font-size: 18px;
    line-height: 1.9;
  }
}

.formatted-description p {
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .formatted-description p {
    margin-bottom: 24px;
  }
}

.formatted-description p:last-child {
  margin-bottom: 0;
}

/* Tags Section */
.resource-tags-section {
  margin-bottom: 40px;
}

@media (min-width: 768px) {
  .resource-tags-section {
    margin-bottom: 50px;
  }
}

.resource-tags-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .resource-tags-section h3 {
    font-size: 22px;
    margin-bottom: 20px;
  }
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (min-width: 768px) {
  .tags-container {
    gap: 12px;
  }
}

.tag {
  padding: 8px 16px;
  background: var(--bg-light);
  color: var(--text-medium);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .tag {
    padding: 10px 18px;
    font-size: 15px;
  }
}

/* AI Info Section */
.ai-info-section {
  padding: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-large);
  border-left: 4px solid var(--primary-blue);
}

@media (min-width: 768px) {
  .ai-info-section {
    padding: 32px;
  }
}

.ai-info-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .ai-info-section h3 {
    font-size: 22px;
    margin-bottom: 24px;
  }
}

.info-group {
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .info-group {
    margin-bottom: 24px;
  }
}

.info-group:last-child {
  margin-bottom: 0;
}

.info-group h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .info-group h4 {
    font-size: 17px;
    margin-bottom: 10px;
  }
}

.info-group p {
  font-size: 15px;
  color: var(--text-medium);
  margin: 0;
}

@media (min-width: 768px) {
  .info-group p {
    font-size: 16px;
  }
}

.info-group ul {
  margin: 0;
  padding-left: 20px;
}

.info-group li {
  font-size: 15px;
  color: var(--text-medium);
  margin-bottom: 8px;
}

@media (min-width: 768px) {
  .info-group li {
    font-size: 16px;
    margin-bottom: 10px;
  }
}

/* ============================================
   SIDEBAR COLUMN
   ============================================ */

.sidebar-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 768px) {
  .sidebar-column {
    gap: 28px;
  }
}

/* Contact Card */
.contact-card {
  padding: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .contact-card {
    padding: 28px;
  }
}

.contact-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .contact-card h3 {
    font-size: 20px;
    margin-bottom: 24px;
  }
}

.btn-visit {
  display: block;
  width: 100%;
  padding: 14px 20px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
}

@media (min-width: 768px) {
  .btn-visit {
    padding: 16px 24px;
    margin-bottom: 24px;
    font-size: 17px;
  }
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--bg-light);
}

@media (min-width: 768px) {
  .contact-item {
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 20px;
  }
}

.contact-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.contact-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (min-width: 768px) {
  .contact-label {
    font-size: 14px;
  }
}

.contact-value {
  font-size: 16px;
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
  word-break: break-word;
}

@media (min-width: 768px) {
  .contact-value {
    font-size: 17px;
  }
}

.contact-value:hover {
  text-decoration: underline;
}

/* Engagement Card */
.engagement-card {
  padding: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
  .engagement-card {
    padding: 28px;
  }
}

.engagement-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .engagement-card h3 {
    font-size: 20px;
    margin-bottom: 24px;
  }
}

.btn-helpful-large {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: var(--success-green);
  color: var(--text-on-primary);
  border: none;
  border-radius: var(--radius-medium);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .btn-helpful-large {
    padding: 16px 24px;
    font-size: 16px;
    margin-bottom: 16px;
  }
}

.btn-helpful-large:hover:not(:disabled) {
  background: #45B85E;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-helpful-large:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-helpful-large.voted {
  background: var(--success-green);
  opacity: 0.8;
}

.btn-report-large {
  display: block;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  color: var(--error-red);
  border: 2px solid var(--error-red);
  border-radius: var(--radius-medium);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .btn-report-large {
    padding: 16px 24px;
    font-size: 16px;
    margin-bottom: 24px;
  }
}

.btn-report-large:hover {
  background: var(--error-red);
  color: var(--text-on-primary);
  transform: translateY(-2px);
}

.login-prompt {
  text-align: center;
  font-size: 14px;
  color: var(--text-medium);
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .login-prompt {
    font-size: 15px;
    margin-bottom: 24px;
  }
}

.login-prompt a {
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
}

.login-prompt a:hover {
  text-decoration: underline;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--bg-light);
}

@media (min-width: 768px) {
  .stats {
    gap: 20px;
    padding-top: 24px;
  }
}

.stat-item {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .stat-value {
    font-size: 32px;
    margin-bottom: 6px;
  }
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

@media (min-width: 768px) {
  .stat-label {
    font-size: 14px;
  }
}

/* Meta Card */
.meta-card {
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius-medium);
  text-align: center;
}

@media (min-width: 768px) {
  .meta-card {
    padding: 20px;
  }
}

.last-verified {
  font-size: 13px;
  color: var(--text-medium);
  margin: 0;
}

@media (min-width: 768px) {
  .last-verified {
    font-size: 14px;
  }
}

/* ============================================
   RELATED RESOURCES SECTION
   ============================================ */

.related-resources-section {
  padding: 60px 20px;
  background: var(--bg-white);
}

@media (min-width: 768px) {
  .related-resources-section {
    padding: 80px 40px;
  }
}

.related-resources-section .section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
  text-align: center;
}

@media (min-width: 768px) {
  .related-resources-section .section-title {
    font-size: 36px;
    margin-bottom: 16px;
  }
}

.related-resources-section .section-description {
  font-size: 16px;
  color: var(--text-medium);
  margin-bottom: 40px;
  text-align: center;
}

@media (min-width: 768px) {
  .related-resources-section .section-description {
    font-size: 18px;
    margin-bottom: 50px;
  }
}

.related-resources-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .related-resources-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media (min-width: 1024px) {
  .related-resources-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.related-resource-card {
  padding: 24px;
  background: var(--bg-cream);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

@media (min-width: 768px) {
  .related-resource-card {
    padding: 28px;
  }
}

.related-resource-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.related-card-header {
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .related-card-header {
    margin-bottom: 20px;
  }
}

.related-card-header .category-badge {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-on-primary);
}

@media (min-width: 768px) {
  .related-card-header .category-badge {
    padding: 7px 16px;
    font-size: 13px;
  }
}

.category-badge.medical {
  background-color: #5B8DD9;
}

.category-badge.financial {
  background-color: #E89AB4;
}

.category-badge.emotional {
  background-color: #A881C4;
}

.category-badge.practical {
  background-color: #9AC4A8;
}

.category-badge.education {
  background-color: #FFA94D;
}

.category-badge.travel {
  background-color: #5DADE2;
}

.related-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
  line-height: 1.3;
}

@media (min-width: 768px) {
  .related-title {
    font-size: 20px;
    margin-bottom: 14px;
  }
}

.related-description {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-medium);
}

@media (min-width: 768px) {
  .related-description {
    font-size: 15px;
    margin-bottom: 24px;
  }
}

.btn-related {
  display: inline-block;
  padding: 10px 20px;
  background: var(--primary-blue);
  color: var(--text-on-primary);
  border-radius: var(--radius-medium);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

@media (min-width: 768px) {
  .btn-related {
    padding: 12px 24px;
    font-size: 15px;
  }
}

.btn-related:hover {
  background: var(--primary-blue-hover);
  transform: translateY(-2px);
}

/* ============================================
   DISCLAIMER SECTION
   ============================================ */

.detail-disclaimer {
  padding: 40px 20px;
  background: var(--bg-light);
}

@media (min-width: 768px) {
  .detail-disclaimer {
    padding: 60px 40px;
  }
}

.disclaimer-box {
  max-width: 800px;
  margin: 0 auto;
  padding: 24px;
  background: var(--bg-white);
  border-radius: var(--radius-large);
  border-left: 4px solid var(--warning-orange);
}

@media (min-width: 768px) {
  .disclaimer-box {
    padding: 32px;
  }
}

.disclaimer-box h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-dark);
}

@media (min-width: 768px) {
  .disclaimer-box h3 {
    font-size: 20px;
    margin-bottom: 16px;
  }
}

.disclaimer-box p {
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
  color: var(--text-medium);
}

@media (min-width: 768px) {
  .disclaimer-box p {
    font-size: 16px;
  }
}

/* ============================================
   END OF RESOURCE DETAIL PAGE STYLES
   ============================================ */

/* Stats Card - Compact Inline Style */
.stats-card {
  padding: 0;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .stats-card {
    margin-bottom: 24px;
  }
}

.stats-card h3 {
  display: none;
}

.stats-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

@media (min-width: 768px) {
  .stats-grid {
    gap: 12px;
  }
}

.stats-grid .stat-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

@media (min-width: 768px) {
  .stats-grid .stat-item {
    gap: 6px;
  }
}

.stats-grid .stat-item:hover {
  background: transparent;
}

.stat-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  opacity: 0.8;
}

@media (min-width: 768px) {
  .stat-icon {
    font-size: 15px;
  }
}

.stat-info {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex-direction: row;
}

.stats-grid .stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-medium);
  line-height: 1;
  display: inline;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .stats-grid .stat-value {
    font-size: 15px;
  }
}

.stats-grid .stat-label {
  font-size: 14px;
  color: var(--text-medium);
  font-weight: 400;
  display: inline;
  text-transform: none;
  letter-spacing: 0;
}

@media (min-width: 768px) {
  .stats-grid .stat-label {
    font-size: 15px;
  }
}

/* Bullet separator - smaller and more subtle */
.stats-grid .stat-item:not(:last-child)::after {
  content: '•';
  margin-left: 8px;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 400;
}

@media (min-width: 768px) {
  .stats-grid .stat-item:not(:last-child)::after {
    margin-left: 12px;
    font-size: 13px;
  }
}


/* ============================================
   LANGUAGE TOGGLE TABS
   ============================================ */

.language-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

@media (min-width: 768px) {
  .language-tabs {
    gap: 12px;
    margin-bottom: 24px;
  }
}

.lang-tab {
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  bottom: -2px; /* Align with border-bottom */
}

@media (min-width: 768px) {
  .lang-tab {
    padding: 12px 24px;
    font-size: 16px;
  }
}

.lang-tab:hover {
  color: #374151;
  background: #f9fafb;
}

.lang-tab.active {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
  font-weight: 600;
}

/* Language content containers */
.lang-content {
  /* Inherits .formatted-description styles */
}

/* Optional: Add a subtle background for Spanish section */
/* .lang-content[data-lang="es"] {
} */