/*
 * Inner pages adapter for index.html design system (styles-new.css)
 * Purpose: keep legacy inner-page HTML (row/col/utilities) working while matching modern palette.
 */

/* Hide legacy header blocks once we inject the modern header into inner pages */
body > header:not(.modern-header) {
  display: none !important;
}

/* Hide legacy simple footer blocks (inner pages) */
footer.container.text-center {
  display: none !important;
}

/* -----------------------------
   Lightweight grid (Bootstrap-like)
   ----------------------------- */

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -0.75rem;
  margin-right: -0.75rem;
}

.row > * {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  min-width: 0;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}

.col-lg-6 {
  flex: 0 0 100%;
  max-width: 100%;
}

.col-md-4 {
  flex: 0 0 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .col-md-4 {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}

@media (min-width: 992px) {
  .col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* -----------------------------
   Utilities used by legacy pages
   ----------------------------- */

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.text-center { text-align: center; }

.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }

.img-fluid { max-width: 100%; height: auto; }

/* Links used in old footer */
.text-white { color: var(--text-primary); }
.text-decoration-none { text-decoration: none; }

/* -----------------------------
   Button compatibility
   ----------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

/* Map legacy variants to modern system */
.btn-success { /* treat as primary */
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--bg-primary);
  border: 1px solid transparent;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 212, 170, 0.5);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: var(--bg-primary);
}

.btn-lg {
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  border-radius: var(--border-radius);
}

/* -----------------------------
   Inner page sections
   ----------------------------- */

.hero-section {
  padding: var(--spacing-2xl) 0 var(--spacing-xl);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(0, 212, 170, 0.18) 0%, transparent 70%);
  filter: blur(1px);
  pointer-events: none;
}

.hero-content {
  background: rgba(26, 36, 66, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}

.hero-content h1 {
  margin-bottom: var(--spacing-sm);
}

.hero-content p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.hero-features {
  display: grid;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.hero-feature {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-sm);
  background: rgba(10, 14, 39, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.feature-icon {
  font-size: 1.75rem;
  width: 40px;
  text-align: center;
}

.feature-text h4 {
  font-size: 1rem;
  margin: 0 0 0.25rem 0;
}

.feature-text p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.hero-image-section img {
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 212, 170, 0.15);
}

.inner-content {
  padding-bottom: var(--spacing-2xl);
}

.breadcrumb-section {
  background: rgba(10, 14, 39, 0.55);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-sm) 0;
}

.breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--primary-color);
}

.breadcrumb-item.active {
  color: var(--text-secondary);
}

.breadcrumb-item:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.main-content {
  padding: var(--spacing-xl) 0;
}

.content-article {
  background: rgba(26, 36, 66, 0.65);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-md);
}

.content-article h2 {
  margin-bottom: var(--spacing-sm);
}

.content-article p {
  color: var(--text-secondary);
}

.content-card {
  background: rgba(10, 14, 39, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.content-card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
}

.content-card h4 {
  margin-top: var(--spacing-sm);
}

.content-card p {
  color: var(--text-secondary);
}

.sidebar-section {
  padding: var(--spacing-xl) 0;
}

.sidebar-widget {
  background: rgba(26, 36, 66, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  height: 100%;
}

.sidebar-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-links a {
  color: var(--text-secondary);
}

.sidebar-links a:hover {
  color: var(--primary-color);
}

.promo-card {
  background: rgba(10, 14, 39, 0.55);
  border: 1px solid rgba(0, 212, 170, 0.25);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
}

.related-pages {
  padding: var(--spacing-xl) 0 var(--spacing-2xl);
}

.related-card {
  background: rgba(26, 36, 66, 0.55);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  height: 100%;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.related-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 212, 170, 0.5);
}

/* Subtle legacy animation class support (safe) */
.animate-fade-in-up { animation: fadeInUp 0.6s ease both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}