/* =========================================
WRAPPER & SYSTEM STYLES (Gold Standard)
========================================= */
.ioa-regional-events-v2 {
    position: relative;
    width: 100%;
}

.ioa-regional-events-v2 *,
.ioa-regional-events-v2 *::before,
.ioa-regional-events-v2 *::after {
    box-sizing: border-box;
}

/* =========================================
TELEPORT SLOTS (Gold Standard Feature)
========================================= */
.ioa-teleport-slot {
    min-height: 0;
    transition: all 0.3s ease;
    margin-bottom: 0;
    width: 100%;
}

.ioa-teleport-slot.has-content {
    margin-bottom: 2rem;
    animation: ioa-fade-in 0.5s ease;
}

/* Editor Visuals - Visible only in Elementor Editor (.is-editor-mode added via PHP) */
.is-editor-mode .ioa-teleport-slot {
    min-height: 40px;
    border: 1px dashed rgba(16, 185, 129, 0.3); /* Using Date Green color for distinction */
    background: rgba(16, 185, 129, 0.05);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.is-editor-mode .ioa-teleport-slot::before {
    content: attr(data-label);
    font-size: 11px;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@keyframes ioa-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
ORIGINAL STYLES (Preserved)
========================================= */

/* IOA Regional Events Widget Styles */
.ea3g-events-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ea3g-events-container {
    /* Core palette */
    --color-primary: #1e3a8a;
    --color-primary-dark: #1e40af;
    --color-primary-light: rgba(30, 58, 138, 0.08);
    --color-primary-ultra-light: rgba(30, 58, 138, 0.03);
    --color-surface: #ffffff;
    --color-surface-alt: #f3f4f6;
    --color-background: #f9fafb;
    --color-border: #e5e7eb;
    --color-text-primary: #111827;
    --color-text-secondary: #374151;
    --color-date: #10b981; /* Green for dates */
    --color-location: #6b7280; /* Grey for locations */
    
    /* Spacing */
    --space-xs: 0.75rem;   /* 12px */
    --space-sm: 1rem;      /* 16px */
    --space-md: 1.5rem;    /* 24px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 2.5rem;    /* 40px */
    --space-2xl: 3.5rem;   /* 56px */
    --space-3xl: 5rem;     /* 80px */
    
    font-family: 'Inter', sans-serif;
    color: var(--color-text-secondary);
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--space-2xl) var(--space-md) var(--space-3xl);
    position: relative;
    background-color: var(--color-background);
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

.ea3g-events-container h1, 
.ea3g-events-container .ea3g-year-text {
    font-family: 'Poppins', sans-serif;
    color: var(--color-text-primary);
    font-weight: 600;
    line-height: 1.2;
}

.ea3g-events-subtitle {
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-2xl);
}

.ea3g-event-title {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.5;
    margin-bottom: var(--space-xs);
}

.ea3g-event-date,
.ea3g-event-location,
.ea3g-event-organizer {
    font-size: 12px;
}

/* Timeline container */
.ea3g-timeline {
    position: relative;
    margin-left: 20px;
    margin-bottom: var(--space-2xl);
}

.ea3g-timeline::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 0;
    left: 0;
    width: 1px;
    background-color: var(--color-border);
    z-index: 0;
}

/* Year sections with on-load animation */
.ea3g-year-section {
    position: relative;
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--color-border);
    opacity: 0;
    transform: translateY(20px);
    animation: sectionAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ea3g-year-section:nth-child(1) { animation-delay: 0.1s; }
.ea3g-year-section:nth-child(2) { animation-delay: 0.2s; }
.ea3g-year-section:nth-child(3) { animation-delay: 0.3s; }
.ea3g-year-section:nth-child(4) { animation-delay: 0.4s; }
.ea3g-year-section:nth-child(5) { animation-delay: 0.5s; }
.ea3g-year-section:nth-child(6) { animation-delay: 0.6s; }
.ea3g-year-section:nth-child(7) { animation-delay: 0.7s; }
.ea3g-year-section:nth-child(8) { animation-delay: 0.8s; }
.ea3g-year-section:nth-child(9) { animation-delay: 0.9s; }
.ea3g-year-section:nth-child(10) { animation-delay: 1.0s; }

@keyframes sectionAppear {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.ea3g-year-section:last-child {
    border-bottom: none;
}

/* Year label */
.ea3g-year-label {
    position: relative;
    margin-bottom: var(--space-xl);
    display: flex;
    align-items: center;
}

.ea3g-year-text {
    font-size: 1.5rem;
    color: var(--color-primary);
    position: relative;
    margin-left: 36px;
}

.ea3g-year-dot {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--color-primary-light);
    background-color: var(--color-surface);
    box-shadow: 0 0 0 5px var(--color-primary-ultra-light);
    z-index: 1;
}

.ea3g-year-dot::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-primary);
}

.ea3g-year-line {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    height: 1px;
    width: 12px;
    background-color: var(--color-primary-light);
}

/* Event item styling */
.ea3g-events-list {
    padding-left: 36px;
}

.ea3g-event-item {
    position: relative;
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px dashed var(--color-border);
    opacity: 0;
    transform: translateX(15px);
}

.ea3g-event-item:nth-child(1) { animation: eventAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards; }
.ea3g-event-item:nth-child(2) { animation: eventAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards; }

@keyframes eventAppear {
    0% { opacity: 0; transform: translateX(15px); }
    100% { opacity: 1; transform: translateX(0); }
}

.ea3g-event-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.ea3g-event-item::before {
    content: "";
    position: absolute;
    left: -36px;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 1px solid var(--color-primary-light);
    background-color: var(--color-surface);
}

.ea3g-event-item::after {
    content: "";
    position: absolute;
    left: -27px;
    top: 12px;
    width: 15px;
    height: 1px;
    background-color: var(--color-primary-light);
}
    
/* Metadata styling */
.ea3g-event-date {
    display: inline-flex;
    align-items: center;
    color: var(--color-date);
    margin-bottom: var(--space-xs);
    font-weight: 500;
}

.ea3g-event-date-icon {
    width: 14px;
    height: 14px;
    margin-right: var(--space-xs);
    fill: var(--color-date);
    opacity: 0.8;
}

.ea3g-event-location {
    display: inline-flex;
    align-items: center;
    color: var(--color-location);
    font-weight: 500;
    margin-left: var(--space-md);
}

.ea3g-event-location-icon {
    width: 14px;
    height: 14px;
    margin-right: var(--space-xs);
    fill: var(--color-location);
    opacity: 0.8;
}

.ea3g-event-organizer {
    color: var(--color-text-secondary);
    margin-top: var(--space-xs);
    font-style: italic;
}

/* Responsive styles */
@media (max-width: 768px) {
    .ea3g-events-subtitle { 
        font-size: 16px;
    }
    .ea3g-events-list { padding-left: 24px; }
    .ea3g-event-item::before { left: -24px; }
    .ea3g-event-item::after { left: -15px; }
    .ea3g-year-text { margin-left: 24px; font-size: 1.25rem; }
    .ea3g-year-line { width: 8px; }
}

@media (max-width: 480px) {
    .ea3g-event-date, .ea3g-event-location {
        display: block;
        margin-bottom: var(--space-xs);
    }
    .ea3g-event-location { margin-left: 0; }
}