/* Base Styles */
:root {
  --primary-color: #2c3e50;
  --secondary-color: #3498db;
  --accent-color: #e74c3c;
  --light-color: #ecf0f1;
  --dark-color: #2c3e50;
  --text-color: #333;
  --link-color: #3498db;
  --link-hover-color: #2980b9;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --danger-color: #e74c3c;
  --border-radius: 4px;
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: #f8f9fa;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 1rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary-color);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--link-hover-color);
  text-decoration: underline;
}

ul, ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Header */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem 0;
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

header h1 {
  color: white;
  margin-bottom: 0.5rem;
}

nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

nav li {
  margin: 0 1rem 0 0;
  margin-bottom: 0.5rem;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}

nav a:hover {
  border-bottom: 2px solid white;
  text-decoration: none;
}

/* Hero Section */
.hero {
  background-color: var(--secondary-color);
  color: white;
  padding: 3rem 0;
  margin-bottom: 2rem;
  text-align: center;
}

.hero h2 {
  color: white;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  background-color: var(--secondary-color);
  color: white;
  padding: 2rem 0;
  margin-bottom: 2rem;
  text-align: center;
}

.page-header h2 {
  color: white;
  margin-bottom: 0.5rem;
}

.page-header p {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
}

/* Content Sections */
.content {
  padding: 2rem 0;
}

.content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary-color);
}

.content h4 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.content h5 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.content ul, .content ol {
  margin-bottom: 1.5rem;
}

.content li {
  margin-bottom: 0.5rem;
}

.content strong {
  color: var(--primary-color);
}

/* Executive Summary */
.executive-summary {
  background-color: #f8f9fa;
  padding: 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
  box-shadow: var(--box-shadow);
}

/* Introduction */
.introduction {
  margin-bottom: 2rem;
}

/* Benefits Container */
.benefits-container, .applications-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 2rem;
}

.benefit-column, .application-column {
  flex: 1;
  min-width: 300px;
}

/* Content Preview */
.content-preview {
  margin-top: 3rem;
}

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

.preview-card {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.preview-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.preview-card h3 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
  border-bottom: none;
}

.preview-card p {
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-block;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: var(--transition);
}

.btn:hover {
  background-color: var(--link-hover-color);
  text-decoration: none;
  color: white;
}

/* Communication Types */
.communication-types, .technology-comparison {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.comm-type, .technology {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: var(--box-shadow);
}

.comm-type h4, .technology h4 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* Tables */
.table-responsive {
  overflow-x: auto;
  margin-bottom: 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #dee2e6;
}

th {
  background-color: var(--primary-color);
  color: white;
}

tr:nth-child(even) {
  background-color: #f8f9fa;
}

/* Architecture Layers */
.architecture-layers, .system-components, .communication-modes, 
.security-architecture, .data-flow, .integration-architecture, 
.deployment-architecture {
  margin-bottom: 2rem;
}

.layer, .component, .mode, .security-section, 
.flow-section, .integration-section, .deployment-section {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--box-shadow);
}

.layer h4, .component h4, .mode h4, .security-section h4, 
.flow-section h4, .integration-section h4, .deployment-section h4 {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.layer-components, .component-details, .mode-details {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1rem;
}

.detail-section {
  flex: 1;
  min-width: 300px;
}

/* Protocol Diagram */
.protocol-diagram {
  text-align: center;
  margin-bottom: 2rem;
}

.full-width-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.protocol-description {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--box-shadow);
}

/* Specs Section */
.specs-section, .integration-section, .deployment-section {
  margin-bottom: 2rem;
}

.specs-subsection, .integration-subsection, .testing-section, .maintenance-section {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--box-shadow);
}

.specs-table {
  width: 100%;
}

/* Deployment Phases */
.deployment-phase {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--box-shadow);
}

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

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
}

footer p {
  margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  h4 {
    font-size: 1.25rem;
  }
  
  .hero {
    padding: 2rem 0;
  }
  
  .hero h2 {
    font-size: 1.75rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .benefits-container, .applications-container {
    flex-direction: column;
  }
  
  .preview-grid {
    grid-template-columns: 1fr;
  }
  
  .communication-types, .technology-comparison {
    grid-template-columns: 1fr;
  }
  
  .layer-components, .component-details, .mode-details {
    flex-direction: column;
  }
  
  .phase-details {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  nav ul {
    flex-direction: column;
  }
  
  nav li {
    margin: 0.25rem 0;
  }
}
