/* ============================================================
   Podstrona „Jak zarządzamy Twoją domeną?" (/diagram.php)
   Style przeniesione ze znacznika <style> do pliku — zasady
   bezpieczeństwa serwisu (CSP) nie dopuszczają stylów w treści.
   ============================================================ */
.cs-domain-diagram {
  --cs-navy: #0b285f;
  --cs-blue: #1264e8;
  --cs-blue-light: #eef6ff;
  --cs-border: #d9e5f5;
  --cs-red: #e32626;
  --cs-red-light: #fff5f5;
  --cs-green: #188b32;
  --cs-green-light: #f2fbf3;
  --cs-text: #172b4d;
  --cs-muted: #52627a;
  --cs-white: #ffffff;

  width: 100%;
  box-sizing: border-box;
  font-family: "Poppins", "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--cs-text);
  background: #fff;
  padding: 55px 20px 65px;
}

.cs-domain-diagram *,
.cs-domain-diagram *::before,
.cs-domain-diagram *::after {
  box-sizing: border-box;
}

.cs-diagram-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

/* ========================= HEADER ========================= */
.cs-diagram-header {
  text-align: center;
  margin-bottom: 42px;
}

.cs-diagram-header h2 {
  margin: 0;
  color: var(--cs-navy);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -1.4px;
}

.cs-diagram-header h2::after {
  content: "";
  display: block;
  width: 54px;
  height: 4px;
  margin: 17px auto 15px;
  background: var(--cs-blue);
  border-radius: 10px;
}

.cs-diagram-header p {
  margin: 0;
  color: var(--cs-muted);
  font-size: 17px;
  line-height: 1.6;
}

/* Na desktopie nagłówek unosi się nad kartą i falą Hero.
   Sam diagram pozostaje poniżej Hero, dzięki czemu nie zasłania animacji. */
@media (min-width: 761px) {
  .page-main-wide .cs-diagram-header {
    position: absolute;
    z-index: 3;
    top: -105px;
    left: 20px;
    right: 20px;
    margin: 0;
  }
}

/* ========================= MAIN REGISTRAR BOX ========================= */
.cs-registrar {
  border: 1px solid var(--cs-border);
  border-radius: 20px;
  background: var(--cs-white);
  box-shadow: 0 10px 35px rgba(17, 61, 112, 0.07);
  padding: 30px 28px 32px;
  position: relative;
}

.cs-registrar-title {
  text-align: center;
  color: var(--cs-blue);
  font-size: 25px;
  font-weight: 800;
  margin-bottom: 30px;
}

.cs-registrar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.cs-registrar-item {
  text-align: center;
  padding: 0 24px;
  min-height: 205px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cs-registrar-item + .cs-registrar-item {
  border-left: 1px solid var(--cs-border);
}

.cs-icon {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--cs-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--cs-blue);
  flex-shrink: 0;
}

.cs-icon svg {
  width: 34px;
  height: 34px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-registrar-item p {
  margin: 0;
  font-size: 16px;
  line-height: 1.65;
  font-weight: 600;
  color: var(--cs-navy);
}

.cs-registrar-item.red p {
  color: var(--cs-red);
}

/* ========================= ARROW DOWN ========================= */
.cs-main-arrow {
  width: 3px;
  height: 58px;
  background: var(--cs-blue);
  margin: 0 0 0 235px;
  position: relative;
}

.cs-main-arrow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 14px solid var(--cs-blue);
}

/* ========================= MIDDLE SECTION ========================= */
.cs-middle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: start;
  position: relative;
}

/* ========================= PARTNER ========================= */
.cs-partner {
  border: 1px solid #cfe0f7;
  border-radius: 20px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
  padding: 30px 30px 28px;
  box-shadow: 0 8px 28px rgba(17, 61, 112, 0.05);
}

.cs-box-title {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 22px;
}

.cs-box-title-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--cs-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cs-blue);
  flex-shrink: 0;
}

