/**
 * History Overview Component Styles
 * Redesigned to match site design pattern with text-wrap layout
 * 
 * @package CMSMGA
 * @version 9.0
 */

/* Main Section - Matches site pattern */
.history-content-section {
  position: relative;
  padding: var(--space-8) 0;
  background: linear-gradient(135deg, 
    var(--color-primary-800),
    var(--color-primary-700)
  );
  color: var(--text-inverse);
  overflow: hidden;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: 80vh;
}

/* Background pattern - matches membership page */
.history-content-section::before {
  display: none;
}

.history-content-section::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, 
      color-mix(in srgb, var(--color-accent-400) 2%, transparent) 0%,
      transparent 50%),
    radial-gradient(circle at 80% 20%, 
      color-mix(in srgb, var(--color-accent-400) 1.5%, transparent) 0%,
      transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.history-content-container {
  position: relative;
  z-index: 2;
}

.history-content-section .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  position: relative;
  z-index: 3;
}

/* Section Header */
.history-section-header {
  text-align: center;
  margin-bottom: var(--space-16);
  animation: cmsmga-fadeInUp var(--transition-slow) ease-out;
}

.cmsmga-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: linear-gradient(135deg, var(--color-accent-500), var(--color-accent-600));
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.cmsmga-badge-icon {
  font-size: var(--text-base);
}

.section-title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--font-weight-bold);
  color: var(--text-inverse);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Article Wrapper with Text Wrap */
.history-article-wrapper {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
  line-height: 1.8;
  animation: cmsmga-fadeInUp var(--transition-slow) ease-out 0.2s both;
}

/* Floating Image */
.history-image-float {
  float: right;
  width: 350px;
  margin: 0 0 var(--space-4) var(--space-8);
  shape-outside: margin-box;
  z-index: 5;
  position: relative;
}

.history-image-float .image-container {
  width: 100%;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.3),
    0 12px 25px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}



.history-image-float img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}



/* Image Placeholder */
.image-placeholder {
  width: 100%;
  height: 250px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(255, 255, 255, 0.2);
}

.placeholder-content {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

.placeholder-icon {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-2);
}

.placeholder-text {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-medium);
}

/* Text Content */
.history-text-content {
  position: relative;
  z-index: 4;
}

.history-text-content p {
  margin: 0 0 var(--space-6) 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--text-lg);
  line-height: 1.8;
  text-align: justify;
}

.history-text-content p:last-child {
  margin-bottom: 0;
}

.history-text-content p:first-child {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-medium);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: var(--space-8);
}

/* Responsive Design */
@media (max-width: 1024px) {
  .history-content-section {
    padding: var(--space-6) 0;
    min-height: auto;
  }
  
  .history-image-float {
    width: 300px;
    margin: 0 0 var(--space-3) var(--space-6);
  }
  
  .history-text-content p {
    font-size: var(--text-base);
  }
  
  .history-text-content p:first-child {
    font-size: var(--text-lg);
  }
}

@media (max-width: 768px) {
  .history-content-section {
    padding: var(--space-4) 0;
  }
  
  .history-content-section .container {
    padding: 0 var(--space-4);
  }
  
  .history-section-header {
    margin-bottom: var(--space-12);
  }
  
  /* Stack layout on mobile */
  .history-image-float {
    float: none;
    width: 100%;
    max-width: 400px;
    margin: 0 auto var(--space-4) auto;
    display: block;
  }
  
  .history-text-content p {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .history-content-section {
    padding: var(--space-3) 0;
  }
  
  .history-content-section .container {
    padding: 0 var(--space-3);
  }
  
  .section-title {
    font-size: var(--text-2xl);
  }
  
  .history-image-float {
    max-width: 100%;
  }
  
  .history-text-content p {
    font-size: var(--text-base);
  }
  
  .history-text-content p:first-child {
    font-size: var(--text-lg);
  }
}