/* ===================================================================
   BanterBox Policy Organization Profile Styles
   Version: 1.0
   Description: Styles for individual organization pages
   =================================================================== */

/* ===================================================================
   1. ORGANIZATION HEADER
   =================================================================== */

.org-profile-header {
  position: relative;
  padding: 100px 0 60px;
  overflow: hidden;
}

.header-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(var(--color-primary-rgb), 0.1) 0%, 
    rgba(var(--color-accent-rgb), 0.1) 100%);
}

.pattern-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(var(--color-accent-rgb), 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(var(--color-primary-rgb), 0.05) 0%, transparent 50%);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.breadcrumb a {
  color: var(--color-accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.org-header-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
}

.org-logo-large {
  width: 120px;
  height: 120px;
  background: white;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.org-logo-large img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.org-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.org-tagline {
  font-size: 1.25rem;
  color: var(--color-text-secondary);
  margin-bottom: 2rem;
}

.org-stats-row {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.25rem;
}

.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

/* ===================================================================
   2. SUCCESS METRICS DASHBOARD
   =================================================================== */

.success-metrics {
  padding: 4rem 0;
  background: var(--glass-bg-light);
}

.metrics-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.metric-card {
  background: white;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(var(--color-primary-rgb), 0.1);
  border-color: var(--color-accent);
}

.metric-card.large {
  grid-column: span 2;
}

.metric-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.metric-content {
  position: relative;
  z-index: 1;
}

.metric-value {
  font-size: 3rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.metric-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.metric-description {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.metric-chart {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 150px;
  height: 80px;
  opacity: 0.1;
  background: var(--gradient-primary);
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,60 L30,40 L60,50 L90,20 L120,30 L150,10' stroke='black' stroke-width='3' fill='none'/%3E%3C/svg%3E") no-repeat center;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,60 L30,40 L60,50 L90,20 L120,30 L150,10' stroke='black' stroke-width='3' fill='none'/%3E%3C/svg%3E") no-repeat center;
}

/* Trends Section */
.trends-section {
  margin-top: 3rem;
  background: white;
  border-radius: 20px;
  padding: 2rem;
  border: 1px solid var(--glass-border);
}

.trends-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.trends-chart {
  height: 300px;
  position: relative;
}

#usage-canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===================================================================
   3. FEATURED DOCUMENTS
   =================================================================== */

.featured-documents {
  padding: 4rem 0;
}

.documents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.doc-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.doc-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--color-accent);
}

.doc-thumbnail {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.doc-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.doc-card:hover .doc-thumbnail img {
  transform: scale(1.05);
}

.doc-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.doc-card:hover .doc-overlay {
  opacity: 1;
}

.doc-content {
  padding: 1.5rem;
}

.doc-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.doc-date {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.doc-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.25rem 0.75rem;
  background: var(--glass-bg-light);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  font-size: 0.8rem;
  color: var(--color-text-secondary);
}

.doc-metrics {
  display: flex;
  gap: 1.5rem;
  font-size: 0.85rem;
  color: var(--color-text-secondary);
}

.doc-metrics .metric {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.doc-metrics svg {
  color: var(--color-accent);
}

/* ===================================================================
   4. USE CASES
   =================================================================== */

.use-cases {
  padding: 4rem 0;
  background: linear-gradient(135deg, 
    rgba(var(--color-primary-rgb), 0.02) 0%, 
    rgba(var(--color-accent-rgb), 0.02) 100%);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.use-case-card {
  background: white;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.use-case-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-color: var(--color-accent);
}

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

.use-case-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.use-case-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===================================================================
   5. SUCCESS STORY
   =================================================================== */

.success-story {
  padding: 6rem 0;
  background: var(--glass-bg-light);
}

.story-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.story-title {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.story-quote {
  background: white;
  border-left: 4px solid var(--color-accent);
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
}

.story-quote p {
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--color-text);
  font-style: italic;
}

.story-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.story-author img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.author-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.author-role {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

.story-highlights h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.story-highlights ul {
  list-style: none;
  padding: 0;
}

.story-highlights li {
  padding: 0.75rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--color-text-secondary);
}

.story-highlights li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-success);
  font-weight: 700;
}

.visual-card {
  background: white;
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.before-after {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.before h4,
.after h4 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  background: var(--glass-bg-light);
  border-radius: 8px;
  font-size: 0.9rem;
}

.timeline-item.success {
  background: rgba(var(--color-success-rgb), 0.1);
  color: var(--color-success-dark);
}

.time {
  font-weight: 600;
}

.divider {
  font-size: 2rem;
  color: var(--color-accent);
  align-self: center;
}

/* ===================================================================
   6. INTEGRATIONS
   =================================================================== */

.integrations {
  padding: 4rem 0;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.integration-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.integration-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-color: var(--color-accent);
}

.integration-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.integration-icon {
  color: var(--color-accent);
}

.integration-card h3 {
  font-size: 1.25rem;
  margin: 0;
}

.integration-card p {
  color: var(--color-text-secondary);
  line-height: 1.6;
}

/* ===================================================================
   7. RELATED ORGANIZATIONS
   =================================================================== */

.related-orgs {
  padding: 4rem 0;
  background: var(--glass-bg-light);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.related-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.related-card:hover {
  transform: translateX(8px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border-color: var(--color-accent);
}

.related-logo {
  width: 60px;
  height: 60px;
  background: var(--glass-bg-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.related-logo img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.related-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.related-info p {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  margin-bottom: 0.25rem;
}

.related-metric {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* ===================================================================
   8. CTA SECTION
   =================================================================== */

.org-cta {
  padding: 6rem 0;
}

.cta-card {
  background: var(--gradient-primary);
  color: white;
  border-radius: 32px;
  padding: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cta-card h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.cta-card p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.org-cta .btn-primary {
  background: white;
  color: var(--color-primary);
}

.org-cta .btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
}

.org-cta .btn-secondary {
  background: transparent;
  border: 2px solid white;
  color: white;
}

.org-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ===================================================================
   9. RESPONSIVE DESIGN
   =================================================================== */

@media (max-width: 768px) {
  .org-header-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .org-logo-large {
    margin: 0 auto;
  }
  
  .org-stats-row {
    justify-content: center;
  }
  
  .metrics-dashboard {
    grid-template-columns: 1fr;
  }
  
  .metric-card.large {
    grid-column: span 1;
  }
  
  .story-wrapper {
    grid-template-columns: 1fr;
  }
  
  .before-after {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .divider {
    transform: rotate(90deg);
  }
}

@media (max-width: 480px) {
  .org-title {
    font-size: 2rem;
  }
  
  .metric-value {
    font-size: 2rem;
  }
  
  .use-cases-grid {
    grid-template-columns: 1fr;
  }
  
  .story-quote p {
    font-size: 1.1rem;
  }
}

/* ===================================================================
   10. ANIMATIONS
   =================================================================== */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease forwards;
}

.fade-in[data-delay="0.1"] { animation-delay: 0.1s; }
.fade-in[data-delay="0.2"] { animation-delay: 0.2s; }
.fade-in[data-delay="0.3"] { animation-delay: 0.3s; }

/* Placeholder styles for missing images */
.doc-thumbnail:not(:has(img)) {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--color-text-muted);
}

.doc-thumbnail:not(:has(img))::before {
  content: "📄";
}