.cs-box-title-icon svg {
  width: 31px;
  height: 31px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-box-title h3 {
  margin: 0;
  color: var(--cs-blue);
  font-size: 22px;
  line-height: 1.3;
  font-weight: 800;
}

.cs-partner-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-partner-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px dashed #d7e3f3;
  font-size: 16px;
  line-height: 1.45;
  color: var(--cs-navy);
}

.cs-partner-list li:first-child {
  border-top: none;
}

.cs-list-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--cs-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--cs-blue);
}

.cs-list-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-partner-list li:first-child .cs-list-icon {
  color: var(--cs-red);
}

.cs-partner-list li:first-child strong {
  color: var(--cs-red);
}

.cs-partner-list strong {
  font-weight: 700;
}

/* ========================= RIGHT FLOW ========================= */
.cs-right-flow {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.cs-flow-text {
  text-align: center;
  max-width: 360px;
  color: var(--cs-navy);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: 18px;
}

.cs-flow-text strong {
  color: var(--cs-blue);
}

.cs-flow-arrow-up {
  width: 3px;
  height: 48px;
  background: var(--cs-blue);
  position: relative;
  margin-bottom: 18px;
}

.cs-flow-arrow-up::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -1px;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 14px solid var(--cs-blue);
}

.cs-cooperation {
  width: 100%;
  max-width: 365px;
  border: 1px solid var(--cs-blue);
  border-radius: 18px;
  background: #fff;
  padding: 24px 25px;
  text-align: center;
  box-shadow: 0 8px 25px rgba(18, 100, 232, 0.07);
  position: relative;
}

.cs-cooperation-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  color: var(--cs-blue);
}

.cs-cooperation-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-cooperation h3 {
  margin: 0 0 6px;
  color: var(--cs-blue);
  font-size: 21px;
  line-height: 1.35;
  font-weight: 800;
}

.cs-cooperation p {
  margin: 0;
  color: var(--cs-muted);
  font-size: 15px;
  line-height: 1.55;
}

.cs-flow-arrow-down {
  width: 3px;
  height: 58px;
  background: var(--cs-blue);
  position: relative;
  margin: 0 0 0;
}

.cs-flow-arrow-down::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 14px solid var(--cs-blue);
}

/* ========================= SUBSCRIBER ========================= */
.cs-subscriber {
  width: 100%;
  max-width: 490px;
  margin-top: 0;
  border: 1px solid #cfe8d3;
  border-radius: 20px;
  background: linear-gradient(180deg, #fcfffc 0%, #f4fbf5 100%);
  padding: 27px 30px;
  box-shadow: 0 8px 28px rgba(24, 139, 50, 0.05);
}

.cs-subscriber-title {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 16px;
}

.cs-subscriber-icon {
  width: 57px;
  height: 57px;
  border-radius: 50%;
  background: #edf9ef;
  color: var(--cs-green);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-subscriber-icon svg {
  width: 31px;
  height: 31px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-subscriber-title h3 {
  margin: 0;
  color: #176a29;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 800;
}

.cs-subscriber-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-subscriber-list li {
  position: relative;
  padding-left: 28px;
  margin: 10px 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--cs-text);
}

.cs-subscriber-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cs-green);
  font-weight: 800;
}

/* ========================= DEFINITIONS ========================= */
.cs-definitions {
  margin-top: 42px;
  border: 1px solid var(--cs-border);
  border-radius: 18px;
  background: #fff;
  padding: 24px 30px;
  box-shadow: 0 7px 25px rgba(17, 61, 112, 0.04);
}

.cs-definition {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 17px;
  align-items: start;
  padding: 10px 0;
}

