/* ========================================
   MARN Data Sheets - CSS Components
   Technical documentation styling
======================================== */

/* ========================================
   Page Header
======================================== */
.page-header {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
  padding: calc(70px + var(--space-3xl)) 0 var(--space-3xl);
  overflow: hidden;
}

.header-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../img/bg2.jpg');
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg, 
    rgba(0, 121, 107, 0.9) 0%, 
    rgba(44, 62, 80, 0.8) 100%
  );
}

.header-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.breadcrumb {
  margin-bottom: var(--space-md);
}

.breadcrumb-list {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--text-sm);
}

.breadcrumb-list li {
  display: flex;
  align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
  content: '/';
  margin-left: var(--space-sm);
  opacity: 0.6;
}

.breadcrumb-list a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumb-list a:hover {
  color: var(--text-white);
}

.breadcrumb-list li[aria-current="page"] {
  color: var(--text-white);
  font-weight: 500;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  margin: 0 0 var(--space-md);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  font-weight: 300;
  margin: 0 0 var(--space-2xl);
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.header-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-xl);
  max-width: 600px;
  margin: 0 auto;
}

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

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: var(--text-sm);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   Quick Navigation
======================================== */
.quick-nav {
  background: var(--bg-secondary);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--bg-tertiary);
  position: sticky;
  top: 70px;
  z-index: 100;
}

.nav-items {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.nav-item {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--border-radius-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-base);
  text-align: center;
}

.nav-item:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

/* ========================================
   Data Sheets Content
======================================== */
.data-sheets-content {
  padding: var(--space-3xl) 0;
}

.data-sheet {
  margin-bottom: var(--space-4xl);
  scroll-margin-top: 200px; /* Account for navbar (70px) + section header space (130px) */
}

.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-2xl);
  padding-bottom: var(--space-lg);
  border-bottom: 3px solid var(--primary-color);
}

.sheet-title h2 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 var(--space-sm);
}

.sheet-badges {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-lg);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.primary {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
}

.badge.secondary {
  background: linear-gradient(135deg, #6c757d, #5a6268);
  color: var(--text-white);
}

.badge.eco {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: var(--text-white);
}

.badge.safety {
  background: linear-gradient(135deg, #ffc107, #fd7e14);
  color: var(--text-primary);
}

.badge.quality {
  background: linear-gradient(135deg, #17a2b8, #007bff);
  color: var(--text-white);
}

.sheet-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ========================================
   Product Overview
======================================== */
.product-overview {
  display: grid;
  gap: var(--space-2xl);
  align-items: start;
  margin-bottom: var(--space-3xl);
}

.overview-image {
  text-align: center;
}

.overview-image img {
  max-width: 100%;
  max-height: 300px;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
}

.overview-text h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.overview-text p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-lg);
}

.key-features h4 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.key-features ul {
  list-style: none;
  padding: 0;
}

.key-features li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
}

.key-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* ========================================
   Specifications
======================================== */
.specifications-grid {
  display: grid;
  gap: var(--space-xl);
  margin-bottom: var(--space-3xl);
}

.specifications-single {
  margin-bottom: var(--space-3xl);
}

.spec-card {
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.spec-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.spec-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--bg-tertiary);
}

.spec-table-container h4 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
}

.spec-table {
  overflow-x: auto;
  margin-bottom: var(--space-lg);
}

.spec-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.spec-table th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  padding: var(--space-md);
  text-align: left;
  border-bottom: 2px solid var(--bg-tertiary);
}

.spec-table td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--bg-tertiary);
  color: var(--text-secondary);
}

.spec-table tr:hover {
  background: var(--bg-secondary);
}

.applications h5 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

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

.applications li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.applications li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* ========================================
   Size Grades
======================================== */
.size-grades {
  margin-bottom: var(--space-3xl);
}

.size-grades h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.size-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.size-card {
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--border-radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.size-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.size-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-align: center;
}

.size-specs table {
  width: 100%;
  margin-bottom: var(--space-md);
  font-size: var(--text-sm);
}

.size-specs td {
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--bg-tertiary);
}

.size-specs td:first-child {
  font-weight: 500;
  color: var(--text-secondary);
  width: 60%;
}

.size-specs td:last-child {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

.size-apps h5 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.size-apps ul {
  list-style: none;
  padding: 0;
}

.size-apps li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.size-apps li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* ========================================
   Performance Data
======================================== */
.performance-data {
  margin-bottom: var(--space-3xl);
}

.performance-data h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.performance-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.perf-card {
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--border-radius-xl);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.perf-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-align: center;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary-color);
}

.perf-card table {
  width: 100%;
  font-size: var(--text-sm);
}

.perf-card td {
  padding: var(--space-sm) var(--space-xs);
  border-bottom: 1px solid var(--bg-tertiary);
}

.perf-card td:first-child {
  font-weight: 500;
  color: var(--text-secondary);
  width: 50%;
}

.perf-card td:nth-child(2) {
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  width: 30%;
}

.perf-card td:last-child {
  color: var(--text-secondary);
  text-align: right;
  width: 20%;
  font-size: var(--text-xs);
}

/* ========================================
   Applications Detailed
======================================== */
.applications-detailed {
  margin-bottom: var(--space-3xl);
}

