/**
 * Reportei MCP - Frontend Styles
 * Mesmo design system do reportei.com / plugin reportei-integracoes.
 * Prefixo das classes: rmcp-
 */

.rmcp-wrapper {
    width: 100%;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #212B30;
    background: #F9FAFB;
}

.rmcp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Hero Section
   ======================================== */

.rmcp-hero {
    background: linear-gradient(135deg, #1A3A6E 0%, #2F64E0 100%);
    padding: 64px 0;
    overflow: hidden;
}

.rmcp-hero__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.rmcp-hero__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rmcp-hero__title {
    font-family: "Quicksand", sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.2;
}

.rmcp-hero__subtitle {
    font-family: "Quicksand", sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    line-height: 1.4;
}

.rmcp-hero__description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    line-height: 1.6;
}

.rmcp-hero__cta {
    margin-top: 8px;
}

.rmcp-wrapper .rmcp-hero__button,
.rmcp-wrapper a.rmcp-hero__button {
    display: inline-block;
    font-size: 16px;
    font-weight: 500;
    padding: 12px 20px;
    background: #22C55E;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.rmcp-wrapper .rmcp-hero__button:hover,
.rmcp-wrapper a.rmcp-hero__button:hover {
    background: #16A34A;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
    color: #ffffff;
    text-decoration: none;
}

/* Leque de 3 cards no lado direito do hero */
.rmcp-hero__fan {
    position: relative;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rmcp-hero__fan-card {
    position: absolute;
    width: 280px;
    min-height: 240px;
    padding: 24px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #212B30;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    transform-origin: bottom center;
    will-change: transform;
}

.rmcp-hero__fan-card--left {
    transform: translateX(-110px) rotate(-12deg);
    z-index: 1;
}

.rmcp-hero__fan-card--center {
    transform: translateY(-12px);
    z-index: 3;
}

.rmcp-hero__fan-card--right {
    transform: translateX(110px) rotate(12deg);
    z-index: 2;
}

/* Ao passar o mouse no leque, abre mais (efeito de "espalhar cartas") */
.rmcp-hero__fan:hover .rmcp-hero__fan-card--left {
    transform: translateX(-150px) rotate(-16deg) translateY(-8px);
}
.rmcp-hero__fan:hover .rmcp-hero__fan-card--right {
    transform: translateX(150px) rotate(16deg) translateY(-8px);
}
.rmcp-hero__fan:hover .rmcp-hero__fan-card--center {
    transform: translateY(-20px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Hover individual do card destaca o card no topo */
.rmcp-hero__fan-card:hover {
    z-index: 4;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.18);
}

.rmcp-hero__fan-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.rmcp-hero__fan-card-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EBF1FE 0%, #D9E5FC 100%);
    color: #2F64E0;
    border-radius: 12px;
}

.rmcp-hero__fan-card-count {
    font-family: "Inter", sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: #2F64E0;
    background: #EBF1FE;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

.rmcp-hero__fan-card-title {
    font-family: "Quicksand", sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #212B30;
    margin: 0 0 8px;
    line-height: 1.3;
}

.rmcp-hero__fan-card-description {
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #5C6975;
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   Grid de integrações MCP
   ======================================== */

.rmcp-grid-section {
    padding: 64px 0;
    background: #F9FAFB;
}

.rmcp-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 32px;
    padding: 0 20px;
}

.rmcp-wrapper .rmcp-filter-pill,
.rmcp-wrapper button.rmcp-filter-pill {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 500;
    padding: 8px 20px;
    border: 1px solid #E8ECF0;
    border-radius: 12px;
    background: #fff;
    color: #455A64;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
    outline: none;
}

.rmcp-wrapper .rmcp-filter-pill:hover,
.rmcp-wrapper button.rmcp-filter-pill:hover {
    border-color: #2F64E0;
    color: #2F64E0;
    background: #fff;
}

.rmcp-wrapper .rmcp-filter-pill:focus-visible {
    border-color: #2F64E0;
    box-shadow: 0 0 0 2px rgba(47, 100, 224, 0.25);
}

.rmcp-wrapper .rmcp-filter-pill.active,
.rmcp-wrapper button.rmcp-filter-pill.active {
    background: #2F64E0;
    color: #fff;
    border-color: #2F64E0;
}

.rmcp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rmcp-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 24px;
    background: #ffffff;
    border: none;
    border-radius: 24px;
    box-shadow: 0px 1px 2px 0px rgba(0, 68, 157, 0.04), 0px 2px 6px 0px rgba(0, 68, 157, 0.06);
    text-decoration: none;
    color: #212B30;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rmcp-card:hover {
    box-shadow: 0px 2px 4px 0px rgba(0, 68, 157, 0.08), 0px 4px 12px 0px rgba(0, 68, 157, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: #212B30;
}

.rmcp-card:focus-visible {
    box-shadow: 0px 1px 2px 0px rgba(0, 68, 157, 0.04), 0px 2px 6px 0px rgba(0, 68, 157, 0.06), 0 0 0 2px rgba(47, 100, 224, 0.25);
    outline: none;
}

.rmcp-card__icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ECF0F1;
    border-radius: 50%;
}

.rmcp-card__icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

.rmcp-card__content {
    margin-top: 12px;
    width: 100%;
    flex: 1;
}

.rmcp-card__title {
    font-family: "Quicksand", sans-serif;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: #1876F2;
    margin: 0 0 4px;
    line-height: 1.3;
}

.rmcp-card__description {
    font-family: "Inter", sans-serif;
    font-size: 18px;
    font-weight: 500;
    color: #78909C;
    line-height: 1.4;
    margin: 0;
}

.rmcp-card__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #13bd49;
    transition: gap 0.2s ease;
}

.rmcp-card__cta-text {
    display: inline;
}

.rmcp-card__cta svg {
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.rmcp-card:hover .rmcp-card__cta svg {
    transform: translateX(4px);
}

.rmcp-empty {
    text-align: center;
    font-family: "Inter", sans-serif;
    font-size: 16px;
    color: #78909C;
    padding: 48px 20px;
}

/* ========================================
   Documentação
   ======================================== */

.rmcp-docs {
    padding: 64px 0;
    background: #ffffff;
    border-top: 1px solid #E2E7EE;
}

.rmcp-docs__header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 48px;
}

.rmcp-docs__title {
    font-family: "Quicksand", sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #212B30;
    margin: 0 0 16px;
}

.rmcp-docs__description {
    font-size: 16px;
    color: #5C6975;
    line-height: 1.6;
    margin: 0 0 24px;
}

.rmcp-wrapper .rmcp-docs__button,
.rmcp-wrapper a.rmcp-docs__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    background: #2F64E0;
    color: #ffffff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(47, 100, 224, 0.25);
}

