/* Hero Banner Plugin CSS */

/* Reset e configurações base - aplicado apenas aos elementos específicos do hero */
.hero-banner .hero-container,
.hero-banner .hero-content,
.hero-banner .hero-text,
.hero-banner .hero-title,
.hero-banner .hero-description,
.hero-banner .hero-buttons,
.hero-banner .btn {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Garantir que o hero apareça após o header */
#hero-banner-section {
    position: relative;
    display: block;
    width: 100%;
}

/* Configurações específicas para tema JNews */
body.jnews-theme .hero-banner {
    position: relative !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Garantir que o hero apareça após o header do JNews */
body.jnews-theme .jeg_header + .hero-banner,
body.jnews-theme .jeg_main_header + .hero-banner,
body.jnews-theme .jeg_header_wrapper + .hero-banner,
body.jnews-theme .jeg_navbar_mobile_wrapper + .hero-banner {
    margin-top: 0 !important;
}

/* Corrigir ::before no JNews */
body.jnews-theme .hero-banner::before {
    content: "" !important;
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxNDBweCIgdmlld0JveD0iMCAwIDEyODAgMTQwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGZpbGw9IiNmZmZmZmYiPjxwYXRoIGQ9Ik0xMDkzLjQ4IDEzMS44NUwxNzMgOTRhNzYuODUgNzYuODUgMCAwIDEtMzYuNzktMTEuNDZMMCAwdjE0MGgxMjgwVjBsLTEzMS44MSAxMTEuNjhjLTE2LjQ3IDEzLjk2LTM1LjQ3IDIwLjk2LTU0LjcxIDIwLjE3eiIvPjwvZz48L3N2Zz4=) !important;
    background-size: 100% 140px !important;
    background-repeat: no-repeat !important;
    bottom: -1px !important;
    height: 140px !important;
    z-index: 2 !important;
    transform: rotateY(180deg) !important;
    position: absolute !important;
    display: block !important;
    width: 100% !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    pointer-events: none !important;
}

/* Garantir que o botão 1 tenha bordas redondas no JNews */
body.jnews-theme .btn-primary {
    border-radius: 50px !important;
    box-shadow: none !important;
    text-align: center;
}

body.jnews-theme .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: none !important;
    border-radius: 50px !important;
}

/* Garantir que o botão 2 seja transparente no JNews */
body.jnews-theme .btn-text-only {
    background: transparent !important;
    color: white !important;
    border: none !important;
    box-shadow: none !important;
}

/* Garantir que o SVG do botão 2 seja sempre visível */
.btn-text-only .relative {
    display: block !important;
    visibility: visible !important;
}

.btn-text-only .relative svg {
    display: block !important;
    visibility: visible !important;
}

/* Garantir estrutura correta do botão 2 conforme exemplo */
.btn-text-only {
    display: flex !important;
    gap: 0.75em !important;
    align-items: center !important;
}

.btn-text-only .whitespace-nowrap {
    white-space: nowrap !important;
}

.btn-text-only .relative {
    margin-top: 1px !important;
}

body.jnews-theme .btn-text-only:hover {
    background: transparent !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Garantir que o SVG do botão 2 seja sempre visível no JNews */
body.jnews-theme .btn-text-only .relative {
    display: block !important;
    visibility: visible !important;
}

body.jnews-theme .btn-text-only .relative svg {
    display: block !important;
    visibility: visible !important;
}

/* Garantir estrutura correta do botão 2 no JNews conforme exemplo */
body.jnews-theme .btn-text-only {
    display: flex !important;
    gap: 0.75em !important;
    align-items: center !important;
}

body.jnews-theme .btn-text-only .whitespace-nowrap {
    white-space: nowrap !important;
}

body.jnews-theme .btn-text-only .relative {
    margin-top: 1px !important;
}

/* Ocultar H1 da página quando hero banner estiver ativo */
body.has-hero-banner .entry-title,
body.has-hero-banner .page-title,
body.has-hero-banner .post-title,
body.has-hero-banner .single-title,
body.has-hero-banner h1.entry-title,
body.has-hero-banner h1.page-title,
body.has-hero-banner h1.post-title,
body.has-hero-banner .content h1:first-of-type,
body.has-hero-banner .main-content h1:first-of-type,
body.has-hero-banner .page-content h1:first-of-type,
body.has-hero-banner .entry-content h1:first-of-type,
body.has-hero-banner .post-content h1:first-of-type,
body.has-hero-banner .page-header h1,
body.has-hero-banner .entry-header h1 {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}



/* Garantir que todos os elementos do hero não causem scroll horizontal */
.hero-banner * {
    box-sizing: border-box;
}

/* Forçar remoção de transforms inline que prejudicam a visualização */
.hero-banner,
.hero-container,
.hero-content,
.hero-text,
.hero-title,
.hero-description,
.hero-buttons {
    transform: none !important;
}

/* Exceções para elementos que precisam de transform */
.hero-banner::before,
.hero-banner .btn:hover,
.hero-banner .btn:active {
    transform: revert !important;
}


/* Correções específicas para desktop */
@media (min-width: 769px) {
    .hero-content {
        overflow: hidden !important;
        max-width: 100% !important;
    }
    
    .hero-text {
        overflow: hidden !important;
        max-width: 100% !important;
    }
    
    .hero-container {
        overflow: hidden !important;
        max-width: 100% !important;
    }
}

.hero-container {
    width: 100%;
    max-width: 100%;
}

.hero-content {
    width: 100%;
    max-width: 100%;
}

.hero-banner {
    position: relative;
    width: 100%;
    max-width: 100vw;
    height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 50%, #16213e 100%);
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    clear: both;
    box-sizing: border-box;
}

/* Aplicar cor branca apenas aos elementos específicos do hero */
.hero-banner .hero-title,
.hero-banner .hero-description,
.hero-banner .btn {
    color: #ffffff;
}



.hero-banner::before {
    content: "";
    background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxNDBweCIgdmlld0JveD0iMCAwIDEyODAgMTQwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJub25lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxnIGZpbGw9IiNmZmZmZmYiPjxwYXRoIGQ9Ik0xMDkzLjQ4IDEzMS44NUwxNzMgOTRhNzYuODUgNzYuODUgMCAwIDEtMzYuNzktMTEuNDZMMCAwdjE0MGgxMjgwVjBsLTEzMS44MSAxMTEuNjhjLTE2LjQ3IDEzLjk2LTM1LjQ3IDIwLjk2LTU0LjcxIDIwLjE3eiIvPjwvZz48L3N2Zz4=);
    background-size: 100% 140px;
    background-repeat: no-repeat;
    bottom: 0px;
    height: 140px;
    z-index: 2;
    transform: rotateY(180deg);
    position: absolute;
    display: block;
    width: 100%;
    top: auto;
    left: 0;
    right: 0;
    pointer-events: none;
}

