/* ==============================================================
   home-dr-map.css — Seção Backup & Disaster Recovery (mapa-múndi)
   Escopo: .dr-map
   ============================================================== */

.dr-map {
    position: relative;
    padding: 110px 0 120px;
    color: #ffffff;
    background:
        radial-gradient(1000px 500px at 10% 20%, rgba(45, 182, 222, 0.18), transparent 60%),
        radial-gradient(800px 500px at 95% 90%, rgba(31, 111, 170, 0.25), transparent 60%),
        linear-gradient(160deg, #0B1F2A 0%, #0A3A68 55%, #1F6FAA 100%);
    overflow: hidden;
    isolation: isolate;
}

/* Grid decorativo tipo tech */
.dr-map::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(125, 211, 239, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125, 211, 239, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 90%);
    pointer-events: none;
    z-index: 0;
}

.dr-map > .container { position: relative; z-index: 1; }

/* --------------------------------------------------------------
   Header
   -------------------------------------------------------------- */
.dr-map__header {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 56px;
}

.dr-map__title {
    font-size: clamp(1.85rem, 1.1rem + 1.6vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: #ffffff;
}

.dr-map__title .accent {
    background: linear-gradient(90deg, #7DD3EF 0%, #2DB6DE 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.dr-map__subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.6;
    margin: 0;
}

/* --------------------------------------------------------------
   Mapa-múndi SVG
   -------------------------------------------------------------- */
.dr-map__world {
    position: relative;
    max-width: 1100px;
    margin: 0 auto 56px;
    aspect-ratio: 2220 / 1425;
}

.dr-map__world-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.45;
    pointer-events: none;
}

.dr-map__svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 2;
}

/* Marcadores de país — pulse animation */
.dr-pin {
    cursor: default;
}

.dr-pin__ring {
    fill: none;
    stroke: #2DB6DE;
    stroke-width: 7;
    transform-origin: center;
    transform-box: fill-box;
    animation: dr-pulse 2.4s ease-out infinite;
}

.dr-pin--primary .dr-pin__ring {
    stroke: #FFD84D;
    animation-duration: 1.8s;
}

.dr-pin__dot {
    fill: #2DB6DE;
    stroke: #ffffff;
    stroke-width: 7;
    filter: drop-shadow(0 0 20px rgba(45, 182, 222, 0.9));
}

.dr-pin--primary .dr-pin__dot {
    fill: #FFD84D;
    filter: drop-shadow(0 0 32px rgba(255, 216, 77, 0.9));
}

@keyframes dr-pulse {
    0%   { r: 28; opacity: 1; }
    80%  { r: 78; opacity: 0; }
    100% { r: 78; opacity: 0; }
}

