/* 
 * Essência Company - Página de Eventos
 * Estilos específicos para a página de eventos
 */

/* ===== Estilos Gerais da Página de Eventos ===== */
.events-page {
    --event-primary: #D1FF00;
    --event-secondary: #234022;
    --event-dark: #111;
    --event-light: #ffffff;
    --event-gray: #f8f9fa;
    --transition-base: all 0.3s ease;
    --shadow-soft: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-strong: 0 15px 40px rgba(0,0,0,0.2);
}

/* ===== Header da Página de Eventos ===== */
.events-header {
    background: linear-gradient(135deg, var(--event-secondary) 0%, #1a2e19 100%);
    color: var(--event-light);
    padding: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    height: 100vh; /* Ocupa toda a altura da viewport */
    min-height: 700px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.events-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/events/pattern-overlay.svg');
    opacity: 0.1;
    z-index: 1;
}

.events-header .container {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-content {
    margin-bottom: 120px; /* Espaço significativo entre o conteúdo e o botão de scroll */
}

.events-header h1 {
    font-size: 7rem;
    font-weight: 900;
    margin-bottom: 30px;
    letter-spacing: -3px;
    text-transform: uppercase;
    text-shadow: 0 5px 15px rgba(0,0,0,0.2);
    animation: fadeInDown 1.2s ease-out;
}

.header-divider {
    width: 120px;
    height: 5px;
    background: var(--event-primary);
    margin: 40px auto;
    position: relative;
    animation: scaleIn 1s ease-out 0.3s;
    animation-fill-mode: both;
}

.header-divider::before {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: var(--event-primary);
    top: -5px;
    right: -15px;
    border-radius: 50%;
}

.events-header p {
    font-size: 1.5rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1.2s ease-out 0.5s;
    animation-fill-mode: both;
}

/* Indicador de Scroll */
.scroll-indicator {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--event-light);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    cursor: pointer;
    animation: bounceDown 2s infinite;
}

.scroll-indicator:hover {
    opacity: 1;
}

.scroll-indicator span {
    margin-bottom: 10px;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.scroll-arrow {
    color: var(--event-primary);
    animation: arrowPulse 2s infinite;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 1;
    }
}

/* ===== Container Principal de Eventos ===== */
.events-container {
    position: relative;
}

/* ===== Seção de Evento Individual ===== */
.event-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    margin-bottom: 0; /* Removido o espaçamento entre eventos */
    will-change: opacity, transform;
}

/* Ajuste para o primeiro evento */
.event-section:first-child {
    padding-top: 150px; /* Mais espaço no topo do primeiro evento */
    scroll-margin-top: 80px; /* Ajuste para o scroll suave */
}

.event-section:last-child {
    margin-bottom: 0; /* Remove margem no último evento */
}

/* Certifique-se de que todos os elementos sejam visíveis por padrão */
.event-section, .event-content, .event-info, .event-showcase {
    opacity: 1;
}

.event-section:nth-child(odd) {
    background-color: #ffffff; /* Fundo branco puro */
}

.event-section:nth-child(even) {
    background-color: #f9f9f9; /* Fundo levemente acinzentado para alternância */
}

.event-parallax-bg {
    display: none; /* Remove completamente os fundos dos eventos */
}

.overlay-gradient {
    display: none; /* Remove o gradiente sobreposto ao fundo */
}

.event-section .container {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Conteúdo do Evento */
.event-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    opacity: 1; /* Garantir que esteja visível por padrão */
}

/* Layout Invertido */
.event-content.inverted {
    direction: rtl; /* Inverte a ordem dos elementos grid */
}

.event-content.inverted > * {
    direction: ltr; /* Restaura a direção do texto dentro dos elementos */
}

/* Informações do Evento */
.event-info {
    position: relative;
}

.event-badge {
    display: inline-block;
    background: var(--event-primary);
    color: var(--event-secondary);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    border-radius: 30px;
    margin-bottom: 20px;
}

.event-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--event-secondary);
    margin-bottom: 20px;
    line-height: 1.1;
}

.event-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.location-tag {
    background: rgba(35, 64, 34, 0.1);
    color: var(--event-secondary);
    padding: 5px 15px;
    border-radius: 30px;
    font-size: 0.875rem;
    font-weight: 500;
}

.event-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
}

.event-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--event-secondary);
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.event-link::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;
}

.event-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(35, 64, 34, 0.3);
}

.event-link:hover::before {
    left: 100%;
}

/* Estilos para os novos botões de evento */
.event-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.event-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--event-secondary);
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-base);
    border: 1px solid rgba(35, 64, 34, 0.2);
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.event-button i {
    font-size: 1rem;
    color: var(--event-secondary);
}