.applications-detailed h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.app-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.app-card {
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.app-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.app-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.app-card h4 i {
  color: var(--primary-color);
  font-size: var(--text-xl);
}

.app-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}

.app-card ul {
  list-style: none;
  padding: 0;
}

.app-card li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.app-card li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* ========================================
   Processing Information
======================================== */
.processing-info {
  margin-bottom: var(--space-3xl);
}

.processing-info h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.processing-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.process-card {
  background: var(--bg-secondary);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  border-left: 4px solid var(--primary-color);
}

.process-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
}

.process-card ul {
  list-style: none;
  padding: 0;
}

.process-card li {
  position: relative;
  padding-left: var(--space-md);
  margin-bottom: var(--space-sm);
  color: var(--text-secondary);
}

.process-card li::before {
  content: '○';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
}

/* ========================================
   Safety Information
======================================== */
.safety-info {
  background: var(--bg-secondary);
  padding: var(--space-3xl) 0;
  margin-bottom: var(--space-3xl);
}

.safety-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.safety-header h2 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
}

.safety-header i {
  color: var(--primary-color);
  font-size: var(--text-2xl);
}

.safety-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.safety-card {
  background: var(--bg-primary);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--primary-color);
}

.safety-card h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  text-align: center;
}

.safety-card ul {
  list-style: none;
  padding: 0;
}

.safety-card li {
  position: relative;
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
  line-height: 1.5;
}

.safety-card li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary-color);
  font-weight: bold;
  font-size: var(--text-lg);
}

/* ========================================
   Contact Section
======================================== */
.contact-section {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: var(--text-white);
  padding: var(--space-3xl) 0;
  text-align: center;
}

.contact-content h2 {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

.contact-content p {
  font-size: var(--text-lg);
  opacity: 0.9;
  margin-bottom: var(--space-2xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.contact-actions {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  flex-wrap: wrap;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* ========================================
   Mesh Sizes and Tile Specifications
======================================== */
.mesh-sizes {
  margin-top: var(--space-lg);
}

.mesh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.mesh-item {
  background: var(--primary-color);
  color: var(--text-white);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-md);
  text-align: center;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.mesh-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.tile-specifications {
  margin-bottom: var(--space-3xl);
}

.tile-specifications h3 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xl);
  text-align: center;
}

.tile-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.tile-size-card,
.tile-color-card {
  background: var(--bg-primary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.tile-size-card:hover,
.tile-color-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.tile-size-card h4,
.tile-color-card h4 {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-md);
  text-align: center;
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--primary-color);
}

.size-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.size-item {
  background: var(--bg-secondary);
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
  border-left: 4px solid var(--primary-color);
}

.color-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.color-item {
  padding: var(--space-md);
  border-radius: var(--border-radius-md);
  text-align: center;
  font-weight: 600;
  color: var(--text-white);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.color-item.green {
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
}

.color-item.red {
  background: linear-gradient(135deg, #F44336, #C62828);
}

.color-item.black {
  background: linear-gradient(135deg, #424242, #212121);
}

.color-note {
  background: var(--bg-secondary);
  padding: var(--space-sm);
  border-radius: var(--border-radius-md);
  text-align: center;
  font-style: italic;
  color: var(--text-secondary);
  border: 1px dashed var(--bg-tertiary);
}

/* ========================================
   Responsive Design
======================================== */

/* Medium devices (768px and up) */
@media (min-width: 768px) {
  .product-overview {
    grid-template-columns: 1fr 2fr;
    align-items: center;
  }
  
  .sheet-header {
    align-items: center;
  }
  
  .specifications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-actions {
    justify-content: center;
  }
}

/* Large devices (992px and up) */
@media (min-width: 992px) {
  .specifications-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .size-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .performance-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Extra large devices (1200px and up) */
@media (min-width: 1200px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .processing-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Mobile Specific Adjustments */
@media (max-width: 767px) {
  .page-header {
    padding: calc(70px + var(--space-2xl)) 0 var(--space-2xl);
  }
  
  .data-sheet {
    scroll-margin-top: 240px; /* Account for navbar + wrapped navigation + extra spacing */
  }
  
  .sheet-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-lg);
  }
  
  .sheet-actions {
    width: 100%;
    justify-content: stretch;
  }
  
  .sheet-actions .btn {
    flex: 1;
  }
  
  .nav-items {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .nav-item {
    flex: 1;
    min-width: 100px;
    font-size: var(--text-xs);
    padding: var(--space-xs) var(--space-sm);
    text-align: center;
  }
  
  .contact-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .contact-actions .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .quick-nav,
  .sheet-actions,
  .contact-section {
    display: none !important;
  }
  
  .page-header {
    padding: var(--space-lg) 0;
    background: none !important;
    color: var(--text-primary) !important;
  }
  
  .data-sheet {
    page-break-before: always;
    margin-bottom: var(--space-2xl);
  }
  
  .data-sheet:first-child {
    page-break-before: auto;
  }
  
  .spec-card,
  .size-card,
  .app-card,
  .perf-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--bg-tertiary);
  }
  
  .spec-table table {
    page-break-inside: auto;
  }
  
  .spec-table tr {
    page-break-inside: avoid;
    page-break-after: auto;
  }
}