/* Labels flutuantes sobre o mapa */
.dr-map__labels {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.dr-label {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #ffffff;
    background: rgba(10, 58, 104, 0.88);
    border: 1px solid rgba(125, 211, 239, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    transform: translate(-50%, -50%);
}

.dr-label--primary {
    background: linear-gradient(135deg, #FFD84D 0%, #E8A726 100%);
    color: #2A1D00;
    border-color: #FFF1B0;
    box-shadow: 0 8px 20px -6px rgba(255, 184, 28, 0.55);
}

.dr-label__flag {
    display: inline-block;
    width: 24px;
    height: auto;
    border-radius: 3px;
    vertical-align: middle;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
}

.dr-label__tag {
    display: inline-block;
    padding: 2px 7px;
    margin-left: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dr-label--primary .dr-label__tag {
    background: rgba(42, 29, 0, 0.2);
    color: #2A1D00;
}

/* Ícones de serviço dentro do label (Backup / Data Center) */
.dr-label__icons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    padding-left: 9px;
    border-left: 1px solid rgba(125, 211, 239, 0.35);
}

.dr-label__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.dr-label__icon--server {
    color: #7DD3EF;
    filter: drop-shadow(0 0 4px rgba(125, 211, 239, 0.55));
}

.dr-label__icon--backup {
    color: #FFD84D;
    filter: drop-shadow(0 0 4px rgba(255, 216, 77, 0.55));
}

/* --------------------------------------------------------------
   Timeline do fluxo (cards abaixo do mapa)
   -------------------------------------------------------------- */
.dr-map__flow {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.dr-step {
    position: relative;
    padding: 28px 28px 26px;
    border-radius: 18px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(125, 211, 239, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s ease,
                background 0.35s ease,
                box-shadow 0.35s ease;
    overflow: hidden;
    isolation: isolate;
}

/* Número de passo — badge premium circular com gradient sólido */
.dr-step__number {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #ffffff;
    background: radial-gradient(circle at 30% 25%, #7DD3EF 0%, #2DB6DE 45%, #1F6FAA 100%);
    margin-bottom: 20px;
    font-family: var(--title-font);
    box-shadow:
        0 0 0 4px rgba(45, 182, 222, 0.12),
        0 8px 24px -6px rgba(45, 182, 222, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        inset 0 -2px 6px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s ease;
}

.dr-step:hover .dr-step__number {
    transform: scale(1.08) rotate(-3deg);
    box-shadow:
        0 0 0 6px rgba(45, 182, 222, 0.18),
        0 12px 28px -6px rgba(45, 182, 222, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        inset 0 -2px 6px rgba(0, 0, 0, 0.2);
}

/* Variante dourada (Etapa 2 — primary) */
.dr-step--primary .dr-step__number {
    color: #3D2800;
    background: radial-gradient(circle at 30% 25%, #FFF1B0 0%, #FFD84D 45%, #E8A726 100%);
    box-shadow:
        0 0 0 4px rgba(255, 216, 77, 0.18),
        0 8px 24px -6px rgba(255, 184, 28, 0.65),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 -2px 6px rgba(138, 86, 0, 0.3);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

.dr-step--primary:hover .dr-step__number {
    box-shadow:
        0 0 0 6px rgba(255, 216, 77, 0.25),
        0 12px 28px -6px rgba(255, 184, 28, 0.85),
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        inset 0 -2px 6px rgba(138, 86, 0, 0.3);
}

/* Conector entre cards (só desktop, exceto no último) */
.dr-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -28px;
    width: 28px;
    height: 1px;
    background: linear-gradient(90deg, rgba(125, 211, 239, 0.6), rgba(125, 211, 239, 0));
    z-index: 3;
}

/* Ponta triangular do conector */
.dr-step:not(:last-child)::before {
    content: "";
    position: absolute;
    top: calc(50% - 4px);
    right: -6px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid rgba(125, 211, 239, 0.5);
    z-index: 3;
}

.dr-step:hover {
    transform: translateY(-6px);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-color: rgba(125, 211, 239, 0.45);
    box-shadow: 0 24px 44px -20px rgba(0, 0, 0, 0.55);
}

/* Card primário (Etapa 2) — destaque dourado */
.dr-step--primary {
    background: linear-gradient(150deg, rgba(255, 216, 77, 0.1) 0%, rgba(255, 216, 77, 0.015) 100%);
    border-color: rgba(255, 216, 77, 0.4);
    box-shadow: 0 0 60px -20px rgba(255, 216, 77, 0.25);
}

.dr-step--primary:hover {
    border-color: rgba(255, 216, 77, 0.65);
    box-shadow: 0 24px 44px -18px rgba(255, 184, 28, 0.35),
                0 0 60px -20px rgba(255, 216, 77, 0.4);
}

/* Badge com ícone de relógio */
.dr-step__badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: rgba(45, 182, 222, 0.18);
    color: #7DD3EF;
    border: 1px solid rgba(125, 211, 239, 0.4);
    margin-bottom: 16px;
}

.dr-step__badge i {
    font-size: 12px;
    line-height: 1;
}

.dr-step--primary .dr-step__badge {
    background: rgba(255, 216, 77, 0.2);
    color: #FFE98A;
    border-color: rgba(255, 216, 77, 0.55);
    box-shadow: 0 0 14px -2px rgba(255, 216, 77, 0.4);
}

.dr-step__title {
    position: relative;
    z-index: 1;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
    letter-spacing: -0.015em;
    line-height: 1.3;
}

.dr-step__desc {
    position: relative;
    z-index: 1;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 18px;
}

.dr-step__flags {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dr-flag-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.dr-flag-chip__img {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.dr-flag-chip:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.dr-flag-chip--primary {
    background: rgba(255, 216, 77, 0.22);
    border-color: rgba(255, 216, 77, 0.55);
    color: #FFE98A;
    box-shadow: 0 0 12px -2px rgba(255, 216, 77, 0.35);
}

.dr-flag-chip--primary:hover {
    background: rgba(255, 216, 77, 0.3);
    border-color: rgba(255, 216, 77, 0.75);
}

/* --------------------------------------------------------------
   Legenda: Backup / Servidor (abaixo do mapa)
   -------------------------------------------------------------- */
.dr-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.dr-legend__group {
    padding: 26px 28px;
    border-radius: 16px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(125, 211, 239, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}

.dr-legend__group:hover {
    transform: translateY(-4px);
    border-color: rgba(125, 211, 239, 0.45);
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.025) 100%);
}

.dr-legend__title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #ffffff;
    margin: 0 0 18px;
    padding-left: 14px;
}

.dr-legend__title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: 2px;
    background: linear-gradient(180deg, #7DD3EF 0%, #2DB6DE 100%);
    box-shadow: 0 0 12px rgba(125, 211, 239, 0.6);
}

.dr-legend__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.dr-legend__group--backup .dr-legend__icon {
    color: #FFD84D;
    filter: drop-shadow(0 0 6px rgba(255, 216, 77, 0.5));
}

.dr-legend__group--backup .dr-legend__title::before {
    background: linear-gradient(180deg, #FFE98A 0%, #FFD84D 100%);
    box-shadow: 0 0 12px rgba(255, 216, 77, 0.6);
}

.dr-legend__group--server .dr-legend__icon {
    color: #7DD3EF;
    filter: drop-shadow(0 0 6px rgba(125, 211, 239, 0.5));
}

.dr-legend__flags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* --------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .dr-map { padding: 80px 0 90px; }
    .dr-label { font-size: 13px; padding: 6px 12px; gap: 6px; }
    .dr-label__flag { width: 20px; }
    .dr-label__icon { width: 15px; height: 15px; }
    .dr-label__icons { padding-left: 7px; gap: 5px; }
    .dr-legend { grid-template-columns: 1fr; gap: 16px; }
}

@media (max-width: 639.98px) {
    .dr-map { padding: 60px 0 70px; }
    .dr-map__header { margin-bottom: 40px; }
    .dr-map__world { margin-bottom: 36px; }
    .dr-label { font-size: 11px; padding: 4px 9px; gap: 5px; }
    .dr-label__flag { width: 16px; }
    .dr-label__icon { width: 13px; height: 13px; }
    .dr-label__tag { display: none; }
    .dr-legend__group { padding: 22px 22px; }
    .dr-legend__title { font-size: 1rem; margin-bottom: 14px; }
}
