/* directhost.cloud — Linode-inspired cloud marketing theme */

:root {
  --dh-bg: #0c1017;
  --dh-bg-elevated: #121826;
  --dh-surface: #161d2a;
  --dh-border: rgba(255, 255, 255, 0.08);
  --dh-text: #e8edf5;
  --dh-muted: #9aa4b2;
  --dh-accent: #00b159;
  --dh-accent-hover: #00c965;
  --dh-accent-dim: rgba(0, 177, 89, 0.15);
  --dh-radius: 12px;
  --dh-font: "DM Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --dh-max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.dh-body {
  margin: 0;
  font-family: var(--dh-font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--dh-text);
  background: var(--dh-bg);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.dh-container {
  width: min(100% - 2rem, var(--dh-max));
  margin-inline: auto;
}

/* Header */
.dh-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 16, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--dh-border);
  overflow: visible;
  /* stacking context fără să tăiem dropdown-urile */
  isolation: isolate;
}

.dh-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  overflow: visible;
}

.dh-logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--dh-text);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.dh-logo:hover {
  color: var(--dh-accent);
}

/* Burger + nav în același container (pentru click outside; fără position aici — nav mobil se ancorează la .dh-header__inner) */
.dh-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
  gap: 0.75rem;
}

.dh-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  cursor: pointer;
}

.dh-nav-toggle__bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dh-text);
}

.dh-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  overflow: visible;
}

.dh-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.dh-nav__link {
  color: var(--dh-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.dh-nav__link:hover {
  color: var(--dh-text);
}

.dh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.dh-btn--primary {
  background: var(--dh-accent);
  color: #041208;
}

.dh-btn--primary:hover {
  background: var(--dh-accent-hover);
}

.dh-btn--ghost {
  background: transparent;
  color: var(--dh-text);
  border-color: var(--dh-border);
}

.dh-btn--ghost:hover {
  border-color: var(--dh-muted);
  background: var(--dh-surface);
}

.dh-btn--lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .dh-menu {
    flex: 0 0 auto;
  }

  .dh-nav-toggle {
    display: flex;
  }

  .dh-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--dh-bg-elevated);
    border-bottom: 1px solid var(--dh-border);
    display: none;
    z-index: 100;
  }

  .dh-nav--open {
    display: flex;
  }

  .dh-nav__list {
    flex-direction: column;
  }

  .dh-nav__cta {
    text-align: center;
  }
}

/* Hero */
.dh-hero {
  position: relative;
  padding: clamp(3rem, 10vw, 6rem) 0 clamp(4rem, 12vw, 7rem);
  overflow: hidden;
}

.dh-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, var(--dh-accent-dim), transparent),
    radial-gradient(ellipse 50% 40% at 100% 50%, rgba(0, 177, 89, 0.08), transparent),
    linear-gradient(180deg, var(--dh-bg) 0%, var(--dh-bg-elevated) 100%);
  pointer-events: none;
}

.dh-hero__inner {
  position: relative;
  max-width: 42rem;
}

.dh-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dh-accent);
}

.dh-hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.dh-hero__subtitle {
  margin: 0 0 2rem;
  font-size: 1.15rem;
  color: var(--dh-muted);
  line-height: 1.55;
}

.dh-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Sections */
.dh-section {
  padding: clamp(3rem, 8vw, 5rem) 0;
}

