/* DevOps Tools & Practices Styling */

/* Practice Detail Page */
.practice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.practice-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.5rem;
}

.level-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.level-beginner {
  background-color: #d5edda;
  color: #155724;
}

.level-intermediate {
  background-color: #fff3cd;
  color: #856404;
}

.level-advanced {
  background-color: #f8d7da;
  color: #721c24;
}

.practice-content {
  margin-top: 1rem;
}

.practice-content .description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.practice-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.detail-section {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
}

.detail-section h4 {
  margin: 0 0 0.75rem 0;
  color: #495057;
  font-size: 1rem;
  font-weight: 600;
}

.detail-section ul {
  margin: 0;
  padding-left: 1.25rem;
}

.detail-section li {
  margin-bottom: 0.5rem;
  color: #6c757d;
  line-height: 1.4;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-tag {
  background: #e9ecef;
  color: #495057;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.practices-section {
  margin-top: 2rem;
}

/* Tools and Practices Grid */
.tools-grid, .practices-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.tool-card, .practice-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover, .practice-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tool-card h4, .practice-card h4 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
}

.tool-card h4 a, .practice-card h4 a {
  color: inherit;
  text-decoration: none;
}

.tool-card h4 a:hover, .practice-card h4 a:hover {
  color: #3498db;
}

.tool-description, .practice-description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tool-meta, .practice-meta {
  margin-bottom: 1rem;
}

/* Badges */
.popularity-badge, .level-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.popularity-high {
  background: #28a745;
  color: white;
}

.popularity-medium {
  background: #ffc107;
  color: #212529;
}

.popularity-low {
  background: #6c757d;
  color: white;
}

.level-beginner {
  background: #28a745;
  color: white;
}

.level-intermediate {
  background: #ffc107;
  color: #212529;
}

.level-advanced {
  background: #dc3545;
  color: white;
}

/* Tool/Practice Features */
.tool-features, .tool-use-cases, .practice-benefits, .practice-principles, .practice-tools {
  margin-bottom: 1rem;
}

.tool-features h5, .tool-use-cases h5, .practice-benefits h5, .practice-principles h5, .practice-tools h5 {
  margin: 0 0 0.5rem 0;
  color: #495057;
  font-size: 0.9rem;
  font-weight: 600;
}

.tool-features ul, .practice-benefits ul {
  margin: 0;
  padding-left: 1rem;
  list-style: disc;
}

.tool-features li, .practice-benefits li {
  padding: 0.1rem 0;
  color: #555;
  font-size: 0.85rem;
}

/* Tags */
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

/* Comparison Tables */
.tools-comparison-table, .practices-comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.9rem;
}

.tools-comparison-table th, .practices-comparison-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tools-comparison-table td, .practices-comparison-table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}

.tools-comparison-table tr:hover, .practices-comparison-table tr:hover {
  background-color: #f8f9fa;
}

.practice-name .practice-desc {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.25rem;
  font-weight: normal;
}

.devops-subcategory-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.subcategory-intro {
  margin-bottom: 2rem;
}

.subcategory-intro h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.subcategory-intro p {
  font-size: 1.1rem;
  color: #555;
  line-height: 1.6;
  max-width: 800px;
}

/* Table Styling */
.table-container {
  overflow-x: auto;
  margin-bottom: 3rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.9rem;
}

.comparison-table th {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0.75rem;
  text-align: left;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
}

.comparison-table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid #e9ecef;
  vertical-align: top;
}

.comparison-table tr:hover {
  background-color: #f8f9fa;
}

/* Column Widths */
.rank-col { width: 8%; min-width: 60px; }
.name-col { width: 18%; min-width: 160px; }
.description-col { width: 35%; min-width: 300px; }
.platforms-col { width: 15%; min-width: 120px; }
.pricing-col { width: 10%; min-width: 100px; }
.share-col { width: 8%; min-width: 80px; }
.developer-col { width: 12%; min-width: 120px; }

/* Rank Badge */
.rank-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.8rem;
}