.rmcp-wrapper .rmcp-docs__button:hover,
.rmcp-wrapper a.rmcp-docs__button:hover {
    background: #1E47B0;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(47, 100, 224, 0.35);
    color: #ffffff;
    text-decoration: none;
}

.rmcp-docs__footer {
    text-align: center;
    margin-top: 48px;
}

/* Cards de grupo (8 categorias de ferramentas) */
.rmcp-groups {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.rmcp-wrapper .rmcp-group-card,
.rmcp-wrapper a.rmcp-group-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #E8ECF0;
    border-radius: 20px;
    text-decoration: none;
    color: #212B30;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rmcp-wrapper .rmcp-group-card:hover {
    border-color: #2F64E0;
    box-shadow: 0px 2px 4px 0px rgba(0, 68, 157, 0.08), 0px 8px 24px 0px rgba(0, 68, 157, 0.10);
    transform: translateY(-2px);
    text-decoration: none;
    color: #212B30;
}

.rmcp-group-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.rmcp-group-card__icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #EBF1FE 0%, #D9E5FC 100%);
    color: #2F64E0;
    border-radius: 12px;
}

.rmcp-group-card__count {
    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #2F64E0;
    background: #EBF1FE;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: lowercase;
    letter-spacing: 0.02em;
}

.rmcp-group-card__title {
    font-family: "Quicksand", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #212B30;
    margin: 0 0 8px;
    line-height: 1.3;
}

.rmcp-group-card__description {
    font-family: "Inter", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #5C6975;
    line-height: 1.5;
    margin: 0 0 16px;
    flex: 1;
}

.rmcp-group-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: "Inter", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #2F64E0;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.rmcp-group-card__cta svg {
    transition: transform 0.2s ease;
}

.rmcp-group-card:hover .rmcp-group-card__cta svg {
    transform: translateX(4px);
}

/* ========================================
   Responsivo
   ======================================== */

/* Tablet landscape */
@media (max-width: 1024px) {
    .rmcp-hero {
        padding: 48px 0;
    }

    .rmcp-hero__inner {
        gap: 32px;
    }

    .rmcp-hero__title {
        font-size: 34px;
    }

    .rmcp-hero__subtitle {
        font-size: 20px;
    }

    .rmcp-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .rmcp-groups {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet portrait */
@media (max-width: 900px) {
    .rmcp-hero__inner {
        grid-template-columns: 1fr;
        gap: 32px;
        text-align: center;
    }

    .rmcp-hero__content {
        align-items: center;
    }

    .rmcp-hero__title {
        font-size: 30px;
    }

    .rmcp-hero__subtitle {
        font-size: 18px;
    }

    .rmcp-hero__description {
        font-size: 16px;
    }

    /* Mobile/tablet: empilha o leque verticalmente em vez de sobrepor cards. */
    .rmcp-hero__fan {
        height: auto;
        flex-direction: column;
        gap: 16px;
        align-items: center;
        padding: 16px 0;
    }

    .rmcp-hero__fan-card,
    .rmcp-hero__fan-card--left,
    .rmcp-hero__fan-card--center,
    .rmcp-hero__fan-card--right {
        position: relative;
        transform: none;
        width: 100%;
        max-width: 320px;
        min-height: 0;
    }

    .rmcp-hero__fan:hover .rmcp-hero__fan-card--left,
    .rmcp-hero__fan:hover .rmcp-hero__fan-card--center,
    .rmcp-hero__fan:hover .rmcp-hero__fan-card--right {
        transform: none;
    }

    .rmcp-filters {
        gap: 6px;
    }
}

/* Mobile */
@media (max-width: 640px) {
    .rmcp-hero {
        padding: 32px 0;
    }

    .rmcp-hero__title {
        font-size: 26px;
    }

    .rmcp-hero__subtitle {
        font-size: 16px;
    }

    .rmcp-hero__description {
        font-size: 14px;
    }

    .rmcp-grid-section,
    .rmcp-docs {
        padding: 40px 0;
    }

    .rmcp-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        justify-items: center;
    }

    .rmcp-card {
        padding: 20px;
        width: 100%;
        max-width: 320px;
    }

    .rmcp-card__title {
        font-size: 16px !important;
    }

    .rmcp-card__description {
        font-size: 14px;
    }

    .rmcp-docs__title {
        font-size: 26px;
    }

    .rmcp-groups {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .rmcp-wrapper .rmcp-filter-pill,
    .rmcp-wrapper button.rmcp-filter-pill {
        font-size: 16px;
        padding: 6px 16px;
    }
}