.cs-definition-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--cs-blue-light);
  color: var(--cs-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-definition-icon.green {
  background: #edf9ef;
  color: var(--cs-green);
}

.cs-definition-icon svg {
  width: 25px;
  height: 25px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-definition p {
  margin: 3px 0 0;
  color: var(--cs-navy);
  font-size: 15px;
  line-height: 1.65;
}

.cs-definition strong {
  font-weight: 800;
  color: var(--cs-blue);
}

.cs-definition.green strong {
  color: #176a29;
}

/* ========================= RED INFO BOX ========================= */
.cs-important {
  margin-top: 17px;
  border: 1px solid #ff4a4a;
  border-radius: 17px;
  background: var(--cs-red-light);
  padding: 19px 25px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.cs-important-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--cs-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cs-important-icon svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cs-important-content {
  color: var(--cs-red);
}

.cs-important-content strong {
  display: block;
  font-size: 17px;
  line-height: 1.4;
  margin-bottom: 3px;
}

.cs-important-content span {
  display: block;
  font-size: 15px;
  line-height: 1.55;
}

/* ========================= RESPONSIVE ========================= */
@media (max-width: 1000px) {
  .cs-registrar-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 25px;
  }

  .cs-registrar-item {
    min-height: auto;
    padding: 15px 20px;
  }

  .cs-registrar-item:nth-child(3),
  .cs-registrar-item:nth-child(5) {
    border-left: none;
  }

  .cs-registrar-item:nth-child(2),
  .cs-registrar-item:nth-child(4) {
    border-left: 1px solid var(--cs-border);
  }

  .cs-registrar-item:last-child {
    grid-column: 1 / -1;
  }

  .cs-main-arrow {
    margin-left: 12%;
  }

  .cs-middle {
    gap: 35px;
  }
}

@media (max-width: 760px) {
  .cs-domain-diagram {
    padding: 38px 14px 45px;
  }

  .cs-diagram-header {
    margin-bottom: 28px;
  }

  .cs-diagram-header h2 {
    font-size: 30px;
    letter-spacing: -0.7px;
  }

  .cs-diagram-header p {
    font-size: 15px;
  }

  .cs-registrar {
    padding: 24px 18px;
    border-radius: 16px;
  }

  .cs-registrar-title {
    font-size: 21px;
  }

  .cs-registrar-grid {
    grid-template-columns: 1fr;
  }

  .cs-registrar-item,
  .cs-registrar-item:last-child {
    grid-column: auto;
    border-left: none !important;
    border-top: 1px solid var(--cs-border);
    padding: 23px 15px;
  }

  .cs-registrar-item:first-child {
    border-top: none;
  }

  .cs-registrar-item p {
    max-width: 310px;
  }

  .cs-main-arrow {
    margin: 0 auto;
    height: 40px;
  }

  .cs-middle {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .cs-partner {
    padding: 24px 18px;
  }

  .cs-box-title h3 {
    font-size: 20px;
  }

  .cs-right-flow {
    padding-top: 0;
  }

  .cs-flow-text {
    order: 1;
  }

  .cs-flow-arrow-up {
    display: none;
  }

  .cs-cooperation {
    order: 2;
  }

  .cs-flow-arrow-down {
    order: 3;
    height: 40px;
  }

  .cs-subscriber {
    order: 4;
    max-width: none;
    padding: 23px 20px;
  }

  .cs-definitions {
    margin-top: 30px;
    padding: 18px;
  }

  .cs-definition {
    grid-template-columns: 45px 1fr;
    gap: 12px;
  }

  .cs-definition-icon {
    width: 42px;
    height: 42px;
  }

  .cs-definition p {
    font-size: 14px;
  }

  .cs-important {
    align-items: flex-start;
    padding: 18px;
  }

  .cs-important-icon {
    width: 46px;
    height: 46px;
  }

  .cs-important-content strong {
    font-size: 15px;
  }

  .cs-important-content span {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .cs-diagram-header h2 {
    font-size: 27px;
  }

  .cs-registrar-title {
    font-size: 19px;
  }

  .cs-icon {
    width: 58px;
    height: 58px;
  }

  .cs-registrar-item p {
    font-size: 15px;
  }

  .cs-partner-list li {
    font-size: 14px;
  }

  .cs-important {
    gap: 12px;
  }
}