/* Tool Name Styling */
.tool-name {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tool-link {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.tool-link:hover {
  color: #3498db;
}

.release-year {
  font-size: 0.75rem;
  color: #6c757d;
}

/* Description Styling */
.tool-description p {
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
  color: #555;
}

.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.feature-tag {
  background: #e3f2fd;
  color: #1976d2;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 500;
}

.feature-more {
  background: #f5f5f5;
  color: #666;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-style: italic;
}

/* Platform Tags */
.platform-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.platform-tag {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.75rem;
}

/* Pricing Info */
.pricing-info {
  font-weight: 600;
  color: #28a745;
}

/* Market Share */
.market-share {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.share-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.share-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  transition: width 0.3s ease;
}

.share-text {
  font-size: 0.75rem;
  font-weight: 600;
  color: #28a745;
  text-align: center;
}

/* Developer Name */
.developer-name {
  font-weight: 500;
  color: #6c757d;
}

/* Pros/Cons Section */
.pros-cons-section {
  margin-top: 3rem;
}

.pros-cons-section h3 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 2rem;
  text-align: center;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.comparison-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.comparison-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.comparison-card h4 {
  margin: 0 0 1rem 0;
  color: #2c3e50;
}

.comparison-card h4 a {
  color: inherit;
  text-decoration: none;
}

.comparison-card h4 a:hover {
  color: #3498db;
}

.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.pros h5, .cons h5 {
  margin: 0 0 0.5rem 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pros h5 {
  color: #28a745;
}

.cons h5 {
  color: #dc3545;
}

.pros ul, .cons ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pros li {
  padding: 0.25rem 0;
  color: #495057;
  font-size: 0.85rem;
  position: relative;
  padding-left: 1rem;
}

.pros li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #28a745;
  font-weight: bold;
}

.cons li {
  padding: 0.25rem 0;
  color: #495057;
  font-size: 0.85rem;
  position: relative;
  padding-left: 1rem;
}

.cons li::before {
  content: "×";
  position: absolute;
  left: 0;
  color: #dc3545;
  font-weight: bold;
}

/* Integration E2E Specific Styling */
.frameworks-table th:nth-child(1), /* No */
.frameworks-table td:nth-child(1) {
  width: 5%;
  min-width: 40px;
}

.frameworks-table th:nth-child(2), /* 名前 */
.frameworks-table td:nth-child(2) {
  width: 12%;
  min-width: 120px;
}

.frameworks-table th:nth-child(3), /* 説明 */
.frameworks-table td:nth-child(3) {
  width: 35%;
  min-width: 300px;
}

.frameworks-table th:nth-child(4), /* トレンド */
.frameworks-table td:nth-child(4) {
  width: 30%;
  min-width: 250px;
}

.frameworks-table th:nth-child(5), /* ライセンス */
.frameworks-table td:nth-child(5) {
  width: 8%;
  min-width: 80px;
}

.frameworks-table th:nth-child(6), /* 言語 */
.frameworks-table td:nth-child(6) {
  width: 10%;
  min-width: 100px;
}

.frameworks-table th:nth-child(7), /* 公式サイト */
.frameworks-table td:nth-child(7) {
  width: 8%;
  min-width: 80px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .comparison-table {
    font-size: 0.8rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.5rem;
  }
  
  .name-col { min-width: 140px; }
  .description-col { min-width: 250px; }
  .platforms-col { min-width: 100px; }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  
  .pros-cons {
    grid-template-columns: 1fr;
  }

  .frameworks-table th:nth-child(3), /* 説明 */
  .frameworks-table td:nth-child(3) {
    min-width: 250px;
  }

  .frameworks-table th:nth-child(4), /* トレンド */
  .frameworks-table td:nth-child(4) {
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .comparison-table {
    font-size: 0.75rem;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 0.4rem 0.3rem;
  }
  
  .subcategory-intro h2 {
    font-size: 1.5rem;
  }
  
  .subcategory-intro p {
    font-size: 1rem;
  }

  .frameworks-table th:nth-child(3), /* 説明 */
  .frameworks-table td:nth-child(3) {
    min-width: 200px;
  }

  .frameworks-table th:nth-child(4), /* トレンド */
  .frameworks-table td:nth-child(4) {
    min-width: 150px;
  }
}