%PDF- %PDF-
Direktori : /home/vacivi36/SiteVacivitta/vacivitta/src/pages/ |
Current File : /home/vacivi36/SiteVacivitta/vacivitta/src/pages/Servicos.jsx |
import React, { useState } from 'react'; import styled, { keyframes } from 'styled-components'; import { motion, AnimatePresence } from 'framer-motion'; import { FaInfoCircle, FaChevronRight, FaCheckCircle, FaWhatsapp, FaCalendarAlt, FaMedkit, FaArrowDown, FaQuestionCircle } from 'react-icons/fa'; import { Link } from 'react-router-dom'; // Custom Colors from index.css const colors = { blue: '#0094D9', darkBlue: '#0d3453', hoverBlue: '#0063d3', green: '#3d9948', hoverGreen: '#32c143', dark: '#18161A', landColor: '#0a2b3a' }; // Animations const floatAnimation = keyframes` 0% { transform: translateY(0px); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0px); } `; const fadeIn = keyframes` from { opacity: 0; } to { opacity: 1; } `; const slideInFromRight = keyframes` from { transform: translateX(50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } `; const slideInFromLeft = keyframes` from { transform: translateX(-50px); opacity: 0; } to { transform: translateX(0); opacity: 1; } `; const shimmer = keyframes` 0% { background-position: -468px 0; } 100% { background-position: 468px 0; } `; const pulseAnimation = keyframes` 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } `; const rotate = keyframes` from { transform: rotate(0deg); } to { transform: rotate(360deg); } `; const PageContainer = styled.div` margin-top: 100px; padding-bottom: 60px; max-width: 1200px; margin-left: auto; margin-right: auto; `; // Hero Section const HeroSection = styled.section` background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7)), url('/homePage.png'); background-size: cover; background-position: center; padding: 80px 60px; display: flex; align-items: center; justify-content: space-between; border-radius: 16px; margin: 0 20px 40px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); position: relative; overflow: hidden; &::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0, 148, 217, 0.05) 0%, rgba(61, 153, 72, 0.05) 100%); z-index: 1; } > * { position: relative; z-index: 2; } @media (max-width: 768px) { flex-direction: column; padding: 60px 20px; text-align: center; margin: 0 10px 30px; } `; const HeroContent = styled.div` width: 55%; @media (max-width: 768px) { width: 100%; margin-bottom: 40px; } `; const HeroTitle = styled(motion.h1)` color: ${colors.darkBlue}; font-size: 2.5rem; margin-bottom: 20px; line-height: 1.2; text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5); span { color: ${colors.blue}; display: inline-block; position: relative; &::after { content: ''; position: absolute; bottom: -3px; left: 0; width: 100%; height: 3px; background: ${colors.green}; transform: scaleX(0); transform-origin: right; transition: transform 0.3s ease; } &:hover::after { transform: scaleX(1); transform-origin: left; } } @media (max-width: 768px) { font-size: 2rem; } `; const HeroSubtitle = styled(motion.p)` color: ${colors.dark}; font-size: 1.2rem; margin-bottom: 30px; line-height: 1.6; text-shadow: 1px 1px 1px rgba(255, 255, 255, 0.5); @media (max-width: 768px) { font-size: 1rem; } `; const HeroImage = styled(motion.img)` width: 40%; border-radius: 20px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); animation: ${floatAnimation} 6s ease-in-out infinite; position: relative; z-index: 2; &::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0, 148, 217, 0.2) 0%, rgba(61, 153, 72, 0.2) 100%); border-radius: 20px; z-index: 3; } @media (max-width: 768px) { width: 90%; } `; const ButtonsContainer = styled.div` display: flex; gap: 20px; margin-top: 30px; @media (max-width: 768px) { justify-content: center; flex-wrap: wrap; } `; const PrimaryButton = styled.button` background-color: ${colors.blue}; color: white; border: none; padding: 12px 24px; border-radius: 25px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 8px; &:hover { background-color: ${colors.hoverBlue}; transform: translateY(-3px) scale(1.01); box-shadow: 0 5px 15px rgba(0, 148, 217, 0.3); } `; const SecondaryButton = styled.button` background-color: transparent; color: ${colors.blue}; border: 2px solid ${colors.blue}; padding: 12px 24px; border-radius: 25px; font-weight: bold; cursor: pointer; transition: all 0.3s ease; display: flex; align-items: center; gap: 8px; &:hover { background-color: rgba(0, 148, 217, 0.1); transform: translateY(-3px) scale(1.01); box-shadow: 0 5px 15px rgba(0, 148, 217, 0.1); } `; // Scroll-down indicator const ScrollIndicator = styled(motion.div)` position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; cursor: pointer; z-index: 5; p { color: ${colors.darkBlue}; font-size: 0.9rem; margin-bottom: 8px; font-weight: 500; } svg { color: ${colors.blue}; animation: ${pulseAnimation} 2s infinite; } `; // Services Section const SectionTitle = styled.h2` color: ${colors.darkBlue}; font-size: 2rem; text-align: center; margin: 60px 0 40px; display: flex; align-items: center; justify-content: center; gap: 10px; position: relative; &::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 80px; height: 3px; background: linear-gradient(to right, ${colors.blue}, ${colors.green}); border-radius: 3px; } svg { color: ${colors.green}; } @media (max-width: 768px) { font-size: 1.7rem; margin: 40px 0 30px; } `; const ServicesGrid = styled.div` display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 30px; padding: 0 20px; @media (max-width: 768px) { grid-template-columns: 1fr; gap: 20px; } `; const ServiceCard = styled(motion.div)` background: white; border-radius: 16px; overflow: hidden; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 450px; display: flex; flex-direction: column; position: relative; &::before { content: ''; position: absolute; top: 0; left: 0; width: 5px; height: 0; background: linear-gradient(to bottom, ${colors.blue}, ${colors.green}); transition: height 0.4s ease; } &:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12); &::before { height: 100%; } } `; const ServiceCardOverlay = styled.div` position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.03) 100%); pointer-events: none; `; const ServiceImage = styled.div` width: 100%; height: 200px; position: relative; overflow: hidden; img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; } &::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, transparent 70%, rgba(0, 0, 0, 0.3) 100%); z-index: 1; } ${ServiceCard}:hover & img { transform: scale(1.05); } `; const ServiceContent = styled.div` padding: 25px; display: flex; flex-direction: column; flex: 1; position: relative; z-index: 2; `; const ServiceTitle = styled.h3` color: ${colors.darkBlue}; font-size: 1.3rem; margin-bottom: 12px; font-weight: 600; position: relative; display: inline-block; &::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 40px; height: 2px; background: ${colors.green}; } `; const ServiceDescription = styled.p` color: ${colors.dark}; font-size: 1rem; line-height: 1.6; margin-bottom: 20px; flex-grow: 1; `; const ServiceFeatures = styled.div` margin-bottom: 20px; `; const FeatureItem = styled.div` display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: ${colors.dark}; font-size: 0.9rem; svg { color: ${colors.green}; min-width: 14px; } span { color: ${colors.dark}; font-weight: 500; } `; const ActionLink = styled(Link)` color: ${colors.blue}; font-weight: bold; text-decoration: none; display: flex; align-items: center; gap: 5px; transition: all 0.3s ease; margin-top: auto; padding: 8px 0; &:hover { color: ${colors.hoverBlue}; transform: translateX(5px); svg { animation: ${pulseAnimation} 1s infinite; } } `; // FAQ Section const FaqSection = styled.section` margin: 80px 20px 40px; position: relative; &::before { content: ''; position: absolute; top: -40px; left: 0; width: 100%; height: calc(100% + 80px); background: rgba(0, 148, 217, 0.03); border-radius: 20px; z-index: -1; } @media (max-width: 768px) { margin: 60px 10px 30px; } `; const FaqGrid = styled.div` display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 20px; grid-auto-rows: min-content; align-items: start; @media (max-width: 768px) { grid-template-columns: 1fr; padding: 10px; } `; const FaqItem = styled.div` background: white; border-radius: 12px; padding: 20px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05); cursor: pointer; transition: all 0.3s ease; border-left: 3px solid transparent; height: auto; position: relative; will-change: height; align-self: start; ${props => props.isOpen && ` border-left: 3px solid ${colors.green}; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); `} &:hover { box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08); transform: translateY(-3px); } h3 { color: ${colors.darkBlue}; font-size: 1.1rem; margin-bottom: ${props => props.isOpen ? '15px' : '0'}; transition: all 0.3s ease; display: flex; align-items: center; justify-content: space-between; svg { color: ${colors.blue}; transition: transform 0.3s ease; transform: ${props => props.isOpen ? 'rotate(180deg)' : 'rotate(0)'}; } } p { color: ${colors.dark}; font-size: 0.95rem; line-height: 1.6; animation: ${fadeIn} 0.3s ease; } `; const FaqContent = styled(motion.div)` overflow: hidden; `; // CTA Section const CtaSection = styled.section` background: linear-gradient(135deg, ${colors.blue}, ${colors.darkBlue}); color: white; border-radius: 16px; padding: 60px 40px; text-align: center; margin: 60px 20px; position: relative; overflow: hidden; &::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('/pattern.svg'); background-size: cover; opacity: 0.05; z-index: 1; } > * { position: relative; z-index: 2; } @media (max-width: 768px) { padding: 40px 20px; margin: 40px 10px; } `; const CtaTitle = styled.h2` font-size: 2.2rem; margin-bottom: 20px; color: white; text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); @media (max-width: 768px) { font-size: 1.8rem; } `; const CtaText = styled.p` font-size: 1.1rem; max-width: 700px; margin: 0 auto 30px; line-height: 1.6; color: rgba(255, 255, 255, 0.9); @media (max-width: 768px) { font-size: 1rem; } `; const WhiteButton = styled.button` background-color: white; color: ${colors.blue}; border: none; padding: 14px 28px; border-radius: 50px; font-weight: bold; font-size: 1.1rem; cursor: pointer; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 8px; position: relative; overflow: hidden; z-index: 1; &::before { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent); transition: left 0.7s ease; z-index: -1; } &:hover { background-color: #f5f5f5; transform: translateY(-3px) scale(1.01); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); &::before { left: 100%; } svg { animation: ${pulseAnimation} 1s infinite; } } @media (max-width: 768px) { font-size: 1rem; padding: 12px 24px; } `; // Dynamic illuminated icon that rotates around the CTA section const IlluminatedIcon = styled(motion.div)` position: absolute; font-size: 2rem; color: rgba(255, 255, 255, 0.3); z-index: 0; svg { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3)); } `; function Servicos() { const [activeFaq, setActiveFaq] = useState(null); const services = [ { id: 1, title: "Consultoria em amamentação", description: "Auxílio profissional e especializado para mães que desejam amamentar seus bebês, com orientações personalizadas.", image: "amamentar.png", features: ["Suporte personalizado", "Profissionais especializados", "Agenda flexível"], path: "/#/servicos/consultoria-amamentacao" }, { id: 2, title: "Exames clínicos", description: "Variedade de exames clínicos realizados por equipe especializada, com resultados rápidos e precisos.", image: "exame.png", features: ["Equipe qualificada", "Resultados rápidos", "Ambiente confortável"], path: "/#/servicos/exames-clinicos" }, { id: 3, title: "Consulta com especialistas", description: "Atendimento médico com especialistas de diversas áreas para diagnóstico, tratamento e acompanhamento de saúde.", image: "especialista.png", features: ["Médicos especialistas", "Atendimento personalizado", "Consultas agendadas"], path: "/#/servicos/consulta-especialistas" }, { id: 4, title: "Aplicação de medicação", description: "Administração segura de medicamentos injetáveis e infusões por enfermeiros altamente capacitados.", image: "aplicar.png", features: ["Equipe de enfermagem", "Disponível 7 dias", "Ambiente estéril"], path: "/#/servicos/aplicacao-medicacao" }, { id: 5, title: "Pediatria Especializada", description: "Atendimento pediátrico para o acompanhamento do desenvolvimento infantil, desde recém-nascidos até adolescentes.", image: "pediatra.png", features: ["Pediatras especializados", "Ambiente acolhedor", "Atenção integral"], path: "/#/servicos/pediatria" }, { id: 6, title: "Vacinação corporativa", description: "Programas de vacinação para empresas, levando imunização de qualidade até o ambiente corporativo.", image: "corporativa.png", features: ["Atendimento in company", "Gestão de carteiras", "Relatórios personalizados"], path: "/#/servicos/vacinacao-corporativa" } ]; const faqs = [ { id: 1, question: "Como posso agendar um serviço?", answer: "Você pode agendar qualquer serviço através do nosso site, aplicativo ou ligando para a unidade mais próxima. Também oferecemos a opção de agendamento pelo WhatsApp." }, { id: 2, question: "Quais formas de pagamento são aceitas?", answer: "Aceitamos pagamentos em dinheiro, cartões de crédito e débito, PIX e também trabalhamos com diversos convênios médicos e empresariais." }, { id: 3, question: "Posso reagendar ou cancelar um serviço?", answer: "Sim, você pode reagendar ou cancelar um serviço com até 24 horas de antecedência sem qualquer custo adicional." }, { id: 4, question: "Vocês atendem em domicílio?", answer: "Sim, oferecemos serviços de atendimento domiciliar para alguns procedimentos específicos. Entre em contato para verificar a disponibilidade na sua região." } ]; const toggleFaq = (id) => { setActiveFaq(prevActiveFaq => prevActiveFaq === id ? null : id); }; const scrollToServices = () => { document.getElementById('servicos').scrollIntoView({ behavior: 'smooth' }); }; return ( <PageContainer> <HeroSection> <HeroContent> <HeroTitle initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.6 }} > Serviços de saúde <span>completos</span> para você e sua família </HeroTitle> <HeroSubtitle initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.6, delay: 0.2 }} > Conheça nossa ampla gama de serviços especializados, todos pensados para proporcionar conforto, segurança e saúde de qualidade. </HeroSubtitle> </HeroContent> <HeroImage src="" alt="" initial={{ opacity: 0, scale: 0.8 }} animate={{ opacity: 1, scale: 1 }} transition={{ duration: 0.6, delay: 0.3 }} /> <ScrollIndicator onClick={scrollToServices} initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.6, delay: 0.9 }} whileHover={{ y: [0, -5, 0], transition: { repeat: Infinity, duration: 1 } }} > <p>Explore nossos serviços</p> <FaArrowDown size={20} /> </ScrollIndicator> </HeroSection> <SectionTitle id="servicos"> <FaCheckCircle /> Nossos serviços especializados </SectionTitle> <ServicesGrid> {services.map((service, index) => { const handleCardClick = () => { window.location.href = service.path; }; return ( <ServiceCard key={service.id} initial={{ opacity: 0, y: 30 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.5, delay: index * 0.1 }} whileHover={{ y: -8 }} onClick={handleCardClick} style={{ cursor: 'pointer' }} > <ServiceCardOverlay /> <ServiceImage> <img src={service.image || `https://source.unsplash.com/random/350x200/?${service.title.toLowerCase()}`} alt={service.title} /> </ServiceImage> <ServiceContent> <ServiceTitle>{service.title}</ServiceTitle> <ServiceDescription>{service.description}</ServiceDescription> <ServiceFeatures> {service.features.map((feature, i) => ( <FeatureItem key={i}> <FaCheckCircle size={14} /> <span>{feature}</span> </FeatureItem> ))} </ServiceFeatures> <ActionLink to={service.path} as={motion.a} whileHover={{ x: 5 }} onClick={(e) => { e.stopPropagation(); }} > Ver detalhes <FaChevronRight size={14} /> </ActionLink> </ServiceContent> </ServiceCard> ); })} </ServicesGrid> <FaqSection> <SectionTitle> <FaQuestionCircle /> Perguntas frequentes </SectionTitle> <FaqGrid> {faqs.map(faq => ( <FaqItem key={faq.id} isOpen={activeFaq === faq.id} onClick={() => toggleFaq(faq.id)} as={motion.div} whileHover={{ y: -3 }} whileTap={{ scale: 0.98 }} initial={{ opacity: 0, y: 20 }} animate={{ opacity: 1, y: 0 }} transition={{ duration: 0.3 }} > <h3> {faq.question} <FaChevronRight size={14} /> </h3> <AnimatePresence mode="wait"> {activeFaq === faq.id && ( <FaqContent key={`faq-answer-${faq.id}`} initial={{ opacity: 0, height: 0 }} animate={{ opacity: 1, height: 'auto' }} exit={{ opacity: 0, height: 0 }} transition={{ duration: 0.3 }} > <p>{faq.answer}</p> </FaqContent> )} </AnimatePresence> </FaqItem> ))} </FaqGrid> </FaqSection> <CtaSection> {[...Array(3)].map((_, i) => ( <IlluminatedIcon key={i} initial={{ x: `${Math.random() * 100}%`, y: `${Math.random() * 100}%`, opacity: 0.2, rotate: 0 }} animate={{ x: `${Math.random() * 100}%`, y: `${Math.random() * 100}%`, opacity: [0.2, 0.5, 0.2], rotate: 360, scale: [1, 1.2, 1] }} transition={{ repeat: Infinity, duration: 15 + i * 5, ease: "linear", times: [0, 0.5, 1] }} > <FaMedkit /> </IlluminatedIcon> ))} <CtaTitle>Pronto para cuidar da sua saúde?</CtaTitle> <CtaText> Agende agora mesmo seu serviço e receba atendimento de qualidade com profissionais especializados na área. </CtaText> <WhiteButton as={motion.button} whileHover={{ scale: 1.05 }} whileTap={{ scale: 0.95 }} onClick={() => window.open('https://wa.me/551108001233333', '_blank')} > <FaWhatsapp size={18} /> Agende pelo WhatsApp </WhiteButton> </CtaSection> </PageContainer> ); } export default Servicos;