/* Cloud Native MCP Server Custom Styles */

:root {
  --primary-gradient: linear-gradient(120deg, #0b7285 0%, #2a9d8f 60%, #f4a261 100%);
  --primary-color: #0b7285;
  --secondary-color: #2a9d8f;
  --text-light: #ffffff;
  --text-dark: #2d3748;
  --bg-light: #f7fafc;
  --accent-color: #f4a261;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
}

/* Animation Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(11, 114, 133, 0.35);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(11, 114, 133, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(11, 114, 133, 0);
  }
}

/* Hero Section */
.hero {
  background: var(--primary-gradient);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: 12px;
  margin-bottom: 3rem;
  box-shadow: 0 10px 40px rgba(11, 114, 133, 0.28);
  position: relative;
  overflow: hidden;
  animation: fadeInUp 1s ease-out;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
  transform: rotate(30deg);
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
  position: relative;
  z-index: 2;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
}

.hero-buttons {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.cta-button:hover::before {
  opacity: 1;
}

.cta-button:hover span {
  color: white;
}

.cta-button span {
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.cta-button:focus-visible,
a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(11, 114, 133, 0.35);
  outline-offset: 2px;
}

.cta-button.transparent {
  background: transparent;
  border: 2px solid white;
}

.cta-button.transparent span {
  color: white;
}

.cta-button.transparent:hover span {
  color: var(--primary-color);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-gradient);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

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

.stat-label {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 500;
}

/* Feature Cards */
.feature-card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  height: 100%;
  animation: fadeInUp 1s ease-out;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

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

/* Service Cards */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  animation: fadeInUp 1s ease-out 0.4s both;
}

.service-card {
  background: linear-gradient(135deg, #f5f7fa 0%, #e2e8f0 100%);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  animation: fadeInUp 0.8s ease-out;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-color: var(--primary-color);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.tool-count {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

/* Home page content blocks */
.value-grid,
.usecase-grid,
.ops-grid,
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.value-card,
.usecase-card,
.ops-card,
.resource-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem 1.25rem;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.value-card:hover,
.usecase-card:hover,
.ops-card:hover,
.resource-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.value-card h3,
.usecase-card h3,
.ops-card h3,
.resource-card h3 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  color: var(--primary-color);
  border-bottom: none;
  padding-bottom: 0;
  font-size: 1.2rem;
}

.ops-card ul {
  margin: 0.7rem 0 0;
  padding-left: 1.1rem;
}

.ops-card li {
  margin-bottom: 0.4rem;
}

.resource-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.4rem;
  font-weight: 600;
  text-decoration: none;
}

.resource-link::after {
  content: "->";
  margin-left: 0.35rem;
  transition: transform 0.2s ease;
}

.resource-link:hover::after {
  transform: translateX(2px);
}

/* Code Blocks */
pre {
  background: #2d3748;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid rgba(255,255,255,0.1);
  position: relative;
  animation: fadeInUp 0.8s ease-out;
}

pre code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  animation: fadeInUp 0.8s ease-out;
}

th {
  background: var(--primary-gradient);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #e2e8f0;
}

tr:hover td {
  background: #f7fafc;
}

/* Tabs */
.book-tabs {
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card-bg);
}

.book-tabs input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.book-tabs > label {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: #64748b;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
  margin-right: 0.15rem;
}

.book-tabs > label:hover {
  color: var(--primary-color);
}

.book-tabs > input[type="radio"]:checked + label {
  color: var(--primary-color);
  background: rgba(11, 114, 133, 0.08);
  border-bottom: 2px solid var(--primary-color);
}

