{"version":3,"file":"BlogCard.iVms06h7.mjs","names":["useState","_Fragment"],"sources":["https:/framerusercontent.com/modules/h1blU5zYDwumIb9sd19z/mbUPeZAKinm7AkgeKSFY/BlogCard.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from\"react/jsx-runtime\";import{addPropertyControls,ControlType,Link}from\"framer\";import{useState}from\"react\";// Brand tokens (base.css)\nconst FOAM=\"#f8ffff\";const TURQ100=\"#d5f3f8\";const TURQ700=\"rgb(26, 125, 150)\";const NOITE=\"rgb(75, 5, 96)\";const OCRE=\"rgb(255, 178, 66)\";const MUTED=\"rgb(116, 107, 145)\";const MONO='\"JetBrains Mono\", ui-monospace, monospace';const HEAD='\"Montserrat Alternates\", sans-serif';const srcOf=i=>typeof i===\"string\"?i:i?.src;const srcSetOf=i=>typeof i===\"string\"?undefined:i?.srcSet;/**\n * BlogCard — diário de bordo card.\n * Real flexbox: photo on top, content below, CTA pinned to the bottom\n * (margin-top:auto) so cards line up. Title (2 lines) and excerpt (3 lines) are\n * clamped to fixed line counts so every card has the same height in a row/grid,\n * regardless of copy length. Tags accept comma-separated strings (CMS \"Tags\")\n * and are split into one pill each.\n *\n * CTA e links aninhados — 2026-08-06\n * Usado como template de lista de CMS, o item da lista JÁ é o link do post. Se o\n * CTA também virasse <a>, o HTML ficaria com link dentro de link — inválido, e o\n * Framer acusa \"optimization issues\" no publish (era o erro na Home). Como a\n * prop `link` costuma vir vinculada ao CMS e não dá para limpar pelo XML, o CTA\n * agora é <span> POR PADRÃO. Só vira link de verdade se `ctaComoLink` for\n * ligado explicitamente — o que só faz sentido quando o card NÃO está dentro de\n * um item de lista clicável.\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function BlogCard(props){const{image,imageUrl=\"\",imageHeight=200,phTag=\"texto e foto ilustrativos\",tag1=\"\",tag2=\"\",tag3=\"\",title=\"T\\xedtulo do conte\\xfado\",excerpt=\"\",linkLabel=\"Ler conte\\xfado\",link,ctaComoLink=false}=props;const imgSrc=image&&srcOf(image)||imageUrl||undefined;const imgSrcSet=image?srcSetOf(image):undefined;const tags=[tag1,tag2,tag3].flatMap(t=>String(t??\"\").split(\",\")).map(t=>t.trim()).filter(t=>t.length>0);const href=typeof link===\"string\"?link:undefined;const hasHref=typeof href===\"string\"&&href.length>0;// Só emite <a> quando explicitamente pedido — ver nota sobre links aninhados.\nconst renderComoLink=ctaComoLink&&hasHref;const isInternal=renderComoLink&&href.startsWith(\"/\");const[hover,setHover]=useState(false);const[linkHover,setLinkHover]=useState(false);// Clamp helper: reserve N lines and cut overflow with an ellipsis so all\n// cards share the same height regardless of copy length.\nconst clamp=(lines,lineHeight)=>({display:\"-webkit-box\",WebkitLineClamp:lines,WebkitBoxOrient:\"vertical\",overflow:\"hidden\",minHeight:`${(lines*lineHeight).toFixed(2)}em`});const ctaStyle={display:\"inline-flex\",alignItems:\"center\",gap:linkHover?11:7,width:\"100%\",borderTop:`1.5px solid ${OCRE}`,paddingTop:16,fontFamily:MONO,fontSize:13,fontWeight:700,letterSpacing:\"0.08em\",textTransform:\"uppercase\",color:renderComoLink&&linkHover?TURQ700:NOITE,textDecoration:\"none\",transition:\"gap 0.2s ease, color 0.2s ease\"};const ctaContent=/*#__PURE__*/_jsxs(_Fragment,{children:[linkLabel,/*#__PURE__*/_jsx(\"span\",{\"aria-hidden\":\"true\",children:\"→\"})]});const cta=!renderComoLink?/*#__PURE__*/_jsx(\"span\",{style:ctaStyle,children:ctaContent}):isInternal?/*#__PURE__*/_jsx(Link,{href:href,children:/*#__PURE__*/_jsx(\"a\",{style:ctaStyle,onMouseEnter:()=>setLinkHover(true),onMouseLeave:()=>setLinkHover(false),children:ctaContent})}):/*#__PURE__*/_jsx(\"a\",{href:href,onMouseEnter:()=>setLinkHover(true),onMouseLeave:()=>setLinkHover(false),style:ctaStyle,children:ctaContent});return /*#__PURE__*/_jsxs(\"div\",{onMouseEnter:()=>setHover(true),onMouseLeave:()=>setHover(false),style:{display:\"flex\",flexDirection:\"column\",width:\"100%\",height:\"100%\",background:FOAM,border:`1.5px solid ${TURQ100}`,borderRadius:18,overflow:\"hidden\",transform:hover?\"translateY(-2px)\":\"translateY(0px)\",boxShadow:hover?\"0px 20px 44px -20px rgba(33, 158, 188, 0.2)\":\"0px 0px 0px rgba(0, 0, 0, 0)\",transition:\"transform 0.25s ease, box-shadow 0.25s ease\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:imageHeight,flex:\"none\",overflow:\"hidden\"},children:[imgSrc&&/*#__PURE__*/_jsx(\"img\",{src:imgSrc,srcSet:imgSrcSet,alt:\"\",style:{position:\"absolute\",inset:0,width:\"100%\",height:\"100%\",objectFit:\"cover\",display:\"block\"}}),phTag&&String(phTag).trim()&&/*#__PURE__*/_jsx(\"span\",{style:{position:\"absolute\",top:12,right:12,fontFamily:MONO,fontSize:9,fontWeight:700,letterSpacing:\"0.1em\",textTransform:\"uppercase\",color:NOITE,background:\"rgba(255, 178, 66, 0.94)\",padding:\"5px 11px\",borderRadius:999,boxShadow:\"0 4px 12px -4px rgba(0, 0, 0, 0.35)\",pointerEvents:\"none\",whiteSpace:\"nowrap\"},children:phTag})]}),/*#__PURE__*/_jsxs(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",gap:14,padding:24},children:[tags.length>0&&/*#__PURE__*/_jsx(\"div\",{style:{display:\"flex\",flexWrap:\"wrap\",gap:6},children:tags.map((t,i)=>/*#__PURE__*/_jsx(\"span\",{style:{fontFamily:MONO,fontSize:10,fontWeight:500,letterSpacing:\"0.12em\",textTransform:\"uppercase\",color:TURQ700,border:`1px solid ${TURQ100}`,borderRadius:999,padding:\"4px 12px\"},children:t},i))}),/*#__PURE__*/_jsx(\"h3\",{style:{margin:0,fontFamily:HEAD,fontWeight:700,fontSize:16,lineHeight:1.3,letterSpacing:\"-0.01em\",color:NOITE,...clamp(2,1.3)},children:title}),/*#__PURE__*/_jsx(\"p\",{style:{margin:0,fontFamily:MONO,fontWeight:300,fontSize:13,lineHeight:1.6,letterSpacing:\"-0.02em\",color:MUTED,...clamp(3,1.6)},children:excerpt}),/*#__PURE__*/_jsx(\"div\",{style:{marginTop:\"auto\",width:\"100%\",display:\"flex\"},children:cta})]})]});}BlogCard.defaultProps={width:360,height:400};addPropertyControls(BlogCard,{image:{type:ControlType.ResponsiveImage,title:\"Foto\"},imageUrl:{type:ControlType.String,title:\"Foto (URL)\",defaultValue:\"\",placeholder:\"https://…\",hidden:p=>!!p.image},imageHeight:{type:ControlType.Number,title:\"Altura foto\",defaultValue:200,min:80,max:400,unit:\"px\"},phTag:{type:ControlType.String,title:\"Selo\",defaultValue:\"texto e foto ilustrativos\"},tag1:{type:ControlType.String,title:\"Tag 1\",defaultValue:\"\"},tag2:{type:ControlType.String,title:\"Tag 2\",defaultValue:\"\"},tag3:{type:ControlType.String,title:\"Tag 3\",defaultValue:\"\"},title:{type:ControlType.String,title:\"T\\xedtulo\",defaultValue:\"T\\xedtulo do conte\\xfado\",displayTextArea:true},excerpt:{type:ControlType.String,title:\"Excerpt\",defaultValue:\"\",displayTextArea:true},linkLabel:{type:ControlType.String,title:\"Link label\",defaultValue:\"Ler conte\\xfado\"},link:{type:ControlType.Link,title:\"Link\"},ctaComoLink:{type:ControlType.Boolean,title:\"CTA \\xe9 link\",defaultValue:false,enabledTitle:\"Sim\",disabledTitle:\"N\\xe3o\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"BlogCard\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./BlogCard.map"],"mappings":"+LAoBG,SAAwB,EAAS,EAAM,CAAC,GAAK,CAAC,QAAM,WAAS,GAAG,cAAY,IAAI,QAAM,4BAA4B,OAAK,GAAG,OAAK,GAAG,OAAK,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