/* Estilos customizados para a página Saber Mais - Otimizado */

/* Reset e configurações base para performance otimizada */
html, body {
    width: 100%;
    overflow-x: hidden;
    max-width: 100%;
    padding: 0;
    margin: 0;
    scroll-behavior: smooth;
}

/* Ajustes para containers e grids */
.container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

/* Melhorias de performance para imagens */
img {
    height: auto;
    max-width: 100%;
    display: block;
}

/* Lazy loading para melhor performance */
img[loading="lazy"] {
    transition: opacity 0.3s;
}

/* WebP support com fallback */
.webp-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Fixando o tamanho do botão de orçamento */
.orcamento-btn {
    display: block;
    width: auto;
    min-width: 10rem;
    white-space: nowrap;
    text-align: center;
}

/* Estilo para o banner principal otimizado */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 70vh;
    color: white;
    overflow: hidden;
}

.image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: relative;
    width: 100%;
    padding: 2rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Botões otimizados com melhor performance */
.btn-primary {
    display: inline-block;
    background-color: #D94681;
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(217, 70, 129, 0.3);
    border: none;
    cursor: pointer;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #c13770;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(217, 70, 129, 0.4);
}

/* Botão webinar com animações GPU-aceleradas */
.btn-webinar {
    display: inline-block;
    background: linear-gradient(45deg, #FF3B8D, #D94681);
    color: white !important;
    font-weight: 700;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    padding: 0.85rem 2.5rem;
    border-radius: 9999px;
    text-align: center;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.4s ease;
    box-shadow: 0 8px 20px rgba(217, 70, 129, 0.4), 0 2px 4px rgba(217, 70, 129, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transform: translateZ(0); /* GPU acceleration */
    will-change: transform, box-shadow;
}

.btn-webinar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #D94681, #FF3B8D);
    z-index: -1;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.btn-webinar:hover,
.btn-webinar:focus {
    transform: translateY(-5px) scale(1.03) translateZ(0);
    box-shadow: 0 12px 25px rgba(217, 70, 129, 0.5), 0 4px 10px rgba(217, 70, 129, 0.4);
}

.btn-webinar:hover::before {
    opacity: 1;
}

.btn-webinar:active {
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 5px 15px rgba(217, 70, 129, 0.4);
}

/* Estilo para a seção Sobre Mim com melhor responsividade */
.about-me {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
}

@media (min-width: 768px) {
    .about-me {
        grid-template-columns: 1fr 1fr;
        padding: 4rem 2rem;
        align-items: center;
    }
}

.about-me video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-me-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Cards de benefício otimizados */
.benefit-card {
    position: relative;
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    transform: translateZ(0); /* GPU acceleration */
}

.benefit-card::before {
    content: attr(data-number);
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(217, 70, 129, 0.2);
    line-height: 1;
}

.benefit-card:hover {
    transform: translateY(-5px) translateZ(0);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #D94681;
}

/* Swiper otimizado */
.swiper-container {
    padding: 2rem 1rem;
}

.testimonial {
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateZ(0); /* GPU acceleration */
}

.testimonial p {
    flex: 1;
}

.swiper-pagination-bullet {
    background-color: #D94681;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background-color: #D94681;
}

/* Glass-morphism otimizado */
.glass-morphism-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    z-index: 50;
}

/* Animações com GPU acceleration */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Melhorias de acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible para navegação por teclado */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid #0DB3A6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip links para acessibilidade */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #0DB3A6;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Estilos para links ativos no menu */
.nav-link.active, 
.mobile-menu a.active {
    color: #10B981;
    background-color: rgba(16, 185, 129, 0.1);
}

/* FAQ melhorado */
.faq-highlight {
    color: #D94681;
    font-weight: 600;
}

.faq-answer {
    will-change: max-height, padding;
}

/* Animação pulsante otimizada */
@keyframes pulse-effect {
    0% {
        transform: scale(1) translateZ(0);
        opacity: 1;
    }
    50% {
        transform: scale(1.05) translateZ(0);
        opacity: 0.8;
    }
    100% {
        transform: scale(1) translateZ(0);
        opacity: 1;
    }
}

.animate-pulse {
    animation: pulse-effect 2s infinite ease-in-out;
}

/* Cores otimizadas */
.bg-teal-500 {
    background-color: #0DB3A6 !important;
}

.hover\:bg-teal-600:hover {
    background-color: #0A8F85 !important;
}

.text-teal-500 {
    color: #0DB3A6 !important;
}

.border-teal-500 {
    border-color: #0DB3A6 !important;
}

/* Botão Voltar ao Topo otimizado */
#back-to-top {
    z-index: 30;
    background-color: #0DB3A6 !important;
    transition: all 0.3s ease;
    transform: translateZ(0); /* GPU acceleration */
}