.dh-section__title {
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.dh-section__lead {
  margin: -1rem 0 2.5rem;
  max-width: 36rem;
  color: var(--dh-muted);
  font-size: 1.1rem;
}

.dh-card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dh-card {
  padding: 1.5rem;
  background: var(--dh-surface);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
}

.dh-card__title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.dh-card__text {
  margin: 0 0 1rem;
  color: var(--dh-muted);
  font-size: 0.98rem;
}

.dh-card__link {
  font-weight: 600;
  color: var(--dh-accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.dh-card__link:hover {
  text-decoration: underline;
}

.dh-product-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dh-product {
  padding: 1.75rem;
  background: linear-gradient(145deg, var(--dh-surface), var(--dh-bg-elevated));
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
}

.dh-product__title {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}

.dh-product__desc {
  margin: 0 0 1rem;
  color: var(--dh-muted);
  font-size: 0.98rem;
}

.dh-product__link {
  font-weight: 600;
  color: var(--dh-accent);
  text-decoration: none;
}

.dh-product__link:hover {
  text-decoration: underline;
}

.dh-cta-band {
  padding: clamp(2.5rem, 6vw, 3.5rem) 0;
  background: var(--dh-accent-dim);
  border-block: 1px solid rgba(0, 177, 89, 0.25);
}

.dh-cta-band__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.dh-cta-band__title {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.dh-cta-band__text {
  margin: 0;
  color: var(--dh-muted);
  max-width: 36rem;
}

.dh-content-block {
  padding-bottom: clamp(4rem, 10vw, 6rem);
}

/* Inner pages */
.dh-page-header {
  padding: clamp(2.5rem, 6vw, 4rem) 0 1rem;
  border-bottom: 1px solid var(--dh-border);
}

.dh-page-title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  letter-spacing: -0.02em;
}

.dh-page-subtitle {
  margin: 0.75rem 0 0;
  color: var(--dh-muted);
  font-size: 1.1rem;
}

/* Prose (markdown) */
.dh-prose {
  max-width: 42rem;
}

.dh-prose h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
}

.dh-prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.15rem;
}

.dh-prose p,
.dh-prose ul,
.dh-prose ol {
  margin: 0 0 1rem;
  color: var(--dh-muted);
}

.dh-prose a {
  color: var(--dh-accent);
  font-weight: 500;
}

.dh-prose ul,
.dh-prose ol {
  padding-left: 1.25rem;
}

.dh-prose li {
  margin-bottom: 0.35rem;
}

.dh-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.dh-prose th,
.dh-prose td {
  border: 1px solid var(--dh-border);
  padding: 0.65rem 0.85rem;
  text-align: left;
}

.dh-prose th {
  background: var(--dh-surface);
  color: var(--dh-text);
}

/* Footer */
.dh-footer {
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--dh-border);
  background: var(--dh-bg-elevated);
}

.dh-footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 2rem;
}

.dh-footer__logo {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.dh-footer__tagline {
  margin: 0;
  color: var(--dh-muted);
  font-size: 0.95rem;
}

.dh-footer__title {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dh-muted);
}

.dh-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dh-footer__links a {
  color: var(--dh-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.dh-footer__links li {
  margin-bottom: 0.5rem;
}

.dh-footer__links a:hover {
  color: var(--dh-accent);
}

.dh-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dh-social-link {
  color: var(--dh-muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.dh-social-link:hover {
  color: var(--dh-accent);
}

.dh-footer__copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--dh-muted);
}

/* ——— Header: submeniuri ——— */
.dh-nav__item {
  position: relative;
  list-style: none;
}

.dh-nav__item-row {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.dh-nav__link--parent {
  /* padding-bottom extins pentru a mări zona hover și a acoperi „puntea” spre dropdown */
  padding: 0.75rem 0;
}

.dh-nav__caret {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--dh-muted);
  cursor: pointer;
}

.dh-nav__caret:hover,
.dh-nav__caret:focus-visible {
  background: var(--dh-surface);
  color: var(--dh-text);
}

.dh-nav__caret-icon {
  display: block;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  translate: 0 -2px;
}

/* Submeniuri: doar copil direct al item-ului (evită conflicte de specificitate) */
.dh-nav__item--has-sub > .dh-nav__dropdown {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  min-width: 220px;
  background: var(--dh-bg-elevated);
  border: 1px solid var(--dh-border);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.dh-nav__dropdown-link {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--dh-muted);
  text-decoration: none;
}

.dh-nav__dropdown-link:hover,
.dh-nav__dropdown-link:focus-visible {
  color: var(--dh-text);
  background: rgba(0, 177, 89, 0.08);
}

@media (min-width: 769px) {
  .dh-nav__caret {
    display: none;
  }

  .dh-nav__item--has-sub:hover > .dh-nav__dropdown,
  .dh-nav__item--has-sub:focus-within > .dh-nav__dropdown,
  .dh-nav__item--has-sub.dh-nav__item--open > .dh-nav__dropdown {
    display: block;
    position: absolute;
    /* fără gap real: punte invizibilă via ::before mai jos */
    top: 100%;
    left: 0;
    z-index: 60;
  }

  /* Punte de hover: panoul are un „padding-top” virtual de 10px care rămâne în interiorul
     descendenților lui <li>, așa că :hover nu se mai pierde când mouse-ul trece de la părinte la panou. */
  .dh-nav__item--has-sub > .dh-nav__dropdown {
    margin-top: 0.35rem;
  }
  .dh-nav__item--has-sub > .dh-nav__dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -0.65rem;
    height: 0.65rem;
    /* background transparent dar „hit-testable” */
    background: transparent;
  }

  .dh-nav__item--has-sub:hover .dh-nav__link--parent,
  .dh-nav__item--has-sub:focus-within .dh-nav__link--parent,
  .dh-nav__item--has-sub.dh-nav__item--open .dh-nav__link--parent {
    color: var(--dh-text);
  }
}

@media (max-width: 768px) {
  .dh-nav__caret {
    display: inline-flex;
  }

  .dh-nav__item-row {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
  }

  .dh-nav__link--parent {
    flex: 1;
  }

  .dh-nav__item--has-sub.dh-nav__item--open > .dh-nav__dropdown {
    display: block;
    margin: 0.25rem 0 0.5rem 0.75rem;
    padding: 0;
    border: none;
    border-left: 2px solid var(--dh-border);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-width: unset;
  }

  .dh-nav__dropdown-link {
    padding: 0.45rem 0.75rem;
  }

  .dh-nav__item--has-sub {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}

/* ——— Hero split + trust ——— */
.dh-hero--split {
  padding-bottom: clamp(3rem, 8vw, 5rem);
}

.dh-hero__grid {
  position: relative;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .dh-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.95fr);
  }
}

