/* ============================================================
   Tour Crescer — Elemento Temático
   CSS isolado ao .elemento-tematico e seus descendentes.
   As variáveis estão escopadas ao próprio elemento (não em :root)
   para não interferir com o restante do tema.
   ============================================================ */

.elemento-tematico {
    --tc-bg: #fff;
    --tc-text: #444;
    --tc-blue: #2e4e8f;
    --tc-red: #e52129;
    --tc-petala-bg: #ffffff;

    position: relative;
    width: min(100%, 800px);
    height: 650px;
    margin: 0 auto;
    font-family: "Poppins", sans-serif;
    color: var(--tc-text);
}

/* ── Núcleo central ───────────────────────────────────────── */

.elemento-tematico .core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    height: 240px;
    z-index: 5;
}

.elemento-tematico .core-photo {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: visible;
    position: relative;
    right: 10px;
    bottom: 10px;
    border: solid 10px #ffffff;
}

.elemento-tematico .core-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    overflow: hidden;
}

.elemento-tematico .core-overlay {
    position: absolute;
    bottom: 66px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    pointer-events: none;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    z-index: 6;
}

.elemento-tematico .core-overlay u {
    text-decoration: underline;
    position: relative;
    bottom: 35px;
}

.elemento-tematico .core-overlay span {
    color: var(--tc-red);
}

/* ── Pétala ───────────────────────────────────────────────── */

.elemento-tematico .petala {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.08));
}

.elemento-tematico .petala svg {
    width: 100%;
    height: 100%;
    display: block;
}

.elemento-tematico .petala-fill {
    fill: var(--tc-petala-bg);
}

/* ── Variantes de cor ─────────────────────────────────────── */

.elemento-tematico .card-blue { --accent: var(--tc-blue); }
.elemento-tematico .card-red  { --accent: var(--tc-red); }

/* ── Rotação base de cada pétala ─────────────────────────── */

.elemento-tematico .top-left     .petala { transform: rotate(180deg); }
.elemento-tematico .top-right    .petala { transform: rotate(248deg); }
.elemento-tematico .right-card   .petala { transform: rotate(315deg); }
.elemento-tematico .bottom-right .petala { transform: rotate(360deg); }
.elemento-tematico .bottom-left  .petala { transform: rotate(90deg);  }
.elemento-tematico .left-card    .petala { transform: rotate(132deg); }

/* ── Tooltip / descrição ─────────────────────────────────── */

.elemento-tematico .card-desc {
    position: absolute;
    background: var(--tc-petala-bg);
    box-shadow: 2px 2px 8px rgba(0,0,0,0.06);
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--tc-text);
    font-weight: 400;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
    transition: width 0.4s cubic-bezier(.4,.0,.2,1),
                height 0.4s cubic-bezier(.4,.0,.2,1),
                opacity 0.3s ease,
                padding 0.4s ease;
    padding: 0;
}

.elemento-tematico .card:hover .card-desc {
    opacity: 1;
    padding: 16px 22px;
}

.elemento-tematico .right-card .card-desc {
    top: 50%;
    left: 65%;
    width: 0;
    height: 130px;
    transform: translateY(-50%);
    border-radius: 0 65px 65px 0;
    text-align: left;
    justify-content: flex-end;
}

.elemento-tematico .right-card:hover .card-desc { width: 220px; }

.elemento-tematico .left-card .card-desc {
    top: 50%;
    right: 65%;
    width: 0;
    height: 130px;
    transform: translateY(-50%);
    border-radius: 65px 0 0 65px;
    text-align: right;
    justify-content: flex-start;
}

.elemento-tematico .left-card:hover .card-desc { width: 220px; }

.elemento-tematico .top-left .card-desc {
    bottom: 65%;
    right: 65%;
    width: 0;
    height: 0;
    border-radius: 70px 60px 60px 60px;
    text-align: right;
}

.elemento-tematico .top-left:hover .card-desc { width: 200px; height: 130px; }

.elemento-tematico .top-right .card-desc {
    bottom: 65%;
    left: 65%;
    width: 0;
    height: 0;
    border-radius: 60px 70px 60px 60px;
    text-align: left;
}

.elemento-tematico .top-right:hover .card-desc { width: 200px; height: 130px; }

.elemento-tematico .bottom-left .card-desc {
    top: 65%;
    right: 65%;
    width: 0;
    height: 0;
    border-radius: 60px 60px 60px 70px;
    text-align: right;
}

.elemento-tematico .bottom-left:hover .card-desc { width: 200px; height: 130px; }

.elemento-tematico .bottom-right .card-desc {
    top: 65%;
    left: 65%;
    width: 0;
    height: 0;
    border-radius: 60px 60px 70px 60px;
    text-align: left;
}

.elemento-tematico .bottom-right:hover .card-desc { width: 200px; height: 130px; }

/* ── Card ─────────────────────────────────────────────────── */