.book-tabs-content {
  padding: 1.1rem 1.3rem;
  border-top: 1px solid var(--border-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .service-grid {
    grid-template-columns: 1fr;
  }

  .value-grid,
  .usecase-grid,
  .ops-grid,
  .resource-grid {
    grid-template-columns: 1fr;
  }

  .book-site-footer__top,
  .book-site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Improvements for readability */
article {
  max-width: 100%;
  padding: 0;
}

h1, h2, h3 {
  color: var(--text-dark);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  line-height: 1.8;
  margin-bottom: 1rem;
}

ul, ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Footer */
.book-site-footer {
  margin-top: 2rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--border-color);
}

.book-site-footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.book-site-footer__brand {
  max-width: 420px;
}

.book-site-footer__brand p {
  margin: 0.4rem 0 0;
  color: #4a5568;
}

.book-site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.book-site-footer__links a {
  font-size: 0.95rem;
  font-weight: 500;
}

.book-site-footer__bottom {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border-color);
  display: flex;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
  color: #718096;
  font-size: 0.9rem;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--primary-gradient);
  z-index: 9999;
  transition: width 0.3s ease;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: var(--primary-gradient);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  z-index: 9998;
  background: var(--primary-gradient);
}

/* Columns shortcode override */
.book-columns {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  margin: 1.5rem 0;
}

@media (max-width: 600px) {
  .book-columns {
    flex-direction: column;
  }
}

/* Dark mode variables */
:root[data-theme="dark"] {
  --primary-gradient: linear-gradient(120deg, #38b2ac 0%, #2c7a7b 60%, #f6ad55 100%);
  --primary-color: #38b2ac;
  --secondary-color: #2c7a7b;
  --text-light: #e2e8f0;
  --text-dark: #cbd5e0;
  --bg-light: #1a202c;
  --card-bg: #2d3748;
  --border-color: #4a5568;
}

/* Breadcrumbs */
.book-breadcrumbs {
  margin: 1rem 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.book-breadcrumb-item {
  font-size: 0.875rem;
  color: var(--text-dark, #4a5568);
}

.book-breadcrumb-item a {
  color: var(--primary-color, #667eea);
  text-decoration: none;
}

.book-breadcrumb-item a:hover {
  text-decoration: underline;
}

.book-breadcrumb-item span {
  margin: 0 0.5rem;
  color: #a0aec0;
}

/* Blog posts styling */
.posts-list {
  margin: 1.5rem 0;
}

.post-item {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color, #e2e8f0);
}

.post-item:last-child {
  border-bottom: none;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: #718096;
}

.post-tags {
  display: flex;
  gap: 0.5rem;
}

.post-tag {
  background: var(--primary-color);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
}

.post-summary {
  line-height: 1.6;
}

.post-summary a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.post-summary a:hover {
  text-decoration: underline;
}

/* Dark mode blog adjustments */
[data-theme="dark"] .post-item {
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .post-meta {
  color: #a0aec0;
}

/* Dark mode adjustments */
[data-theme="dark"] body {
  background: var(--bg-light);
  color: var(--text-light);
}

[data-theme="dark"] .book-breadcrumbs {
  border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .book-breadcrumb-item {
  color: var(--text-light);
}

[data-theme="dark"] .book-breadcrumb-item a {
  color: var(--primary-color);
}

[data-theme="dark"] .book-breadcrumb-item span {
  color: #718096;
}

[data-theme="dark"] .book-site-footer__brand p,
[data-theme="dark"] .book-site-footer__bottom {
  color: #a0aec0;
}

[data-theme="dark"] .hero {
  background: var(--primary-gradient);
}

[data-theme="dark"] .feature-card,
[data-theme="dark"] .stat-item,
[data-theme="dark"] .service-card,
[data-theme="dark"] .value-card,
[data-theme="dark"] .usecase-card,
[data-theme="dark"] .ops-card,
[data-theme="dark"] .resource-card {
  background: var(--card-bg);
  color: var(--text-light);
}

[data-theme="dark"] .stat-label,
[data-theme="dark"] .service-card h3,
[data-theme="dark"] .value-card h3,
[data-theme="dark"] .usecase-card h3,
[data-theme="dark"] .ops-card h3,
[data-theme="dark"] .resource-card h3 {
  color: var(--text-light);
}

[data-theme="dark"] pre {
  background: var(--card-bg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

[data-theme="dark"] table {
  background: var(--card-bg);
}

[data-theme="dark"] th {
  background: var(--primary-gradient);
}

[data-theme="dark"] tr:hover td {
  background: var(--border-color);
}

/* Custom scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--secondary-color);
}

/* Dark mode scrollbar */
[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #2d3748;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: var(--primary-color);
}