/* Background com imagem */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background-image será definida dinamicamente via CSS customizado */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* Container principal */
.hero-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 100%;
    display: flex;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Coluna de texto */
.hero-text {
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.highlight {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-description {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: #cbd5e1;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 500px;
}

/* Botões CTA */
.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Quando há apenas um botão, centralizar */
.hero-buttons:has(.btn:only-child),
.hero-buttons.single-button {
    justify-content: center;
}

/* Quando não há botões, ocultar o container */
.hero-buttons:empty {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px !important;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 160px;
    justify-content: center;
}


.btn-primary {
    box-shadow: none !important;
    border-radius: 50px !important;
    border: none !important;
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: none !important;
    border-radius: 50px !important;
}

.btn-primary:focus {
    border-radius: 50px !important;
    outline: none !important;
    box-shadow: none !important;
}

.btn-primary:active {
    border-radius: 50px !important;
    transform: translateY(0) !important;
}

.btn-text-only {
    background: transparent !important;
    color: white !important;
    border: none !important;
    padding: 1rem 0;
    min-width: auto;
    box-shadow: none !important;
}

.btn-text-only:hover {
    background: transparent !important;
    color: white !important;
    transform: none !important;
    box-shadow: none !important;
}

.btn-text-only:focus {
    background: transparent !important;
    color: white !important;
    box-shadow: none !important;
}

/* Remover efeito ::before do botão text-only */
.btn-text-only::before {
    display: none;
}

.btn-text-only:hover::before {
    display: none;
}

/* Estilo para botão 2 quando for link âncora */
.btn-text-only[data-scroll="true"] {
    cursor: pointer;
}

.btn-text-only[data-scroll="true"]:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Classes específicas para o botão Book a Call */
.whitespace-nowrap {
    white-space: nowrap;
}

.relative {
    position: relative;
}

.mt-px {
    margin-top: 1px;
}

.overflow-visible {
    overflow: visible;
}

.pointer-events-none {
    pointer-events: none;
}

.absolute {
    position: absolute;
}

.left-0 {
    left: 0;
}

.top-0 {
    top: 0;
}

/* Animação do SVG do botão Book a Call */
.btn-text-only .relative:hover .absolute svg g line {
    animation: drawLine 0.6s ease-in-out forwards;
}

@keyframes drawLine {
    from {
        stroke-dashoffset: 1;
    }
    to {
        stroke-dashoffset: 0;
    }
}

/* Coluna visual vazia */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Responsividade - Tablet */
@media (max-width: 1024px) {
    .hero-banner {
        height: 600px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        justify-items: center;
    }
    
    .hero-text {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        text-align: center;
        margin-bottom: 2rem;
        max-width: 600px;
    }
    
    .hero-buttons {
        justify-content: center;
        align-items: center;
    }
}

/* Responsividade - Mobile */
@media (max-width: 768px) {
    .hero-banner {
        height: 600px;
    }
    
    .hero-container {
        padding: 0 1rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        justify-items: center;
    }
    
    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .hero-title {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        text-align: center;
        margin-bottom: 2rem;
        max-width: 100%;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 0 !important;
    }
    
    /* Garantir que todos os botões tenham padding zero no mobile */
    .btn-primary,
    .btn-text-only {
        padding: 0 !important;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 600px;
    }
    
    .hero-container {
        padding: 0 0.75rem;
    }
    
    .hero-content {
        gap: 1rem;
    }
    
    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        text-align: center;
    }
    
    .hero-description {
        text-align: center;
    }
    
    .hero-buttons {
        align-items: center;
    }
}

/* Animações de entrada */
.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Melhorias de acessibilidade */
@media (prefers-reduced-motion: reduce) {
    .hero-banner::before {
        animation: none;
    }
    
    .hero-text {
        animation: none;
    }
}

/* Estados de foco para acessibilidade */
.btn:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Melhorias para telas de alta resolução */
@media (min-width: 1920px) {
    .hero-container {
        max-width: 1600px;
    }
    
    .hero-text {
        max-width: 1000px;
    }
}

/* Correções adicionais para JNews */
body.jnews-theme .hero-banner .hero-container {
    position: relative !important;
    z-index: 3 !important;
    width: 100% !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    padding: 0 2rem !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.jnews-theme .hero-banner .hero-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 4rem !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.jnews-theme .hero-banner .hero-text {
    max-width: 600px !important;
    width: 100% !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

body.jnews-theme .hero-banner .hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem) !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin-bottom: 1.5rem !important;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

body.jnews-theme .hero-banner .hero-description {
    font-size: clamp(1.1rem, 2vw, 1.25rem) !important;
    color: #cbd5e1 !important;
    margin-bottom: 2.5rem !important;
    line-height: 1.7 !important;
    max-width: 500px !important;
}

/* Correções específicas para mobile no JNews */
@media (max-width: 768px) {
    body.jnews-theme .hero-banner {
        position: relative !important;
        width: 100% !important;
        max-width: 100vw !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        order: 2 !important; /* Garantir que apareça após o header */
    }
    
    /* Forçar posicionamento após o header mobile do JNews */
    body.jnews-theme .jeg_navbar_mobile_wrapper + .hero-banner,
    body.jnews-theme .jeg_mobile_header + .hero-banner,
    body.jnews-theme .jeg_header_mobile + .hero-banner {
        margin-top: 0 !important;
        order: 2 !important;
    }
    
    /* Garantir que o hero apareça após o header mobile do JNews */
    body.jnews-theme .jeg_header + .hero-banner,
    body.jnews-theme .jeg_main_header + .hero-banner,
    body.jnews-theme .jeg_header_wrapper + .hero-banner,
    body.jnews-theme .jeg_header_outer + .hero-banner,
    body.jnews-theme .jeg_header_top + .hero-banner,
    body.jnews-theme .jeg_header_bottom + .hero-banner,
    body.jnews-theme .jeg_header_mid + .hero-banner,
    body.jnews-theme .jeg_navbar_mobile_wrapper + .hero-banner {
        margin-top: 0 !important;
        position: relative !important;
    }
    
    /* Ajustar container para mobile */
    body.jnews-theme .hero-banner .hero-container {
        padding: 0 1rem !important;
    }
    
    /* Ajustar conteúdo para mobile */
    body.jnews-theme .hero-banner .hero-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        text-align: center !important;
        justify-items: center !important;
    }
    
    /* Ajustar texto para mobile */
    body.jnews-theme .hero-banner .hero-text {
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* Ajustar título para mobile */
    body.jnews-theme .hero-banner .hero-title {
        text-align: center !important;
        margin-bottom: 1rem !important;
    }
    
    /* Ajustar descrição para mobile */
    body.jnews-theme .hero-banner .hero-description {
        text-align: center !important;
        margin-bottom: 2rem !important;
        max-width: 100% !important;
    }
    
    /* Garantir que o hero não sobreponha o header mobile */
    body.jnews-theme .hero-banner {
        clear: both !important;
    }
    
    /* Ajustar botões para mobile */
    body.jnews-theme .hero-banner .hero-buttons {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    body.jnews-theme .hero-banner .btn {
        width: 100% !important;
        max-width: 280px !important;
        padding: 0 !important;
    }
    
    /* Garantir que todos os botões JNews tenham padding zero no mobile */
    body.jnews-theme .hero-banner .btn-primary,
    body.jnews-theme .hero-banner .btn-text-only {
        padding: 0 !important;
    }
    
    /* Garantir bordas redondas no mobile */
    body.jnews-theme .hero-banner .btn-primary {
        border-radius: 50px !important;
    }
}

/* Correções adicionais para mobile muito pequeno */
@media (max-width: 480px) {
    body.jnews-theme .hero-banner {
        margin-top: 0 !important;
        position: relative !important;
    }
    
    body.jnews-theme .hero-banner .hero-container {
        padding: 0 0.75rem !important;
    }
    
    body.jnews-theme .hero-banner .hero-content {
        gap: 1rem !important;
    }
}