.event-button:hover {
    background: var(--event-primary);
    color: var(--event-secondary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(35, 64, 34, 0.15);
}

.event-button:hover i {
    color: var(--event-secondary);
}

/* Card do Evento */
.event-showcase {
    position: relative;
}

.event-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition-base);
}

.event-section:hover .event-card {
    transform: perspective(1000px) rotateY(0deg);
}

.event-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .event-image img {
    transform: scale(1.05);
}

.event-highlights {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 30px 20px;
    text-align: center;
    background: white;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.highlight-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--event-secondary);
    margin-bottom: 5px;
}

.highlight-label {
    font-size: 0.875rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Divisor entre eventos */
.event-divider {
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
}

.divider-dots {
    display: flex;
    gap: 12px;
}

.divider-dots span {
    width: 8px;
    height: 8px;
    background: var(--event-primary);
    border-radius: 50%;
    display: block;
    opacity: 0.7;
}

.divider-dots span:nth-child(2) {
    width: 12px;
    height: 12px;
    opacity: 1;
}

/* ===== Media Queries ===== */

/* Tablet (menos de 1024px) */
@media (max-width: 1024px) {
    .events-header {
        padding: 150px 0 80px;
    }
    
    .events-header h1 {
        font-size: 4rem;
    }
    
    .event-section {
        padding: 100px 0;
    }
    
    .event-content {
        gap: 50px;
    }
    
    .event-title {
        font-size: 3rem;
    }
}

/* Mobile (menos de 768px) */
@media (max-width: 768px) {
    .events-header {
        height: 100vh;
        min-height: 600px;
        padding: 0;
    }
    
    .header-content {
        margin-bottom: 80px;
    }
    
    .events-header h1 {
        font-size: 3.5rem;
    }
    
    .events-header p {
        font-size: 1.2rem;
        padding: 0 20px;
    }
    
    .scroll-indicator {
        bottom: 50px;
    }
    
    .event-section {
        padding: 80px 0;
    }
    
    .event-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .event-title {
        font-size: 2.5rem;
    }
    
    .event-description {
        font-size: 1rem;
    }
    
    .event-card {
        transform: none;
        max-width: 450px;
        margin: 0 auto;
    }
    
    .event-highlights {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Pequeno (menos de 480px) */
@media (max-width: 480px) {
    .header-content {
        margin-bottom: 60px;
    }
    
    .events-header h1 {
        font-size: 2.5rem;
        padding: 0 15px;
    }
    
    .header-divider {
        width: 80px;
        margin: 20px auto;
    }
    
    .events-header p {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .scroll-indicator span {
        font-size: 0.8rem;
    }
    
    .event-title {
        font-size: 2rem;
    }
    
    .event-badge {
        font-size: 0.75rem;
        padding: 6px 12px;
    }
    
    .event-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .event-button {
        width: 100%;
        justify-content: center;
    }
    
    .event-highlights {
        padding: 20px 10px;
    }
    
    .highlight-number {
        font-size: 1.5rem;
    }
    
    .highlight-label {
        font-size: 0.75rem;
    }
}

/* ===== Seção Final de Eventos ===== */
.final-events-section {
    background-color: var(--event-gray);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.final-events-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/events/pattern-overlay.svg');
    opacity: 0.05;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--event-secondary);
    margin-bottom: 20px;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.section-divider {
    width: 80px;
    height: 5px;
    background: var(--event-primary);
    margin: 0 auto;
    position: relative;
}

.section-divider::after {
    content: '';
    position: absolute;
    right: -15px;
    top: -5px;
    width: 15px;
    height: 15px;
    background: var(--event-primary);
    border-radius: 50%;
}

.final-events-content {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    margin-bottom: 60px;
}

.global-presence-text {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 20px;
}

.global-presence-text.additional-text {
    margin: 40px auto 0;
}

.final-events-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #333;
}

.final-events-text.emphasis {
    font-size: 1.4rem;
    font-weight: 500;
    color: #222;
}

.stat-highlight {
    font-size: 2rem;
    font-weight: 900;
    color: var(--event-primary);
    display: inline-block;
    margin-right: 5px;
}

.stat-label {
    font-weight: 700;
    color: var(--event-secondary);
    margin-right: 5px;
}

/* Mapa Visual do Mundo - Datamaps */
.world-map-container {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background-color: rgba(248, 249, 250, 0.7);
    padding: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.world-map-container:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    transform: translateY(-5px) scale(1.01);
}

#world-map {
    width: 100%;
    height: 560px;
    display: block;
    position: relative;
    overflow: visible !important; /* Importante: permite que o conteúdo exceda os limites */
}

/* Estilos do Datamaps */
.datamaps-hoverover,
.hoverinfo {
    background-color: rgba(35, 64, 34, 0.95);
    color: #ffffff;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    pointer-events: none;
    transition: all 0.2s ease;
    position: absolute;
    text-align: center;
    min-width: 80px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

/* Hide default tooltips completely */
.datamaps-hoverover {
    display: none !important;
    font-family: 'Fahkwang', sans-serif;
}

/* Estilo para países destacados */
.highlighted-country {
    fill: #234022 !important;
    opacity: 0.8;
    stroke: #ffffff;
    stroke-width: 0.3;
}

/* Hover em países */
.datamaps-subunit:hover {
    fill: #D1FF00 !important;
    opacity: 0.7;
    cursor: pointer;
    transition: fill 0.3s ease-out;
}

/* Estilos específicos para o texto dentro do tooltip */
.hoverinfo strong,
.custom-map-tooltip strong {
    color: #ffffff !important;
    font-family: 'Fahkwang', sans-serif;
    font-weight: 600;
    font-size: 14px;
    display: block;
    text-align: center;
}

/* Estilo para o tooltip customizado */
.custom-map-tooltip {
    background-color: rgba(35, 64, 34, 0.95) !important;
    color: #ffffff !important;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 80px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}

/* Estilo para o tooltip do mapa */
.map-tooltip {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(209, 255, 0, 0.7);
    }
    50% {
        transform: scale(1.2);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(209, 255, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(209, 255, 0, 0);
    }
}

/* Tooltip para os pontos do mapa */
.map-tooltip {
    position: absolute;
    background-color: var(--event-secondary);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Responsivo para Seção Final */
@media (max-width: 1024px) {
    .section-header h2 {
        font-size: 3rem;
    }
    
    .final-events-section {
        padding: 100px 0;
    }
    
    .world-map-container {
        height: 500px;
    }
    
    #world-map {
        height: 460px;
    }
    
    .final-events-text.emphasis {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .final-events-section {
        padding: 80px 0;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .global-presence-text {
        padding: 15px;
    }
    
    .final-events-text {
        font-size: 1.1rem;
    }
    
    .final-events-text.emphasis {
        font-size: 1.2rem;
    }
    
    .world-map-container {
        height: 400px;
        margin: 20px 0;
    }
    
    #world-map {
        height: 360px;
    }
    
    .stat-highlight {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .final-events-section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .global-presence-text {
        padding: 10px;
    }
    
    .global-presence-text.additional-text {
        margin-top: 30px;
    }
    
    .final-events-text {
        font-size: 1rem;
    }
    
    .final-events-text.emphasis {
        font-size: 1.1rem;
    }
    
    .stat-highlight {
        font-size: 1.6rem;
    }
    
    .world-map-container {
        height: 300px;
    }
    
    #world-map {
        height: 260px;
    }
}

/* ===== Merged: Events Mobile Layout overrides (from events-mobile-layout.css) ===== */
@media (max-width: 768px) {
    /* Ensure vertical stacking and consistent spacing in mobile */
    .events-page .event-content,
    .event-section .event-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    /* 1. Title */
    .events-page .event-title,
    .event-section .event-title {
        margin-bottom: 5px !important;
        width: 100% !important;
        order: 1 !important;
    }

    /* 2. Locations */
    .events-page .event-locations,
    .event-section .event-locations {
        margin-bottom: 8px !important;
        width: 100% !important;
        justify-content: flex-start !important;
        order: 2 !important;
    }

    /* 3. Showcase */
    .events-page .event-showcase,
    .event-section .event-showcase {
        width: 100% !important;
        margin: 0 0 8px 0 !important;
        order: 3 !important;
    }

    /* 4. Description */
    .events-page .event-description,
    .event-section .event-description {
        margin-bottom: 8px !important;
        text-align: left !important;
        width: 100% !important;
        order: 4 !important;
    }

    /* 5. Link (part of buttons) */
    .events-page .event-link,
    .event-section .event-link {
        margin-bottom: 8px !important;
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        order: 5 !important;
    }

    /* 6. Buttons */
    .events-page .event-buttons,
    .event-section .event-buttons {
        margin-bottom: 5px !important;
        width: 100% !important;
        order: 6 !important;
    }

    .event-info {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
    }

    /* Hide slider UI on mobile */
    .event-divider .divider-dots,
    .slider-controls,
    .slider-dot {
        display: none !important;
    }

    /* Reduce divider height */
    .event-divider {
        height: 15px !important;
    }

    /* Compact padding for containers */
    .event-section .container {
        padding: 0 10px !important;
    }

    .event-content {
        padding: 15px 0 !important;
    }

    /* Hide map on mobile */
    .world-map-container {
        display: none !important;
    }
}

/* ===== Merged: Extras from event-styles.css (safe, non-conflicting) ===== */
.event-title {
    /* Extra fine-tuning */
    letter-spacing: -1px;
    margin-top: 10px;
}

.event-link svg {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.event-link:hover svg {
    transform: translateX(5px);
}
