/* MikroTik indirmeler — RouterOS / SwitchOS / WinBox */

.mtk-dl-page {
  padding-bottom: 3rem;
}

.mtk-dl-hero {
  padding: 2rem 0 1.5rem;
  background: linear-gradient(165deg, #fef2f2 0%, #fff 55%);
  border-bottom: 1px solid #e2e8f0;
}

.mtk-dl-hero h1 {
  margin: 0.5rem 0 0.35rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.mtk-dl-hero-lead {
  margin: 0;
  max-width: 44rem;
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.mtk-dl-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  text-decoration: none;
}

.mtk-dl-back:hover {
  color: var(--primary, #e31937);
}

.mtk-dl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.mtk-dl-tabs a {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  text-decoration: none;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid transparent;
}

.mtk-dl-tabs a.is-active,
.mtk-dl-tabs a:hover {
  color: #0f172a;
  border-bottom-color: var(--primary, #e31937);
}

.mtk-dl-section {
  padding: 2rem 0 0;
}

.mtk-dl-section h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.mtk-dl-section-lead {
  margin: 0 0 1rem;
  max-width: 44rem;
  color: #64748b;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.mtk-dl-alert {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  font-size: 0.875rem;
  color: #78350f;
  line-height: 1.5;
}

.mtk-dl-alert strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #92400e;
}

.mtk-dl-alert a {
  color: #b45309;
  font-weight: 600;
}

.mtk-dl-version-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mtk-dl-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.mtk-dl-chip:hover {
  border-color: var(--primary, #e31937);
  color: var(--primary, #e31937);
  text-decoration: none;
}

.mtk-dl-more {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
}

.mtk-dl-more a {
  font-weight: 600;
  color: var(--primary, #e31937);
}

.mtk-dl-field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 0.875rem;
  color: #334155;
}

.mtk-dl-card-icon,
.mtk-dl-app-icon {
  display: block;
  flex-shrink: 0;
}

.mtk-dl-card-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 0.15rem;
}

.mtk-dl-app-icon {
  width: 3.25rem;
  height: 3.25rem;
}

.mtk-dl-icon-wrap {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.mtk-dl-icon-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mtk-dl-icon-wrap--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
  color: #fff;
  border-radius: 14px;
}

.mtk-dl-tools-group {
  margin-bottom: 2.5rem;
}

.mtk-dl-tools-group h2 {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.mtk-dl-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.mtk-dl-tool-card {
  position: relative;
  padding: 1.25rem 1.25rem 1.1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}

.mtk-dl-tool-card::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: #fff;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  border-top: 1px solid #e2e8f0;
  border-left: 1px solid #e2e8f0;
}

.mtk-dl-tool-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.mtk-dl-tool-icon {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
}

.mtk-dl-tool-card h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #0f172a;
}

.mtk-dl-tool-desc {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.55;
}

.mtk-dl-tool-downloads {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mtk-dl-tool-downloads li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.mtk-dl-tool-file {
  font-size: 0.75rem;
  color: #94a3b8;
  font-family: ui-monospace, monospace;
  padding-left: 0.15rem;
}

.mtk-dl-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.mtk-dl-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
}

.mtk-dl-card:hover {
  border-color: color-mix(in srgb, var(--primary, #e31937) 40%, #e2e8f0);
  box-shadow: 0 8px 28px rgba(227, 25, 55, 0.08);
  transform: translateY(-2px);
  text-decoration: none;
}


.mtk-dl-card h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.mtk-dl-card p {
  margin: 0;
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
}

.mtk-dl-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mtk-dl-info-box {
  padding: 1.1rem 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.55;
}

.mtk-dl-info-box strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #0f172a;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mtk-dl-filters {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.mtk-dl-filter-row label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
}

.mtk-dl-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mtk-dl-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

.mtk-dl-pill:hover {
  border-color: #0f172a;
  text-decoration: none;
}

.mtk-dl-pill.is-active {
  border-width: 2px;
  border-color: #0f172a;
  background: #fff;
  color: #0f172a;
}

.mtk-dl-version-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.mtk-dl-version-form select {
  min-width: 10rem;
  padding: 0.55rem 2rem 0.55rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.9375rem;
  background: #fff;
}

.mtk-dl-version-form button {
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary, #e31937);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
}

.mtk-dl-summary {
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  background: #f1f5f9;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #334155;
}

.mtk-dl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.mtk-dl-group h3 {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.mtk-dl-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mtk-dl-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
}

.mtk-dl-package-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mtk-dl-dl-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  max-width: 100%;
  word-break: break-word;
}

.mtk-dl-dl-btn:hover {
  border-color: var(--primary, #e31937);
  background: color-mix(in srgb, var(--primary, #e31937) 6%, #fff);
  color: var(--primary, #e31937);
  text-decoration: none;
}

.mtk-dl-dl-btn--primary {
  border-color: color-mix(in srgb, var(--primary, #e31937) 35%, #cbd5e1);
  background: color-mix(in srgb, var(--primary, #e31937) 8%, #fff);
}

.mtk-dl-dl-btn--primary:hover {
  background: var(--primary, #e31937);
  border-color: var(--primary, #e31937);
  color: #fff;
}

.mtk-dl-dl-btn-title {
  font-weight: 700;
}

.mtk-dl-dl-btn-meta {
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.85;
}

.mtk-dl-download-panel {
  padding: 1.25rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.mtk-dl-download-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.mtk-dl-empty {
  padding: 1rem 1.25rem;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  font-size: 0.875rem;
  color: #64748b;
}

.mtk-dl-model-form {
  max-width: 28rem;
  margin-bottom: 1.5rem;
}

.mtk-dl-model-form select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.9375rem;
}

.mtk-dl-winbox-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.5rem;
  padding: 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  align-items: start;
}

.mtk-dl-winbox-badge {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
}

.mtk-dl-winbox-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.mtk-dl-winbox-version {
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
  color: #64748b;
}

.mtk-dl-winbox-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mtk-dl-apps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.mtk-dl-app {
  padding: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}

.mtk-dl-app h3 {
  margin: 0.75rem 0 0.35rem;
  font-size: 1rem;
}

.mtk-dl-app p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: #64748b;
}

.mtk-dl-store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mtk-dl-store-links a,
.mtk-dl-app .ubnt-dl-dl-btn {
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--primary, #e31937);
  text-decoration: none;
}

.mtk-dl-store-links a:hover,
.mtk-dl-app .ubnt-dl-dl-btn:hover {
  background: #fee2e2;
  text-decoration: none;
}

.mtk-dl-app .ubnt-dl-dl-btn--file {
  background: color-mix(in srgb, var(--primary, #e31937) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--primary, #e31937) 30%, #e2e8f0);
  color: #0f172a;
}

.mtk-dl-app .ubnt-dl-dl-btn--file:hover {
  background: var(--primary, #e31937);
  color: #fff;
}

.mtk-dl-footnote {
  margin-top: 2rem;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.mtk-dl-footnote a {
  color: #64748b;
}

@media (max-width: 640px) {
  .mtk-dl-winbox-card {
    grid-template-columns: 1fr;
  }
}