.elemento-tematico .card {
    position: absolute;
    width: 190px;
    height: 190px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: visible;
    z-index: 2;
    cursor: pointer;
    transform-origin: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.elemento-tematico .card .mask-element {
    position: absolute;
    top: 0;
    left: 0;
    width: 189px;
    height: 190px;
    display: block;
    border-radius: 100%;
    overflow: hidden;
}

.elemento-tematico .card span.mask-element::after {
    content: "";
    display: block;
    width: 170px;
    height: 70px;
    position: absolute;
    border-radius: 100%;
}

.elemento-tematico .left-card span.mask-element::after {
    background-color: var(--tc-blue);
    transform: rotate(86deg);
    right: -93px;
    top: 50px;
}

.elemento-tematico .right-card span.mask-element::after {
    background-color: var(--tc-blue);
    transform: rotate(86deg);
    left: -93px;
    top: 64px;
}

.elemento-tematico .bottom-left span.mask-element::after {
    background-color: var(--tc-red);
    transform: rotate(26deg);
    right: -27px;
    top: -15px;
}

.elemento-tematico .bottom-right span.mask-element::after {
    background-color: var(--tc-red);
    transform: rotate(321deg);
    right: 60px;
    top: -25px;
}

.elemento-tematico .top-right span.mask-element::after {
    background-color: var(--tc-blue);
    transform: rotate(26deg);
    right: 59px;
    bottom: -16px;
}

.elemento-tematico .top-left span.mask-element::after {
    background-color: var(--tc-blue);
    transform: rotate(324deg);
    right: -38px;
    bottom: -14px;
}

.elemento-tematico .card h2,
.elemento-tematico .card .icon-badge {
    position: relative;
    z-index: 99;
    transform-origin: center;
}

/* ── Icon badge ───────────────────────────────────────────── */

.elemento-tematico .icon-badge {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    z-index: 99;
}

.elemento-tematico .icon-badge img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* ── Ordem de layout por posição ──────────────────────────── */

.elemento-tematico .bottom-card .icon-badge { order: 0; margin-top: 40px; }
.elemento-tematico .top-card    .icon-badge { order: 1; }
.elemento-tematico .bottom-card h2          { order: 1; position: relative; top: 10px; }
.elemento-tematico .left-card   h2          { margin-bottom: 12px; }
.elemento-tematico .right-card  h2          { position: relative; top: 10px; }
.elemento-tematico .card        h2          { font-size: 14px; font-weight: 600; line-height: 1.25; }
.elemento-tematico .top-card    h2          { order: 0; margin-bottom: 14px; }

/* ── Posicionamento absoluto de cada card ─────────────────── */

.elemento-tematico .top-left     { left: 195px;  top: 70px !important; }
.elemento-tematico .top-right    { right: 212px; top: 58px !important; }
.elemento-tematico .left-card    { top: 243px;   left: 95px; }
.elemento-tematico .bottom-right { left: 422px;  bottom: 61px; }
.elemento-tematico .bottom-left  { left: 222px;  bottom: 59px !important; }
.elemento-tematico .right-card   { top: 219px;   right: 96px; }

/* ── Animações ────────────────────────────────────────────── */

@keyframes tc-card-entry {
    from { opacity: 0; transform: scale(0.55); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes tc-core-float {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50%       { transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes tc-badge-ring-pulse {
    0%, 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--accent); }
    50%       { box-shadow: 0 0 0 3px #fff, 0 0 0 12px var(--accent); }
}

@keyframes tc-photo-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Anel decorativo girando ao redor da foto central */
.elemento-tematico .core-photo::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(
        var(--tc-blue) 0deg,
        transparent 70deg,
        var(--tc-red) 180deg,
        transparent 250deg,
        var(--tc-blue) 360deg
    );
    animation: tc-photo-spin 8s linear infinite;
    z-index: -1;
    opacity: 0.4;
}

/* Entrada dos cards com stagger */
.elemento-tematico .card {
    animation: tc-card-entry 0.65s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.elemento-tematico > :nth-child(3) { animation-delay: 0.10s; }
.elemento-tematico > :nth-child(4) { animation-delay: 0.25s; }
.elemento-tematico > :nth-child(5) { animation-delay: 0.40s; }
.elemento-tematico > :nth-child(6) { animation-delay: 0.55s; }
.elemento-tematico > :nth-child(7) { animation-delay: 0.70s; }
.elemento-tematico > :nth-child(8) { animation-delay: 0.85s; }

/* Núcleo central flutuante */
.elemento-tematico .core {
    animation: tc-core-float 4s ease-in-out infinite;
}

/* Hover no card: leve escala */
.elemento-tematico .card:hover {
    transform: scale(1.06);
}

/* Pulso no ícone badge ao hover */
.elemento-tematico .card:hover .icon-badge {
    transform: scale(1.14);
    animation: tc-badge-ring-pulse 0.9s ease-in-out infinite;
}