.dh-hero__copy {
  max-width: 38rem;
}

.dh-hero__visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--dh-border);
  background: var(--dh-surface);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.dh-hero__img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.dh-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--dh-border);
}

.dh-trust-strip__item {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--dh-muted);
}

.dh-trust-strip__item::before {
  content: "✓ ";
  color: var(--dh-accent);
}

/* ——— Pagini produs: hero + conținut lat ——— */
.dh-page-hero {
  padding: clamp(2rem, 5vw, 3rem) 0 0;
  border-bottom: 1px solid var(--dh-border);
}

.dh-page-hero--split .dh-page-hero__grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 768px) {
  .dh-page-hero--split .dh-page-hero__grid {
    grid-template-columns: 1fr auto;
  }
}

.dh-page-hero__text .dh-page-title {
  margin: 0;
}

.dh-page-hero__media {
  max-width: 320px;
  margin-inline: auto;
  padding: 1rem;
  background: var(--dh-surface);
  border-radius: var(--dh-radius);
  border: 1px solid var(--dh-border);
}

.dh-page-hero__img {
  display: block;
  width: 100%;
  height: auto;
}

.dh-prose--wide {
  max-width: 52rem;
}

.dh-prose--wide h2 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
}

.dh-prose--wide p {
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ——— Pagină de eroare ——— */
.dh-error {
  position: relative;
  padding: clamp(4rem, 12vw, 7rem) 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, var(--dh-accent-dim), transparent),
    linear-gradient(180deg, var(--dh-bg) 0%, var(--dh-bg-elevated) 100%);
}

.dh-error__inner {
  max-width: 38rem;
}

/* ——— Focus vizibil pentru tastatură ——— */
:focus-visible {
  outline: 2px solid var(--dh-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ——— Link „skip to content” (accesibilitate) ——— */
.dh-skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.9rem;
  background: var(--dh-accent);
  color: #041208;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  z-index: 200;
  transition: top 0.2s;
}

.dh-skip-link:focus {
  top: 0.75rem;
}

/* ——— Reducere animații ——— */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ——— Blog ——— */
.dh-blog-list {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .dh-blog-list {
    grid-template-columns: 1fr 1fr;
  }
}

.dh-blog-card {
  background: var(--dh-bg-elevated);
  border: 1px solid var(--dh-border);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.25rem;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.dh-blog-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 177, 89, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.dh-blog-card__meta {
  font-size: 0.82rem;
  color: var(--dh-muted);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}

.dh-blog-card__cat {
  color: var(--dh-accent);
  font-weight: 600;
}

.dh-blog-card__title {
  font-size: 1.4rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.dh-blog-card__title a {
  color: var(--dh-text);
  text-decoration: none;
}

.dh-blog-card__title a:hover,
.dh-blog-card__title a:focus-visible {
  color: var(--dh-accent);
}

.dh-blog-card__summary {
  color: var(--dh-muted);
  margin: 0 0 0.9rem;
}

.dh-blog-card__more {
  color: var(--dh-accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
}

.dh-blog-card__more:hover,
.dh-blog-card__more:focus-visible {
  text-decoration: underline;
}