#back-to-top:hover,
#back-to-top:focus {
    background-color: #0A8F85 !important;
    transform: translateY(-5px) translateZ(0);
}

/* Responsividade aprimorada */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn-primary,
    .btn-webinar {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .benefit-card {
        padding: 1.5rem;
    }
    
    .testimonial {
        height: auto;
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .page-banner {
        padding-top: 6rem !important;
        padding-bottom: 3rem !important;
    }
    
    .grid {
        gap: 1rem !important;
    }
    
    .px-6 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .about-me {
        padding: 1rem !important;
        gap: 1rem !important;
    }
    
    .benefit-card {
        padding: 1.25rem !important;
    }
    
    .benefit-card::before {
        font-size: 2.5rem !important;
    }
    
    .py-12, .py-16, .py-20 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .mb-12 {
        margin-bottom: 2rem !important;
    }
}

/* Otimizações para dispositivos muito pequenos */
@media (max-width: 360px) {
    .testimonial {
        padding: 1rem !important;
    }
    
    .text-xl {
        font-size: 1.1rem !important;
    }
    
    .text-lg {
        font-size: 1rem !important;
    }
    
    .header .ml-3 {
        font-size: 0.9rem !important;
    }
    
    .btn-webinar {
        padding: 0.6rem 1.5rem !important;
        font-size: 0.85rem !important;
    }
}

/* Banner com efeitos otimizados */
.page-banner {
    position: relative;
    overflow: hidden;
    background-attachment: scroll; /* Melhor performance que fixed */
}

.page-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: -1;
}

/* Lazy loading melhorado */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Performance improvements */
.will-change-transform {
    will-change: transform;
}

.will-change-auto {
    will-change: auto;
}

/* Print styles */
@media print {
    .btn-webinar,
    .btn-primary,
    #back-to-top,
    .mobile-menu-button {
        display: none !important;
    }
    
    .page-banner {
        background: none !important;
        color: black !important;
    }
    
    .testimonial {
        break-inside: avoid;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-webinar {
        border: 2px solid currentColor;
    }
    
    .benefit-card {
        border: 1px solid currentColor;
    }
}

.testimonials-wrap-pt {
    overflow-x: hidden;
    overflow-x: clip;
}

/* As formas decorativas ultrapassam a viewport no mobile e empurram o cabeçalho para fora do ecrã. */
@media (max-width: 767px) {
    .lp-hero::before,
    .lp-hero::after,
    .community-section::before {
        display: none;
    }
}

/* Contrato mobile final para a página Saber mais. O conteúdo mantém-se intacto. */
@media (max-width: 430px) {
    html,
    body {
        overflow-x: clip;
    }

    .container {
        width: 100%;
        max-width: none;
        padding-right: .875rem;
        padding-left: .875rem;
    }

    .lp-hero {
        min-height: auto;
        padding: 5.8rem 0 3.5rem;
    }

    .lp-hero-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 2rem;
    }

    .lp-hero h1 {
        max-width: 100%;
        font-size: clamp(2.55rem, 13vw, 3.75rem) !important;
        overflow-wrap: anywhere;
    }

    .lp-hero p,
    .lp-lead,
    .lp-task span,
    .lp-check-list li,
    .lp-consent {
        overflow-wrap: anywhere;
    }

    .lp-hero-portrait {
        width: min(100%, 330px);
    }

    .lp-btn,
    .wizard-btn,
    .lp-input,
    .faq-q-v3 {
        min-height: 44px;
    }

    .lp-cta-row,
    .form-wizard-actions,
    .form-wizard-actions.is-end {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .lp-cta-row .lp-btn,
    .form-wizard-actions .wizard-btn,
    .form-wizard-actions .wizard-submit {
        width: 100%;
    }

    .lp-section {
        padding: 4rem 0;
    }

    .lp-title {
        max-width: 100%;
        font-size: clamp(1.95rem, 10vw, 2.65rem) !important;
        overflow-wrap: anywhere;
    }

    .lp-panel,
    .lp-card,
    .lp-step,
    .lp-trust-card,
    .cf-card {
        min-width: 0;
        padding: 1rem;
        border-radius: 16px;
    }

    .lp-choice,
    .lp-task {
        min-width: 0;
    }

    .form-wizard-progress {
        padding-right: 0;
        padding-left: 0;
    }

    .form-wizard-dot-number {
        width: 36px;
        height: 36px;
    }

    .community-proof-card {
        width: 100%;
    }

    .contact-wrapper-v3 {
        gap: 2rem;
    }
}
